L:/channel/channel/include/BaseDef.h

Go to the documentation of this file.
00001 
00002 // Copyright (c) 2005, 2006 Yigong Liu
00003 // Permission to use, copy, modify, distribute and sell this software for any 
00004 //     purpose is hereby granted without fee, provided that the above copyright 
00005 //     notice appear in all copies and that both that copyright notice and this 
00006 //     permission notice appear in supporting documentation.
00007 // The author makes no representations about the 
00008 //     suitability of this software for any purpose. It is provided "as is" 
00009 //     without express or implied warranty.
00011 
00012 #ifndef _BASE_DEF_H_
00013 #define _BASE_DEF_H_
00014 
00016 
00017 namespace channel {
00018 
00019   typedef enum {
00020     SUCCESS,
00021     FAILURE
00022   } Status;
00023 
00024   typedef enum {
00025     SCOPE_UNDEFINED = -1,
00026     SCOPE_LOCAL = 0,
00027     SCOPE_REMOTE,
00028     SCOPE_GLOBAL,
00029     SCOPE_NUMBER
00030   } PubSub_Scope;
00031 
00032   typedef enum {
00033     MEMBER_LOCAL = 0,//local queues and callbacks
00034     MEMBER_REMOTE,   //interfaces to remote/local channels
00035     MEMBER_NUMBER
00036   } Member_Type;
00037 
00038   typedef enum {
00039     CONN_NULL = 0,
00040     CONN_INIT,
00041     CONN_ACTIVE
00042   } Interface_State;
00043 
00044   typedef enum { 
00045     UNIX_SOCK,
00046     INET_SOCK
00047   } Interface_Type;
00048 
00049   typedef enum {
00050     ACTIVE_ROLE,  //i start connection setup process
00051     PASSIVE_ROLE, //i wait for others to connect
00052   } Interface_Role;
00053 
00054   enum Oper_Type {
00055     OPER_PUBLISH = 0,
00056     OPER_UNPUBLISH,
00057     OPER_SUBSCRIBE,
00058     OPER_UNSUBSCRIBE
00059   };
00060 
00061   enum Namespace_Type {
00062     NAMESPACE_LINEAR,
00063     NAMESPACE_HIERARCHICAL,
00064     NAMESPACE_ASSOCIATIVE
00065   };
00066 
00067 };
00068 
00069 #define ID2STR(id) Channel::idToString(id)
00070 
00071 
00072 #endif

Generated on Mon Feb 27 19:59:21 2006 for channel by  doxygen 1.4.6-NO