sipxportlib  Version 3.3
PluginHooks.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004-2006 SIPfoundry Inc.
3 // Licensed by SIPfoundry under the LGPL license.
4 //
5 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
6 // Licensed to SIPfoundry under a Contributor Agreement.
7 //
8 // $$
10 
11 #ifndef _PLUGINHOOKS_H_
12 #define _PLUGINHOOKS_H_
13 
14 // SYSTEM INCLUDES
15 #include "utl/UtlSortedList.h"
17 
18 // APPLICATION INCLUDES
19 // DEFINES
20 // MACROS
21 // EXTERNAL FUNCTIONS
22 // EXTERNAL VARIABLES
23 // CONSTANTS
24 // STRUCTS
25 // TYPEDEFS
26 // FORWARD DECLARATIONS
27 class Plugin;
28 class PluginIterator;
29 class OsConfigDb;
30 
52 {
53 public:
54 
56  PluginHooks(const char* hookFactoryName,
57  const char* hookPrefix
58  );
59 
60  ~PluginHooks();
61 
63  void readConfig( OsConfigDb& configDb );
116  size_t entries() const;
118 
119 protected:
120  friend class PluginIterator;
121 
125 };
126 
153 {
154 public:
155 
157  PluginIterator(const PluginHooks& pluginHooks);
158 
159  ~PluginIterator();
160 
162  Plugin* next(UtlString* name = NULL
167  );
173 private:
174  UtlSortedListIterator mConfiguredHooksIterator;
175 
176 };
177 
178 #endif // _PLUGINHOOKS_H_
Definition: PluginHooks.h:51
Definition: UtlSortedListIterator.h:38
Definition: UtlSortedList.h:44
PluginHooks(const char *hookFactoryName, const char *hookPrefix)
Construct a manager for a set of hooks.
Definition: Plugin.cpp:153
~PluginHooks()
Definition: Plugin.cpp:161
size_t entries() const
Return the total number of plugins within.
Definition: PluginHooks.cpp:237
#define NULL
Definition: UtlDefs.h:29
Definition: Plugin.h:54
UtlSortedList mConfiguredHooks
The list of configured hooks.
Definition: PluginHooks.h:124
UtlString mPrefix
The prefix name for the OsConfigDb values.
Definition: PluginHooks.h:123
Definition: PluginHooks.h:152
Definition: UtlString.h:48
void readConfig(OsConfigDb &configDb)
Read what hooks are configured, and instantiate and configure each hook.
Definition: Plugin.cpp:166
Definition: OsConfigDb.h:67
UtlString mFactory
The factory routine name for this hook class.
Definition: PluginHooks.h:122
friend class PluginIterator
Definition: PluginHooks.h:120