ai_license.h
1 /*
2  * Arnold API header file
3  * Copyright (c) 1998-2009 Marcos Fajardo, (c) 2009-2013 Solid Angle SL
4  */
5 
11 #pragma once
12 #include "ai_api.h"
13 
18 #ifndef HOST_NAME_MAX
19 #ifdef _POSIX_HOST_NAME_MAX
20 #define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
21 #else
22 #define HOST_NAME_MAX 64
23 #endif
24 #endif
25 
27 typedef struct AtLicenseInfo {
28  bool used;
29  char name[64];
30  char ver[64];
31  char exp[64];
32  char options[64];
33  int count;
36  int hbased;
37  int hold;
38  int max_roam;
39  int max_share;
40  int min_remove;
43  int nres;
45  int roaming;
46  int share;
47  int soft_limit;
48  int thisroam;
49  int timeout;
50  int tz;
51  int tokens;
52  int type;
53  int ubased;
55 
59 #define AI_LIC_SUCCESS 0
60 #define AI_LIC_ERROR_CANTCONNECT 1
61 #define AI_LIC_ERROR_INIT 2
62 #define AI_LIC_ERROR_NOTFOUND 3
63 #define AI_LIC_ERROR_NOTAVAILABLE 4
64 #define AI_LIC_ERROR -1
65 /*\}*/
66 
67 AI_API bool AiLicenseSetServer(const char* host, unsigned int port);
68 AI_API bool AiLicenseGetServer(char* host, unsigned int& port);
69 AI_API void AiLicenseSetAttempts(int attempts);
70 AI_API unsigned int AiLicenseGetAttempts();
71 AI_API void AiLicenseSetAttemptDelay(int msecs);
72 AI_API unsigned int AiLicenseGetAttemptDelay();
73 AI_API int AiLicenseGetInfo(AtLicenseInfo*& licenses, unsigned int& n);
74 
75 /*\}*/

© 2009-2013 Solid Angle SL · all rights reserved · www.solidangle.com