UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
hlsl_public.h
1 /* hlsl_public.h */
2 /* $Id: hlsl_public.h,v 1.13 2007/08/30 07:03:47 ibadm Exp $ */
3 
4 /*********************************************************************
5  *
6  * UNIVERS
7  * (C) ООО "ГЕОВЕРС", 2001
8  *
9  * Все права защищены * * Использование, копирование или передача регулируются законами * Российской Федерации "Об авторском праве и смежных правах", "О * правовой охране программ для электронных вычислительных машин и баз * данных" * * Encoding: ISO-8859-5 (GOST) * *********************************************************************/ #ifndef __hlsl_public_h #define __hlsl_public_h /*********************************************************************** * * HLSL - Hard lock software licensing * * Public interfaces * ***********************************************************************/ #include <mix/Types.h> /*********************************************************************** * Maximum number of supported CPU in SMP system. */ #define HLSL_MAX_CPU_NUMBER 4 /*********************************************************************** * Name of license file name without full or partial path. */ #define HLSL_LICNUM_FILE_NAME "license.num" /*********************************************************************** * Product information ids. (0x80) is not used as normal id! */ #define HLSL_PRODUCT_UBP (0) #define HLSL_PRODUCT_UHC (1) #define HLSL_PRODUCT_UFP (2) #define HLSL_PRODUCT_UDDR (3) /*********************************************************************** * Date structure. */ typedef struct { int day; /* 1..31 */ int month; /* 1..12 */ int year; /* 1999, 2000, 2001, ... */ } hlsl_date_t; /*********************************************************************** * Session as a user+workplace pair. */ typedef struct hlsl_session_info_tag { struct hlsl_session_info_tag *next; char *user; char *workplace; } hlsl_session_info_t; /*********************************************************************** * Public license data. */ typedef struct { int product; /* product id information */ int key_serial; /* expected key serial number or 0 */ int lic_serial; /* serial number of license */ unsigned cpu_id[HLSL_MAX_CPU_NUMBER];/* non-used slots are zeroed */ int max_users; /* 0 means "non-limited" */ hlsl_date_t start; /* start date of license */ hlsl_date_t expir; /* expiration date of license */ hlsl_date_t build; /* build date of the program */ } hlsl_license_t; /*********************************************************************** * Hide public names from cracker. */ #define hlsl_check_license hlsl1 #define hlsl_get_license_info hlsl2 #define hlsl_hard_key_presence hlsl3 #define hlsl_list_sessions hlsl4 #define hlsl_get_product_name hlsl5 #define hlsl_set_product_id hlsl6 #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /*********************************************************************** * Main license-checking function. Returns control to calling code * only if license is valid. ***********************************************************************/ void hlsl_check_license (); /*********************************************************************** * Get license conditions. ***********************************************************************/ int hlsl_get_license_info (hlsl_license_t* p_lic_info); /*********************************************************************** * Check for hard key is plugged in computer. ***********************************************************************/ ErrCode hlsl_hard_key_presence (); /*********************************************************************** * Get list of active sessions (pHead) and pointer at this session * description if it's found or NULL if not found. ***********************************************************************/ ErrCode hlsl_list_sessions (hlsl_session_info_t** pHead, hlsl_session_info_t** pThis, const char* szWorkplace); /*********************************************************************** * Convert product mask to product string (dynamically allocated). * Returned NULL means absence of product bits in given product mask. ***********************************************************************/ char* hlsl_get_product_name (int product); /*********************************************************************** * Set product id in case of it does not equal to default one. ***********************************************************************/ void hlsl_set_product_id (int product_id); #ifdef __cplusplus }; #endif /* __cplusplus */ #endif /* hlsl_public.h */
10  *
11  * Использование, копирование или передача регулируются законами
12  * Российской Федерации "Об авторском праве и смежных правах", "О * правовой охране программ для электронных вычислительных машин и баз * данных" * * Encoding: ISO-8859-5 (GOST) * *********************************************************************/ #ifndef __hlsl_public_h #define __hlsl_public_h /*********************************************************************** * * HLSL - Hard lock software licensing * * Public interfaces * ***********************************************************************/ #include <mix/Types.h> /*********************************************************************** * Maximum number of supported CPU in SMP system. */ #define HLSL_MAX_CPU_NUMBER 4 /*********************************************************************** * Name of license file name without full or partial path. */ #define HLSL_LICNUM_FILE_NAME "license.num" /*********************************************************************** * Product information ids. (0x80) is not used as normal id! */ #define HLSL_PRODUCT_UBP (0) #define HLSL_PRODUCT_UHC (1) #define HLSL_PRODUCT_UFP (2) #define HLSL_PRODUCT_UDDR (3) /*********************************************************************** * Date structure. */ typedef struct { int day; /* 1..31 */ int month; /* 1..12 */ int year; /* 1999, 2000, 2001, ... */ } hlsl_date_t; /*********************************************************************** * Session as a user+workplace pair. */ typedef struct hlsl_session_info_tag { struct hlsl_session_info_tag *next; char *user; char *workplace; } hlsl_session_info_t; /*********************************************************************** * Public license data. */ typedef struct { int product; /* product id information */ int key_serial; /* expected key serial number or 0 */ int lic_serial; /* serial number of license */ unsigned cpu_id[HLSL_MAX_CPU_NUMBER];/* non-used slots are zeroed */ int max_users; /* 0 means "non-limited" */ hlsl_date_t start; /* start date of license */ hlsl_date_t expir; /* expiration date of license */ hlsl_date_t build; /* build date of the program */ } hlsl_license_t; /*********************************************************************** * Hide public names from cracker. */ #define hlsl_check_license hlsl1 #define hlsl_get_license_info hlsl2 #define hlsl_hard_key_presence hlsl3 #define hlsl_list_sessions hlsl4 #define hlsl_get_product_name hlsl5 #define hlsl_set_product_id hlsl6 #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /*********************************************************************** * Main license-checking function. Returns control to calling code * only if license is valid. ***********************************************************************/ void hlsl_check_license (); /*********************************************************************** * Get license conditions. ***********************************************************************/ int hlsl_get_license_info (hlsl_license_t* p_lic_info); /*********************************************************************** * Check for hard key is plugged in computer. ***********************************************************************/ ErrCode hlsl_hard_key_presence (); /*********************************************************************** * Get list of active sessions (pHead) and pointer at this session * description if it's found or NULL if not found. ***********************************************************************/ ErrCode hlsl_list_sessions (hlsl_session_info_t** pHead, hlsl_session_info_t** pThis, const char* szWorkplace); /*********************************************************************** * Convert product mask to product string (dynamically allocated). * Returned NULL means absence of product bits in given product mask. ***********************************************************************/ char* hlsl_get_product_name (int product); /*********************************************************************** * Set product id in case of it does not equal to default one. ***********************************************************************/ void hlsl_set_product_id (int product_id); #ifdef __cplusplus }; #endif /* __cplusplus */ #endif /* hlsl_public.h */
13  * правовой охране программ для электронных вычислительных машин и баз * данных" * * Encoding: ISO-8859-5 (GOST) * *********************************************************************/ #ifndef __hlsl_public_h #define __hlsl_public_h /*********************************************************************** * * HLSL - Hard lock software licensing * * Public interfaces * ***********************************************************************/ #include <mix/Types.h> /*********************************************************************** * Maximum number of supported CPU in SMP system. */ #define HLSL_MAX_CPU_NUMBER 4 /*********************************************************************** * Name of license file name without full or partial path. */ #define HLSL_LICNUM_FILE_NAME "license.num" /*********************************************************************** * Product information ids. (0x80) is not used as normal id! */ #define HLSL_PRODUCT_UBP (0) #define HLSL_PRODUCT_UHC (1) #define HLSL_PRODUCT_UFP (2) #define HLSL_PRODUCT_UDDR (3) /*********************************************************************** * Date structure. */ typedef struct { int day; /* 1..31 */ int month; /* 1..12 */ int year; /* 1999, 2000, 2001, ... */ } hlsl_date_t; /*********************************************************************** * Session as a user+workplace pair. */ typedef struct hlsl_session_info_tag { struct hlsl_session_info_tag *next; char *user; char *workplace; } hlsl_session_info_t; /*********************************************************************** * Public license data. */ typedef struct { int product; /* product id information */ int key_serial; /* expected key serial number or 0 */ int lic_serial; /* serial number of license */ unsigned cpu_id[HLSL_MAX_CPU_NUMBER];/* non-used slots are zeroed */ int max_users; /* 0 means "non-limited" */ hlsl_date_t start; /* start date of license */ hlsl_date_t expir; /* expiration date of license */ hlsl_date_t build; /* build date of the program */ } hlsl_license_t; /*********************************************************************** * Hide public names from cracker. */ #define hlsl_check_license hlsl1 #define hlsl_get_license_info hlsl2 #define hlsl_hard_key_presence hlsl3 #define hlsl_list_sessions hlsl4 #define hlsl_get_product_name hlsl5 #define hlsl_set_product_id hlsl6 #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /*********************************************************************** * Main license-checking function. Returns control to calling code * only if license is valid. ***********************************************************************/ void hlsl_check_license (); /*********************************************************************** * Get license conditions. ***********************************************************************/ int hlsl_get_license_info (hlsl_license_t* p_lic_info); /*********************************************************************** * Check for hard key is plugged in computer. ***********************************************************************/ ErrCode hlsl_hard_key_presence (); /*********************************************************************** * Get list of active sessions (pHead) and pointer at this session * description if it's found or NULL if not found. ***********************************************************************/ ErrCode hlsl_list_sessions (hlsl_session_info_t** pHead, hlsl_session_info_t** pThis, const char* szWorkplace); /*********************************************************************** * Convert product mask to product string (dynamically allocated). * Returned NULL means absence of product bits in given product mask. ***********************************************************************/ char* hlsl_get_product_name (int product); /*********************************************************************** * Set product id in case of it does not equal to default one. ***********************************************************************/ void hlsl_set_product_id (int product_id); #ifdef __cplusplus }; #endif /* __cplusplus */ #endif /* hlsl_public.h */
14  * данных"
15  *
16  * Encoding: ISO-8859-5 (GOST)
17  *
18  *********************************************************************/
19 
20 #ifndef __hlsl_public_h
21 #define __hlsl_public_h
22 
23 /***********************************************************************
24  *
25  * HLSL - Hard lock software licensing
26  *
27  * Public interfaces
28  *
29  ***********************************************************************/
30 
31 #include <mix/Types.h>
32 
33 
34 /***********************************************************************
35  * Maximum number of supported CPU in SMP system.
36  */
37 #define HLSL_MAX_CPU_NUMBER 4
38 
39 /***********************************************************************
40  * Name of license file name without full or partial path.
41  */
42 #define HLSL_LICNUM_FILE_NAME "license.num"
43 
44 
45 /***********************************************************************
46  * Product information ids. (0x80) is not used as normal id!
47  */
48 #define HLSL_PRODUCT_UBP (0)
49 #define HLSL_PRODUCT_UHC (1)
50 #define HLSL_PRODUCT_UFP (2)
51 #define HLSL_PRODUCT_UDDR (3)
52 
53 
54 /***********************************************************************
55  * Date structure.
56  */
57 typedef struct
58 {
59  int day; /* 1..31 */
60  int month; /* 1..12 */
61  int year; /* 1999, 2000, 2001, ... */
62 
63 } hlsl_date_t;
64 
65 
66 /***********************************************************************
67  * Session as a user+workplace pair.
68  */
69 typedef struct hlsl_session_info_tag
70 {
71  struct hlsl_session_info_tag *next;
72  char *user;
73  char *workplace;
74 
76 
77 
78 /***********************************************************************
79  * Public license data.
80  */
81 typedef struct
82 {
83  int product; /* product id information */
84  int key_serial; /* expected key serial number or 0 */
85  int lic_serial; /* serial number of license */
86  unsigned cpu_id[HLSL_MAX_CPU_NUMBER];/* non-used slots are zeroed */
87  int max_users; /* 0 means "non-limited" */
88  hlsl_date_t start; /* start date of license */
89  hlsl_date_t expir; /* expiration date of license */
90  hlsl_date_t build; /* build date of the program */
91 
93 
94 
95 /***********************************************************************
96  * Hide public names from cracker.
97  */
98 #define hlsl_check_license hlsl1
99 #define hlsl_get_license_info hlsl2
100 #define hlsl_hard_key_presence hlsl3
101 #define hlsl_list_sessions hlsl4
102 #define hlsl_get_product_name hlsl5
103 #define hlsl_set_product_id hlsl6
104 
105 
106 #ifdef __cplusplus
107 extern "C" {
108 #endif /* __cplusplus */
109 
110 
111 /***********************************************************************
112  * Main license-checking function. Returns control to calling code
113  * only if license is valid.
114  ***********************************************************************/
115 void hlsl_check_license ();
116 
117 
118 /***********************************************************************
119  * Get license conditions.
120  ***********************************************************************/
121 int hlsl_get_license_info (hlsl_license_t* p_lic_info);
122 
123 
124 /***********************************************************************
125  * Check for hard key is plugged in computer.
126  ***********************************************************************/
127 ErrCode hlsl_hard_key_presence ();
128 
129 
130 /***********************************************************************
131  * Get list of active sessions (pHead) and pointer at this session
132  * description if it's found or NULL if not found.
133  ***********************************************************************/
134 ErrCode hlsl_list_sessions (hlsl_session_info_t** pHead,
135  hlsl_session_info_t** pThis,
136  const char* szWorkplace);
137 
138 
139 /***********************************************************************
140  * Convert product mask to product string (dynamically allocated).
141  * Returned NULL means absence of product bits in given product mask.
142  ***********************************************************************/
143 char* hlsl_get_product_name (int product);
144 
145 /***********************************************************************
146  * Set product id in case of it does not equal to default one.
147  ***********************************************************************/
148 void hlsl_set_product_id (int product_id);
149 
150 
151 #ifdef __cplusplus
152 };
153 #endif /* __cplusplus */
154 
155 
156 #endif /* hlsl_public.h */
Definition: hlsl_public.h:81
Definition: hlsl_public.h:57
Definition: hlsl_public.h:69