RCFProto
 All Classes Functions Typedefs
Globals.hpp
1 
2 //******************************************************************************
3 // RCF - Remote Call Framework
4 //
5 // Copyright (c) 2005 - 2013, Delta V Software. All rights reserved.
6 // http://www.deltavsoft.com
7 //
8 // RCF is distributed under dual licenses - closed source or GPL.
9 // Consult your particular license for conditions of use.
10 //
11 // If you have not purchased a commercial license, you are using RCF
12 // under GPL terms.
13 //
14 // Version: 2.0
15 // Contact: support <at> deltavsoft.com
16 //
17 //******************************************************************************
18 
19 #ifndef INCLUDE_RCF_GLOBALS_HPP
20 #define INCLUDE_RCF_GLOBALS_HPP
21 
22 #include <string>
23 
24 #include <RCF/Export.hpp>
25 
26 namespace RCF {
27 
28  class ZlibDll;
29  class OpenSslDll;
30  class OpenSslCryptoDll;
31 
32  class RCF_EXPORT Globals
33  {
34 
35  public:
36  Globals();
37  ~Globals();
38 
39  void setZlibDllName(const std::string & dllName);
40  std::string getZlibDllName() const;
41 
42  void setOpenSslDllName(const std::string & dllName);
43  std::string getOpenSslDllName() const;
44 
45  void setOpenSslCryptoDllName(const std::string & dllName);
46  std::string getOpenSslCryptoDllName() const;
47 
48  ZlibDll & getZlibDll();
49  OpenSslDll & getOpenSslDll();
50  OpenSslCryptoDll & getOpenSslCryptoDll();
51 
52  void setSimultaneousPublishLimit(std::size_t simultaneousPublishLimit);
53  std::size_t getSimultaneousPublishLimit() const;
54 
55  private:
56 
57  void deleteZlibDll();
58  void deleteOpenSslDll();
59  void deleteOpenSslCryptoDll();
60 
61  ZlibDll * mpZlibDll;
62  OpenSslDll * mpOpenSslDll;
63  OpenSslCryptoDll * mpOpenSslCryptoDll;
64 
65  std::string mZlibDllName;
66  std::string mOpenSslDllName;
67  std::string mOpenSslCryptoDllName;
68 
69  std::size_t mSimultaneousPublishLimit;
70  };
71 
72  RCF_EXPORT Globals & getGlobals();
73 
74 } // namespace RCF
75 
76 #endif // ! INCLUDE_RCF_GLOBALS_HPP