Rudiments
protocolentry.h
1 // Copyright (c) 2002 David Muse
2 // See the COPYING file for more information.
3 
4 #ifndef RUDIMENTS_PROTOCOLENTRY_H
5 #define RUDIMENTS_PROTOCOLENTRY_H
6 
7 #include <rudiments/private/protocolentryincludes.h>
8 
9 #ifdef RUDIMENTS_NAMESPACE
10 namespace rudiments {
11 #endif
12 
13 class protocolentryprivate;
14 
17 class RUDIMENTS_DLLSPEC protocolentry {
18  public:
19 
26  static bool getAliasList(const char *protocolname,
27  char ***aliaslist);
28 
31  static bool getNumber(const char *protocolname,
32  int32_t *number);
33 
36  static bool getName(int32_t number, char **name);
37 
45  static bool getAliasList(int32_t number, char ***aliaslist);
46 
47 
49  protocolentry();
50 
53  protocolentry(const protocolentry &p);
54 
57  protocolentry &operator=(const protocolentry &p);
58 
60  ~protocolentry();
61 
64  bool initialize(const char *protocolname);
65 
68  bool initialize(int32_t number);
69 
71  const char *getName() const;
72 
75  const char * const *getAliasList() const;
76 
78  int32_t getNumber() const;
79 
81  void print() const;
82 
85  static bool needsMutex();
86 
90  static void setMutex(mutex *mtx);
91 
92  #include <rudiments/private/protocolentry.h>
93 };
94 
95 #ifdef RUDIMENTS_NAMESPACE
96 }
97 #endif
98 
99 #endif