Annotation of fam/fam/Client.h, Revision 1.1
1.1 ! trev 1: // Copyright (C) 1999 Silicon Graphics, Inc. All Rights Reserved.
! 2: //
! 3: // This program is free software; you can redistribute it and/or modify it
! 4: // under the terms of version 2 of the GNU General Public License as
! 5: // published by the Free Software Foundation.
! 6: //
! 7: // This program is distributed in the hope that it would be useful, but
! 8: // WITHOUT ANY WARRANTY; without even the implied warranty of
! 9: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Further, any
! 10: // license provided herein, whether implied or otherwise, is limited to
! 11: // this program in accordance with the express provisions of the GNU
! 12: // General Public License. Patent licenses, if any, provided herein do not
! 13: // apply to combinations of this program with other product or programs, or
! 14: // any other product whatsoever. This program is distributed without any
! 15: // warranty that the program is delivered free of the rightful claim of any
! 16: // third person by way of infringement or the like. See the GNU General
! 17: // Public License for more details.
! 18: //
! 19: // You should have received a copy of the GNU General Public License along
! 20: // with this program; if not, write the Free Software Foundation, Inc., 59
! 21: // Temple Place - Suite 330, Boston MA 02111-1307, USA.
! 22:
! 23: #ifndef Client_included
! 24: #define Client_included
! 25:
! 26: #include <sys/types.h>
! 27: #include <netinet/in.h> // for in_addr
! 28:
! 29: #include "Activity.h"
! 30: #include "Boolean.h"
! 31: #include "Request.h"
! 32:
! 33: class Cred;
! 34: class Event;
! 35: class Interest;
! 36: class Scanner;
! 37:
! 38: // Client is an abstract base type for clients of fam. A Client has
! 39: // a name which is used for debugging, and it receives events from
! 40: // lower-level code.
! 41: //
! 42: // These are the classes derived from Client.
! 43: //
! 44: // InternalClient some part of fam that needs to watch a file
! 45: // MxClient multiplexed client, an abstract type
! 46: // TCP_Client client that connects via TCP/IP protocol
! 47: // RemoteClient TCP_Client on a different machine
! 48:
! 49: class Client {
! 50:
! 51: public:
! 52:
! 53: static in_addr LOCALHOST();
! 54:
! 55: Client(const char *name, in_addr host);
! 56: virtual ~Client();
! 57:
! 58: virtual bool ready_for_events() = 0;
! 59: virtual void post_event(const Event&, Request, const char *name) = 0;
! 60: virtual void enqueue_for_scan(Interest *) = 0;
! 61: virtual void dequeue_from_scan(Interest *) = 0;
! 62: virtual void enqueue_scanner(Scanner *) = 0;
! 63: virtual void suggest_insecure_compat(const char *) { return; }
! 64: in_addr host() const { return myhost; }
! 65: const char *name();
! 66:
! 67: protected:
! 68:
! 69: void name(const char *);
! 70:
! 71: private:
! 72:
! 73: char *myname;
! 74: in_addr myhost;
! 75:
! 76: Client(const Client&); // Do not copy
! 77: Client & operator = (const Client&); // or assign
! 78:
! 79: };
! 80:
! 81: #endif /* !Client_included */
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>