OpenDDS  Snapshot(2023/04/28-20:55)
BuiltInPluginLoader.cpp
Go to the documentation of this file.
1 /*
2  *
3  *
4  * Distributed under the OpenDDS License.
5  * See: http://www.opendds.org/license.html
6  */
7 
8 #include "BuiltInPluginLoader.h"
9 
13 
14 #include <dds/DCPS/RcHandle_T.h>
15 
17 
18 namespace OpenDDS {
19 namespace Security {
20 
21 int
22 BuiltInPluginLoader::init(int /*argc*/, ACE_TCHAR* /*argv*/[])
23 {
24  const OPENDDS_STRING PLUGIN_NAME("BuiltIn");
25  SecurityPluginInst_rch plugin = TheSecurityRegistry->get_plugin_inst(
26  PLUGIN_NAME, false /* don't attempt to load the plugin */);
27  if (!plugin) {
28  plugin = DCPS::make_rch<BuiltInSecurityPluginInst>();
29  TheSecurityRegistry->register_plugin(PLUGIN_NAME, plugin);
30  }
31 
32  SecurityConfig_rch default_config =
34  plugin);
35 
36  if (TheSecurityRegistry->has_no_configs()) {
37  TheSecurityRegistry->default_config(default_config);
38  }
39 
40  TheSecurityRegistry->builtin_config(default_config);
41 
42  return 0;
43 }
44 
45 ACE_FACTORY_DEFINE(OpenDDS_Security, BuiltInPluginLoader);
48  ACE_TEXT("OpenDDS_Security"),
52  0)
53 
54 } // namespace Security
55 } // namespace OpenDDS
56 
& ACE_SVC_NAME(TAO_AV_TCP_Factory)
ACE_STATIC_SVC_DEFINE(ACE_Logging_Strategy, ACE_TEXT("Logging_Strategy"), ACE_Service_Type::SERVICE_OBJECT, &ACE_SVC_NAME(ACE_Logging_Strategy), ACE_Service_Type::DELETE_THIS|ACE_Service_Type::DELETE_OBJ, 0) extern "C" int _get_dll_unload_policy()
ACE_SVC_OBJ_T
#define OPENDDS_STRING
char ACE_TCHAR
#define TheSecurityRegistry
ACE_TEXT("TCP_Factory")
ACE_FACTORY_DEFINE(OpenDDS_Security, BuiltInPluginLoader)
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
virtual int init(int argc, ACE_TCHAR *argv[])
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28