Siena C++ API documentation (v. 0.4.1)

Main Page   Class Hierarchy   Compound List   File List   Compound Members   Examples  

ThinClient.h

00001 // -*- C++ -*-
00002 //
00003 //  This file is part of Siena, a wide-area event notification system.
00004 //  See http://www.cs.colorado.edu/serl/siena/
00005 //
00006 //  Author: Antonio Carzaniga <carzanig@cs.colorado.edu>
00007 //  See the file AUTHORS for full details. 
00008 //
00009 //  Copyright (C) 1998-2001 University of Colorado
00010 //
00011 //  This program is free software; you can redistribute it and/or
00012 //  modify it under the terms of the GNU General Public License
00013 //  as published by the Free Software Foundation; either version 2
00014 //  of the License, or (at your option) any later version.
00015 //
00016 //  This program is distributed in the hope that it will be useful,
00017 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 //  GNU General Public License for more details.
00020 //
00021 //  You should have received a copy of the GNU General Public License
00022 //  along with this program; if not, write to the Free Software
00023 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
00024 //  USA, or send email to serl@cs.colorado.edu.
00025 //
00026 //
00027 // $Id: ThinClient.h,v 1.1 2001/05/25 17:47:48 carzanig Exp $
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 #include <siena/SienaId.h>
00042 #include <siena/Comm.h>
00043 
00044 #ifdef HAVE_CXX_NAMESPACE
00045 
00046 namespace Siena {
00047 #endif
00048 
00051 class ThinClient: public SienaPull {
00052 public:
00058                         ThinClient(const string & uri); 
00059                         ~ThinClient();
00060 
00074     void                set_receiver(Receiver *);
00075 
00078     Receiver *          get_receiver();
00079 
00080     virtual void        publish(const Notification &e);
00081 
00082     virtual void        subscribe(const Filter &f);
00083 
00084     virtual void        unsubscribe(const Filter &f);
00085     virtual void        unsubscribe();
00086 
00087     virtual Notification *              get_notification();
00088     virtual NotificationSequence *      get_notification_sequence();
00089 
00090     virtual void        suspend();
00091     virtual void        resume();
00092 
00093     virtual void        shutdown();
00094 
00095 private:
00096     string master_uri;
00097     Sender * master;
00098     SienaId my_id;
00099     Receiver * receiver;
00100 };
00101 
00102 #ifndef NO_INLINE
00103 #include <siena/ThinClient.icc>
00104 #endif
00105 
00106 #ifdef HAVE_CXX_NAMESPACE
00107 };
00108 #endif
00109 
00110 #endif

Copyright © 2001 University of Colorado.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". This documentation is authored and maintained by Antonio Carzaniga