Siena C++ API Documentation
Author: Antonio Carzaniga

Siena C++ API documentation (v. 0.4.3)

- Main Page
- Classes
- Files
- 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.2 2004/01/28 20:43:07 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 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

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