Main Page | Modules | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages | Search

vvLicenseClient.h

Go to the documentation of this file.
00001 
00002 //
00003 //  vvLicenseClient.h: Interface for class vvLicenseClient
00004 //
00005 //  Copyright (c) 2003, Vividata. All Rights Reserved
00006 //
00007 //  Code in this file written by Tim Mensch
00008 //
00010 
00011 #ifndef ___w_tim_vvdevel_include_vvutil_vvLicenseClient_h__
00012 #define ___w_tim_vvdevel_include_vvutil_vvLicenseClient_h__
00013 
00014 #define VV_LICENSE_PORT 10102
00015 #define VV_LICENSE_PORT_STRING VV_LICENSE_PORT
00016 enum 
00017 {
00018     vvLicensePort = VV_LICENSE_PORT
00019 } ;
00020 
00021 enum vvlicStatus 
00022 {
00023     VVLIC_OK,
00024     VVLIC_ERR_NO_LICENSE=2000,      
00025     VVLIC_ERR_NO_FEATURE,           
00026     VVLIC_ERR_NO_LICENSE_MANAGER,   
00027     VVLIC_ERR_COMMUNICATION,        
00028     VVLIC_ERR_MISC=-1               
00029 };
00030 #ifndef __cplusplus
00031 typedef enum vvlicStatus vvlicStatus ;
00032 #endif
00033 
00034 #ifdef __cplusplus
00035 class vvLicenseClient
00036 {
00037 public:
00038 
00039     vvLicenseClient();
00040     ~vvLicenseClient();
00041     
00042     bool HaveLicense() { return m_ownLicense; };
00043     void SigHUP();
00044 
00050     vvlicStatus Checkin();
00051     
00057     vvlicStatus Checkout();
00058 
00067     vvlicStatus CheckLicenseManager();
00068 
00075     virtual class vvLicenseManager * NewLicenseManager()=0;
00076     
00082     virtual vvlicStatus TestFeatures() { return VVLIC_OK; };
00083     
00091     bool GetFlag(int flag) { if (m_licenseFlags) return m_licenseFlags[flag]=='1'; else return false ; }
00092 private:
00093     bool m_ownLicense;
00094     char * m_licenseFlags;
00095 
00096     class vvLicenseManager * m_licenseManager ;
00097 };
00098 
00099 #endif // __cplusplus
00100 
00101 #endif // ___w_tim_vvdevel_include_vvutil_vvLicenseClient_h__
00102 

Generated on Thu Dec 11 09:32:13 2003 for OCR Shop XTR/API User Documentation by doxygen 1.3.2