C++/CLI Sample
Demonstrates how to create a C++/CLI library using the VideoXpert SDK
CPPCli::License Class Reference

The License class represents license information for the resource that owns this resource. More...

#include <License.h>

Public Types

enum  SystemLicenseTypes {
  SystemLicenseTypes::Unknown,
  SystemLicenseTypes::Enterprise,
  SystemLicenseTypes::Ultimate,
  SystemLicenseTypes::Unlicensed
}
 Values that represent the types of system licenses. More...
 

Public Member Functions

 License (VxSdk::IVxLicense *vxLicense)
 Constructor. More...
 
virtual ~License ()
 Destructor. More...
 
 !License ()
 Finaliser. More...
 

Package Functions

System::Collections::Generic::List< LicenseFeature^ >^ _GetLicenseFeatures ()
 

Package Attributes

VxSdk::IVxLicense_license
 

Properties

System::String^  CompanyName [get]
 Gets the friendly name of the owning company/organization. More...
 
System::Collections::Generic::List< LicenseFeature^ >^ LicenseFeatures [get]
 Gets the features this license contains. More...
 
SystemLicenseTypes SystemLicenseType [get]
 Gets the type of system that this license is applied to. More...
 

Detailed Description

The License class represents license information for the resource that owns this resource.

Definition at line 14 of file License.h.

Member Enumeration Documentation

Values that represent the types of system licenses.

Enumerator
Unknown 

An error or unknown value was returned.

Enterprise 

Enterprise system license.

Ultimate 

Ultimate system license.

Unlicensed 

Unlicensed system.

Definition at line 20 of file License.h.

20  {
22  Unknown,
23 
25  Enterprise,
26 
28  Ultimate,
29 
31  Unlicensed
32  };

Constructor & Destructor Documentation

CPPCli::License::License ( VxSdk::IVxLicense vxLicense)

Constructor.

Parameters
vxLicenseThe vx license.

Definition at line 8 of file License.cpp.

8  {
9  _license = vxLicense;
10 }
VxSdk::IVxLicense * _license
Definition: License.h:80
virtual CPPCli::License::~License ( )
inlinevirtual

Destructor.

Definition at line 43 of file License.h.

43  {
44  this->!License();
45  }
License(VxSdk::IVxLicense *vxLicense)
Constructor.
Definition: License.cpp:8
CPPCli::License::!License ( )

Finaliser.

Definition at line 12 of file License.cpp.

12  {
13  _license->Delete();
14  _license = nullptr;
15 }
virtual VxResult::Value Delete() const =0
VxSdk::IVxLicense * _license
Definition: License.h:80

Member Function Documentation

List< CPPCli::LicenseFeature^ > CPPCli::License::_GetLicenseFeatures ( )
package

Definition at line 17 of file License.cpp.

17  {
18  // Create a list of managed license feature objects
19  List<CPPCli::LicenseFeature^>^ mlist = gcnew List<CPPCli::LicenseFeature^>();
20  // Create a collection of unmanaged license feature objects
22 
23  // Make the GetLicenseFeatures call, which will return with the total count of license features, this allows the client to allocate memory.
24  VxSdk::VxResult::Value result = _license->GetLicenseFeatures(licenseFeatures);
25  // Unless there are no license features on the system, this should return VxSdk::VxResult::kInsufficientSize
26  if (result == VxSdk::VxResult::kInsufficientSize) {
27  // An array of pointers is allocated using the size returned by the previous GetLicenseFeatures call
28  licenseFeatures.collection = new VxSdk::IVxLicenseFeature*[licenseFeatures.collectionSize];
29  result = _license->GetLicenseFeatures(licenseFeatures);
30  // The result should now be kOK since we have allocated enough space
31  if (result == VxSdk::VxResult::kOK) {
32  for (int i = 0; i < licenseFeatures.collectionSize; i++)
33  mlist->Add(gcnew CPPCli::LicenseFeature(licenseFeatures.collection[i]));
34  }
35  // Remove the memory we previously allocated to the collection
36  delete[] licenseFeatures.collection;
37  }
38  return mlist;
39 }
The LicenseFeature class represents device functionality that is enabled with a valid license...
VxSdk::IVxLicense * _license
Definition: License.h:80
virtual VxResult::Value GetLicenseFeatures(VxCollection< IVxLicenseFeature ** > &licenseFeatureCollection) const =0

Member Data Documentation

VxSdk::IVxLicense* CPPCli::License::_license
package

Definition at line 80 of file License.h.

Property Documentation

System:: String^ CPPCli::License::CompanyName
get

Gets the friendly name of the owning company/organization.

The friendly name of the owning company/organization.

Definition at line 56 of file License.h.

System:: Collections:: Generic:: List< LicenseFeature^>^ CPPCli::License::LicenseFeatures
get

Gets the features this license contains.

A List of license features.

Definition at line 65 of file License.h.

SystemLicenseTypes CPPCli::License::SystemLicenseType
get

Gets the type of system that this license is applied to.

The system license Type.

Definition at line 74 of file License.h.


The documentation for this class was generated from the following files: