Utilise new MergeSym feature to no longer overwrite the source .DEF file when buildin...
[openh323.git] / src / opalglobalstatics.cxx
blobbfc5e45da6206aa0e74c05fef8fdde0f220e6213
1 /*
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
18 * under the License.
20 * The Original Code is Portable Windows Library.
22 * The Initial Developer of the Original Code is Post Increment
24 * Contributor(s): ______________________________________.
26 * $Log$
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);
45 public:
46 void OnStartup()
47 { H323PluginCodecManager::Bootstrap(); }
49 #endif
51 namespace PWLibStupidLinkerHacks {
53 int h323Loader;
55 #ifndef NO_H323_VIDEO
56 extern int h261Loader;
57 extern int rfc2190h263Loader;
58 #endif
60 #ifdef P_WAVFILE
61 extern int opalwavfileLoader;
62 #endif
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);
71 #endif
73 static PFactory<H235Authenticator>::Worker<H235AuthSimpleMD5> h235AuthSimpleMD5Factory("SimpleMD5");
74 static PFactory<H235Authenticator>::Worker<H235AuthCAT> h235CiscoCATFactory("CiscoCAT");
76 #if P_SSL
77 static PFactory<H235Authenticator>::Worker<H235AuthProcedure1> h235AuthProcedure1Factory("AuthProcedure1");
78 #endif
80 //////////////////////////////////
83 // declare a simple class to execute on startup
85 static class OpalInstantiateMe
87 public:
88 OpalInstantiateMe();
89 } initialiser;
92 OpalInstantiateMe::OpalInstantiateMe()
94 #ifdef P_WAVFILE
95 PWLibStupidLinkerHacks::opalwavfileLoader = 1;
96 #endif
98 #ifndef NO_H323_VIDEO
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;
107 #if P_SSL
108 PWLibStupidLinkerHacks::h235AuthProcedure1Loader = 1;
109 #endif
112 #endif