summaryrefslogtreecommitdiff
path: root/src/client.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-07-16 21:52:57 +0000
committerMike Buland <eichlan@xagasoft.com>2009-07-16 21:52:57 +0000
commitff5688b09c21242c2a0bee70cdfd1ea50b06f4f0 (patch)
treea7f3d393ff8176b491f87fa6caf490df138a5844 /src/client.h
parent89df61f21e525c7a36846ce1a960ffba5501cdca (diff)
downloadlibbu++-ff5688b09c21242c2a0bee70cdfd1ea50b06f4f0.tar.gz
libbu++-ff5688b09c21242c2a0bee70cdfd1ea50b06f4f0.tar.bz2
libbu++-ff5688b09c21242c2a0bee70cdfd1ea50b06f4f0.tar.xz
libbu++-ff5688b09c21242c2a0bee70cdfd1ea50b06f4f0.zip
Client code is even cooler, it supports flushing data in case of buffering in
the filter chain, I'm going to go ahead and make that optional coming up.
Diffstat (limited to 'src/client.h')
-rw-r--r--src/client.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/client.h b/src/client.h
index 7ba1ac5..72b1b05 100644
--- a/src/client.h
+++ b/src/client.h
@@ -73,6 +73,22 @@ namespace Bu
73 pTopStream = pFlt; 73 pTopStream = pFlt;
74 lFilts.prepend( pFlt ); 74 lFilts.prepend( pFlt );
75 } 75 }
76
77 template<typename filter, typename p1t>
78 void pushFilter( p1t p1 )
79 {
80 filter *pFlt = new filter( *pTopStream, p1 );
81 pTopStream = pFlt;
82 lFilts.prepend( pFlt );
83 }
84
85 template<typename filter, typename p1t, typename p2t>
86 void pushFilter( p1t p1, p2t p2 )
87 {
88 filter *pFlt = new filter( *pTopStream, p1, p2 );
89 pTopStream = pFlt;
90 lFilts.prepend( pFlt );
91 }
76 92
77 private: 93 private:
78 typedef Bu::List<Bu::Stream *> FilterList; 94 typedef Bu::List<Bu::Stream *> FilterList;