Rudiments
/home/dmuse/src/rudiments/include/rudiments/serviceentry.h
00001 // Copyright (c) 2003 David Muse
00002 // See the COPYING file for more information.
00003 
00004 #ifndef RUDIMENTS_SERVICEENTRY_H
00005 #define RUDIMENTS_SERVICEENTRY_H
00006 
00007 #include <rudiments/private/serviceentryincludes.h>
00008 
00009 #ifdef RUDIMENTS_NAMESPACE
00010 namespace rudiments {
00011 #endif
00012 
00013 class serviceentryprivate;
00014 
00017 class RUDIMENTS_DLLSPEC serviceentry {
00018         public:
00019 
00026                 static  bool    getAliasList(const char *servicename,
00027                                                 const char *protocol,
00028                                                 char ***aliaslist);
00029 
00032                 static  bool    getPort(const char *servicename,
00033                                                 const char *protocol,
00034                                                 int32_t *port);
00035 
00040                 static  bool    getName(int32_t port,
00041                                                 const char *protocol,
00042                                                 char **name);
00043 
00051                 static  bool    getAliasList(int32_t port,
00052                                                 const char *protocol,
00053                                                 char ***aliaslist);
00054 
00055 
00057                 serviceentry();
00058 
00061                 serviceentry(const serviceentry &s);
00062 
00065                 serviceentry    &operator=(const serviceentry &s);
00066 
00068                 ~serviceentry();
00069 
00073                 bool    initialize(const char *servicename,
00074                                         const char *protocol);
00075 
00080                 bool    initialize(int32_t port, const char *protocol);
00081 
00083                 const char              *getName() const;
00084 
00087                 int32_t                 getPort() const;
00088 
00091                 const char              *getProtocol() const;
00092 
00095                 const char * const *    getAliasList() const;
00096 
00098                 void    print() const;
00099 
00102                 static  bool    needsMutex();
00103 
00107                 static  void    setMutex(mutex *mtx);
00108 
00109         #include <rudiments/private/serviceentry.h>
00110 };
00111 
00112 #ifdef RUDIMENTS_NAMESPACE
00113 }
00114 #endif
00115 
00116 #endif