|
1 | | -#ifndef __NETLICENSING_H__ |
2 | | -#define __NETLICENSING_H__ |
3 | | - |
4 | | -#include "netlicensing/context.h" |
5 | | -#include "netlicensing/service.h" |
6 | | -#include "netlicensing/product.h" |
7 | | -#include "netlicensing/licensee.h" |
8 | | -#include "netlicensing/exception.h" |
9 | | -#include "netlicensing/validation_result.h" |
10 | | -#include "netlicensing/validation_parameters.h" |
11 | | - |
12 | | -#ifdef __GNUC__ |
13 | | - #define DEPRECATED(decl) decl __attribute__ ((deprecated)) |
14 | | -#elif defined(_MSC_VER) |
15 | | - #define DEPRECATED(decl) __declspec(deprecated) decl |
16 | | -#else |
17 | | - #pragma message("WARNING: DEPRECATED declaration for this compiler is not defined") |
18 | | - #define DEPRECATED(decl) decl |
19 | | -#endif |
20 | | - |
21 | | -namespace netlicensing { |
22 | | - |
23 | | -class ProductService { |
24 | | - public: |
25 | | - static Product create(Context& ctx, const Product&); |
26 | | - static Product update(Context& ctx, const std::string& productNumber, const Product&); |
27 | | - static void del(Context& ctx, const std::string& productNumber, bool forceCascade); |
28 | | - static std::list<Product> list(Context& ctx, const std::string& filter); |
29 | | -}; |
30 | | - |
31 | | -class LicenseeService { |
32 | | - public: |
33 | | - static Licensee create(Context& ctx, const Licensee&); |
34 | | - static Licensee update(Context& ctx, const std::string& licenseeNumber, const Licensee&); |
35 | | - static void del(Context& ctx, const std::string& licenseeNumber, bool forceCascade); |
36 | | - static std::list<Licensee> list(Context& ctx, const std::string& filter); |
37 | | - DEPRECATED(static ValidationResult validate(Context& ctx, const std::string& licenseeNumber, |
38 | | - const std::string& productNumber = std::string(), |
39 | | - const std::string& licenseeName = std::string(), |
40 | | - const parameters_type& validationParameters = parameters_type())); |
41 | | - static ValidationResult validate(Context& ctx, const std::string& licenseeNumber, |
42 | | - const ValidationParameters& validationParameters); |
43 | | - static void transfer(Context& ctx, const std::string& licenseeNumber, const std::string& sourceLicenseeNumber); |
44 | | -}; |
45 | | - |
46 | | - |
47 | | -} |
48 | | - |
49 | | -#endif //__NETLICENSING_H__ |
| 1 | +#ifndef __NETLICENSING_H__ |
| 2 | +#define __NETLICENSING_H__ |
| 3 | + |
| 4 | +#include "netlicensing/context.h" |
| 5 | +#include "netlicensing/service.h" |
| 6 | +#include "netlicensing/product.h" |
| 7 | +#include "netlicensing/licensee.h" |
| 8 | +#include "netlicensing/exception.h" |
| 9 | +#include "netlicensing/validation_result.h" |
| 10 | +#include "netlicensing/validation_parameters.h" |
| 11 | + |
| 12 | +#ifdef __GNUC__ |
| 13 | + #define DEPRECATED(decl) decl __attribute__ ((deprecated)) |
| 14 | +#elif defined(_MSC_VER) |
| 15 | + #define DEPRECATED(decl) __declspec(deprecated) decl |
| 16 | +#else |
| 17 | + #pragma message("WARNING: DEPRECATED declaration for this compiler is not defined") |
| 18 | + #define DEPRECATED(decl) decl |
| 19 | +#endif |
| 20 | + |
| 21 | +namespace netlicensing { |
| 22 | + |
| 23 | +class ProductService { |
| 24 | + public: |
| 25 | + static Product create(Context& ctx, const Product&); |
| 26 | + static Product update(Context& ctx, const std::string& productNumber, const Product&); |
| 27 | + static void del(Context& ctx, const std::string& productNumber, bool forceCascade); |
| 28 | + static std::list<Product> list(Context& ctx, const std::string& filter); |
| 29 | +}; |
| 30 | + |
| 31 | +class LicenseeService { |
| 32 | + public: |
| 33 | + static Licensee create(Context& ctx, const Licensee&); |
| 34 | + static Licensee update(Context& ctx, const std::string& licenseeNumber, const Licensee&); |
| 35 | + static void del(Context& ctx, const std::string& licenseeNumber, bool forceCascade); |
| 36 | + static std::list<Licensee> list(Context& ctx, const std::string& filter); |
| 37 | + DEPRECATED(static ValidationResult validate(Context& ctx, const std::string& licenseeNumber, |
| 38 | + const std::string& productNumber = std::string(), |
| 39 | + const std::string& licenseeName = std::string(), |
| 40 | + const parameters_type& validationParameters = parameters_type())); |
| 41 | + static ValidationResult validate(Context& ctx, const std::string& licenseeNumber, |
| 42 | + const ValidationParameters& validationParameters); |
| 43 | + static void transfer(Context& ctx, const std::string& licenseeNumber, const std::string& sourceLicenseeNumber); |
| 44 | +}; |
| 45 | + |
| 46 | + |
| 47 | +} |
| 48 | + |
| 49 | +#endif //__NETLICENSING_H__ |
0 commit comments