open-license-manager
2014-04-13 5b35fd450ef78c3be506ca3fc22c3f431ae5e562
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef LICENSEPP_H_
#define LICENSEPP_H_
 
/*
 * This include file is the public api di License++
 * You should include this file if your software don't plan to use
 * the part of the library dealing with features.
 * Otherwise licensepp-features.h should be included.
 */
#ifdef __cplusplus
extern "C" {
#endif
 
#ifdef __unix__
#define DllExport
#define MAX_PATH 1024
#else
#include <windows.h>
#define DllExport  __declspec( dllexport )
#endif
 
#include "datatypes.h"
 
/*
 * Method used to convert the LicenseInfo into a human readable
 * representation.
 */
DllExport void print_error(char out_buffer[256], LicenseInfo* licenseInfo);
 
/**
 * This method calculate the pc identifier. The string has to be shown
 * to the user in order to calculate the license.
 */
void identify_pc(IDENTIFICATION_STRATEGY pc_id_method,
        char chbuffer[PC_IDENTIFIER_SIZE + 1]);
/*
 * The optional parameter License contains the information the program that uses the library
 * should display:
 *
 * @return true if successful. False if there are errors.
 * @param licenseLocation[in] licenseLocation, either the name of the file
 *                                 or the name of the environment variable should be !='\0'
 * @param license[out] optional, can be NULL.
 */
 
DllExport EVENT_TYPE acquire_license(char * productName,
        LicenseLocation licenseLocation, LicenseInfo* license);
 
/**
 * Do nothing for now, useful for network licenses.
 * Should be called from time to time to confirm we're still using the
 * slicense.
 */
DllExport enum EVENT_TYPE confirm_license(char * productName,
        LicenseLocation licenseLocation);
/**
 * Do nothing for now, useful for network licenses.
 */
DllExport enum EVENT_TYPE release_license(char * productName,
        LicenseLocation licenseLocation);
 
#ifdef __cplusplus
}
#endif
 
#endif