2 * opalglobalstatics.cxx
4 * Various global statics that need to be instantiated upon startup
6 * Portable Windows Library
8 * Copyright (C) 2004 Post Increment
10 * The contents of this file are subject to the Mozilla Public License
11 * Version 1.0 (the "License"); you may not use this file except in
12 * compliance with the License. You may obtain a copy of the License at
13 * http://www.mozilla.org/MPL/
15 * Software distributed under the License is distributed on an "AS IS"
16 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17 * the License for the specific language governing rights and limitations
20 * The Original Code is Portable Windows Library.
22 * The Initial Developer of the Original Code is Post Increment
24 * Contributor(s): ______________________________________.
27 * Revision 1.4 2005/05/06 04:00:51 shorne
28 * fixed --disable-plugins compile directive errors - Thanks Chih-Wei Huang
30 * Revision 1.3 2005/01/11 07:12:24 csoutheren
31 * Fixed namespace collisions with plugin starup factories
33 * Revision 1.2 2005/01/11 07:02:48 csoutheren
34 * Fixed namespace collisions with plugin starup factories
38 #ifndef _OPALGLOBALSTATIC_CXX
39 #define _OPALGLOBALSTATIC_CXX
41 #if defined(P_HAS_PLUGINS)
42 class PluginLoader
: public PProcessStartup
44 PCLASSINFO(PluginLoader
, PProcessStartup
);
47 { H323PluginCodecManager::Bootstrap(); }
51 namespace PWLibStupidLinkerHacks
{
56 extern int h261Loader
;
57 extern int rfc2190h263Loader
;
61 extern int opalwavfileLoader
;
64 } // namespace PWLibStupidLinkerHacks
66 //////////////////////////////////
68 #if defined(P_HAS_PLUGINS)
69 static PFactory
<PPluginModuleManager
>::Worker
<H323PluginCodecManager
> h323PluginCodecManagerFactory("H323PluginCodecManager", true);
70 static PFactory
<PProcessStartup
>::Worker
<PluginLoader
> h323pluginStartupFactory("H323PluginLoader", true);
73 static PFactory
<H235Authenticator
>::Worker
<H235AuthSimpleMD5
> h235AuthSimpleMD5Factory("SimpleMD5");
74 static PFactory
<H235Authenticator
>::Worker
<H235AuthCAT
> h235CiscoCATFactory("CiscoCAT");
77 static PFactory
<H235Authenticator
>::Worker
<H235AuthProcedure1
> h235AuthProcedure1Factory("AuthProcedure1");
80 //////////////////////////////////
83 // declare a simple class to execute on startup
85 static class OpalInstantiateMe
92 OpalInstantiateMe::OpalInstantiateMe()
95 PWLibStupidLinkerHacks::opalwavfileLoader
= 1;
99 PWLibStupidLinkerHacks::h261Loader
= 1;
100 #if H323_RFC2190_AVCODEC
101 PWLibStupidLinkerHacks::rfc2190h263Loader
= 1;
102 #endif // H323_RFC2190_AVCODEC
103 #endif // NO_H323_VIDEO
105 PWLibStupidLinkerHacks::h235AuthLoader
= 1;
108 PWLibStupidLinkerHacks::h235AuthProcedure1Loader
= 1;