00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _ThinClient_h
00030 #define _ThinClient_h
00031
00032 #include <sienaconf.h>
00033
00034 #include <sys/types.h>
00035 #ifdef HAVE_STDINT_H
00036 #include <stdint.h>
00037 #endif
00038
00039 #include <string>
00040
00041 using namespace std;
00042
00043 #include <siena/Siena.h>
00044 #include <siena/SienaId.h>
00045 #include <siena/Comm.h>
00046
00047 #ifdef HAVE_CXX_NAMESPACE
00048
00049 namespace Siena {
00050 #endif
00051
00054 class ThinClient: public SienaPull {
00055 public:
00061 ThinClient(const string & uri);
00062
00069 ThinClient(const string & uri, const string & id);
00070 virtual ~ThinClient();
00071
00085 void set_receiver(Receiver *);
00086
00089 Receiver * get_receiver();
00090
00091 virtual void publish(const Notification &e);
00092
00093 virtual void subscribe(const Filter &f);
00094
00095 virtual void unsubscribe(const Filter &f);
00096 virtual void unsubscribe();
00097
00098 virtual Notification * get_notification();
00099 virtual NotificationSequence * get_notification_sequence();
00100
00101 virtual void suspend();
00102 virtual void resume();
00103
00104 virtual void shutdown();
00105
00106 private:
00107 string master_uri;
00108 Sender * master;
00109 SienaId my_id;
00110 Receiver * receiver;
00111 };
00112
00113 #ifndef NO_INLINE
00114 #include <siena/ThinClient.icc>
00115 #endif
00116
00117 #ifdef HAVE_CXX_NAMESPACE
00118 };
00119 #endif
00120
00121 #endif