1 /***********************************************************************/
2 /* Open Visualization Data Explorer                                    */
3 /* (C) Copyright IBM Corp. 1989,1999                                   */
4 /* ALL RIGHTS RESERVED                                                 */
5 /* This code licensed under the                                        */
6 /*    "IBM PUBLIC LICENSE - Open Visualization Data Explorer"          */
7 /***********************************************************************/
8 
9 #include <dxconfig.h>
10 #include "../base/defines.h"
11 
12 
13 #ifndef _TMP_LIC_
14 #define _TMP_LIC_
15 
16 #if !defined(DXD_OS_NON_UNIX)
17 
18 #include "License.h"
19 
20 #define KEY1 "a9"
21 #define KEY2 "Pp"
22 #define XOR_KEY 0x12345678
23 
24 #define PROGVER  "3.1"   /* version of expire program */
25 
26 #define ANYWHERE_HOSTID "00000000"
27 
28 enum Arkh { UNKNOWN, ANY, UNIX, IBM6000, HP700, SUN4, SOLARIS, SGI, AVIION, ALPHA, WINTEL, WINNT, WIN95 };
29 enum DxType { UP, SMP };
30 enum LicType { TRIAL, BETA, NODELOCKED, FLOATING };
31 
32 
33 class TemporaryLicense {
34   private:
35     char* dxui_args;
36     boolean limited_use;
37 
38     void setDxuiArgs(const char* );
39 
40   protected:
41     void determineUILicense (LicenseTypeEnum*,LicenseTypeEnum*);
42     void initialize();
TemporaryLicense()43     TemporaryLicense(){
44 	this->dxui_args = NUL(char*);
45 	this->limited_use = FALSE;
46     };
~TemporaryLicense()47     ~TemporaryLicense(){
48 	if (this->dxui_args) delete this->dxui_args;
49     };
50     virtual const char* getRootDir() = 0;
51 
52     const char* getLimitedArgs();
53 
54   public:
55     static const char* MakeKey(enum Arkh , char *, int , int , time_t *, enum DxType );
getDxuiArgs()56     const char* getDxuiArgs() { return this->dxui_args; }
isLimitedUse()57     boolean isLimitedUse() { return this->limited_use; }
58 };
59 
60 #endif
61 #endif
62