Matrix Science header

ms_security_options.hpp

00001 /*
00002 ##############################################################################
00003 # file: ms_security_options.hpp                                              #
00004 # 'msparser' toolkit                                                         #
00005 # Encapsulates the global security options for Mascot authentication         #
00006 ##############################################################################
00007 # COPYRIGHT NOTICE                                                           #
00008 # Copyright 1998-2004 Matrix Science Limited  All Rights Reserved.           #
00009 #                                                                            #
00010 ##############################################################################
00011 #    $Archive:: /MowseBranches/ms_mascotresfile_1.2/include/ms_mascotresfi $ #
00012 #     $Author: francoisr $ #
00013 #       $Date: 2016/05/19 16:07:07 $ #
00014 #   $Revision: 1.16 $ #
00015 # $NoKeywords::                                                            $ #
00016 ##############################################################################
00017 */
00018 
00019 
00020 #if !defined(ms_security_options_INCLUDED_)
00021 #define ms_security_options_INCLUDED_
00022 
00023 #ifdef _WIN32
00024 #pragma warning(disable:4251)   // Don't want all classes to be exported
00025 #pragma warning(disable:4786)   // Debug symbols too long
00026 #   ifndef _MATRIX_USE_STATIC_LIB
00027 #       ifdef MS_MASCOTRESFILE_EXPORTS
00028 #           define MS_MASCOTRESFILE_API __declspec(dllexport)
00029 #       else
00030 #           define MS_MASCOTRESFILE_API __declspec(dllimport)
00031 #       endif
00032 #   else
00033 #       define MS_MASCOTRESFILE_API
00034 #   endif
00035 #else
00036 #   define MS_MASCOTRESFILE_API
00037 #endif
00038 
00039 // for the sake of #include <string>
00040 #ifdef __ALPHA_UNIX__
00041 #include <ctype.h>
00042 #endif
00043 
00044 // Includes from the standard template library
00045 #include <string>
00046 #include <set>
00047 #include <vector>
00048 #include <map>
00049 #include <time.h>
00050 
00051 namespace matrix_science {
00057     class ms_security;
00058 
00060 
00065     class MS_MASCOTRESFILE_API ms_security_options: public ms_errors
00066     {
00067 
00068     public:
00070         ms_security_options();
00071 
00072         ~ms_security_options();
00073 
00074         ms_security_options(const ms_security_options & src);
00075 #ifndef SWIG
00076         ms_security_options& operator=(const ms_security_options & right);
00077 #endif
00078         void copyFrom(const ms_security_options * right);
00079 
00081         bool isSecurityEnabled() const;
00082 
00084         void setSecurityEnabled(bool newVal);
00085 
00087         time_t getSessionTimeout() const;
00088 
00090         void setSessionTimeout(time_t newVal);
00091 
00093         time_t getDefaultPasswordExpiryTime() const;
00094 
00096         void setDefaultPasswordExpiryTime(time_t newVal);
00097 
00099         unsigned int getMinimumPasswordLength() const;
00100 
00102         void setMinimumPasswordLength(unsigned int newVal);
00103 
00105         bool getUseSessionCookies() const;
00106 
00108         void setUseSessionCookies(bool newVal);
00109 
00111         bool getVerifySessionIPAddress() const;
00112 
00114         void setVerifySessionIPAddress(bool newVal);
00115 
00117         matrix_science::ms_errs::msg_sev getLoggingLevel() const;
00118 
00120         void setLoggingLevel(ms_errs::msg_sev newVal);
00121 
00123         std::string getIntegraAppServerURL() const;
00124 
00126         void setIntegraAppServerURL(std::string newVal);
00127 
00129         std::string getIntegraDatabaseName() const;
00130 
00132         void setIntegraDatabaseName(std::string newVal);
00133 
00135         std::string getIntegraOracleServerName() const;
00136 
00138         void setIntegraOracleServerName(std::string newVal);
00139 
00141         std::string getLogFileName();
00142 
00144         void setLogFileName(std::string newVal);
00145 
00146     protected:
00147         bool loadFromFile();
00148         bool saveToFile();
00149 
00150     private:
00151         std::string filename_;
00152 
00153         bool securityEnabled_;
00154         time_t sessionTimeout_;
00155         time_t defaultPasswordExpiryTime_;
00156         unsigned int minimumPasswordLength_;
00157         bool useSessionCookies_;
00158         bool verifySessionIPAddress_;
00159         ms_errs::msg_sev logLevel_;
00160         std::string logFile_;
00161         std::string integraAppServerURL_;
00162         std::string integraDatabaseName_;
00163         std::string integraOracleServerName_;
00164     }; // end of security_group 
00166 
00167 }
00168 #endif // !defined(ms_security_options_INCLUDED_)
Copyright © 2016 Matrix Science Ltd.  All Rights Reserved. Generated on Fri Jun 2 2017 01:44:51