ImagingTools Core SDK
Public Member Functions | List of all members
imtlic::IProductInstanceInfoabstract

#include <IProductInstanceInfo.h>

Inheritance diagram for imtlic::IProductInstanceInfo:
imtlic::ILicenseInstanceProvider imtlic::CProductInstanceInfo imtlic::CLicensedHardwareInstanceInfo imtlic::CProductInstanceInfoComp

Public Member Functions

virtual const imtbase::IObjectCollectionGetProductDatabase () const =0
 
virtual const imtbase::IObjectCollectionGetCustomerDatabase () const =0
 
virtual void SetupProductInstance (const QByteArray &productId, const QByteArray &instanceId, const QByteArray &customerId)=0
 
virtual void AddLicense (const QByteArray &licenseId, const QDateTime &expirationDate=QDateTime())=0
 
virtual void RemoveLicense (const QByteArray &licenseId)=0
 
virtual void ClearLicenses ()=0
 
virtual QByteArray GetProductInstanceId () const =0
 
virtual void SetProductInstanceId (const QByteArray &instanceId)=0
 
virtual QByteArray GetProductId () const =0
 
virtual QByteArray GetCustomerId () const =0
 
virtual QByteArray GetSerialNumber () const =0
 
virtual void SetSerialNumber (const QByteArray &serialNumber)=0
 
virtual QByteArray GetProject () const =0
 
virtual void SetProject (const QByteArray &project)=0
 
virtual bool IsInUse () const =0
 
virtual void SetInUse (bool inUse)=0
 
virtual bool IsInternalUse () const =0
 
virtual void SetInternalUse (bool internalUse)=0
 
virtual bool IsMultiProduct () const =0
 
virtual void SetMultiProduct (bool isMulti)=0
 
virtual int GetProductCount () const =0
 
virtual void SetProductCount (int count)=0
 
virtual QByteArray GetParentInstanceId () const =0
 
virtual void SetParentInstanceId (const QByteArray &parentInstanceId)=0
 
- Public Member Functions inherited from imtlic::ILicenseInstanceProvider
virtual const imtbase::ICollectionInfoGetLicenseInstances () const =0
 
virtual const ILicenseInstanceGetLicenseInstance (const QByteArray &licenseId) const =0
 

Detailed Description

Interface for a product instance.

A Product Instance is created when a product is sold, installed, or deployed to a customer. It represents a specific installation of a product and contains:

The Product Instance acts as a provider of actually available licenses for this specific installation. It maintains which licenses have been purchased and activated, but does not perform license validation logic at this level - it provides an overview of registered licenses in the product installation.

Key responsibilities:

See also
IProductInfo, ILicenseInstance, ILicenseInstanceProvider

Definition at line 54 of file IProductInstanceInfo.h.

Member Function Documentation

◆ AddLicense()

virtual void imtlic::IProductInstanceInfo::AddLicense ( const QByteArray &  licenseId,
const QDateTime &  expirationDate = QDateTime() 
)
pure virtual

Add an activated license to this product instance.

Parameters
licenseIdID of the license to activate (must exist in the product's license definitions)
expirationDateOptional expiration date for the license (invalid QDateTime means no expiration)
Note
Full license information is managed by IProductLicensingInfo; the license ID serves as a reference
See also
IProductLicensingInfo

◆ ClearLicenses()

virtual void imtlic::IProductInstanceInfo::ClearLicenses ( )
pure virtual

Remove all activated licenses from this product instance.

◆ GetCustomerDatabase()

virtual const imtbase::IObjectCollection * imtlic::IProductInstanceInfo::GetCustomerDatabase ( ) const
pure virtual

Get access to the customer database. The customer database contains information about all customers.

Returns
Pointer to the customer database collection

◆ GetCustomerId()

virtual QByteArray imtlic::IProductInstanceInfo::GetCustomerId ( ) const
pure virtual

Get the ID of the customer who owns this product instance. Use this ID to look up additional customer information in the customer database.

Returns
Customer ID
See also
GetCustomerDatabase

◆ GetParentInstanceId()

virtual QByteArray imtlic::IProductInstanceInfo::GetParentInstanceId ( ) const
pure virtual

Get the ID of the parent product instance. For multi-product instances that distribute licenses to other accounts, this references the parent instance that owns the original licenses.

Returns
Parent instance ID, or empty if this is a root instance

◆ GetProductCount()

virtual int imtlic::IProductInstanceInfo::GetProductCount ( ) const
pure virtual

Get the count of items in this product instance. Valid only if IsMultiProduct() returns true.

◆ GetProductDatabase()

virtual const imtbase::IObjectCollection * imtlic::IProductInstanceInfo::GetProductDatabase ( ) const
pure virtual

Get access to the product database. The product database contains definitions of all available products.

Returns
Pointer to the product database collection

◆ GetProductId()

virtual QByteArray imtlic::IProductInstanceInfo::GetProductId ( ) const
pure virtual

Get the ID of the product that this is an instance of. Use this ID to look up additional product information in the product database.

Returns
Product ID
See also
GetProductDatabase

◆ GetProductInstanceId()

virtual QByteArray imtlic::IProductInstanceInfo::GetProductInstanceId ( ) const
pure virtual

Get the unique ID of this product instance. This ID uniquely identifies this specific installation (e.g., MAC address, hardware ID).

Returns
Unique instance identifier

◆ GetProject()

virtual QByteArray imtlic::IProductInstanceInfo::GetProject ( ) const
pure virtual

Get the project this product instance is assigned to.

Returns
Project identifier

◆ GetSerialNumber()

virtual QByteArray imtlic::IProductInstanceInfo::GetSerialNumber ( ) const
pure virtual

Get the serial number of this product instance.

Returns
Serial number

◆ IsInternalUse()

virtual bool imtlic::IProductInstanceInfo::IsInternalUse ( ) const
pure virtual

Check if this product instance is marked for internal use only. Internal-use instances are typically for testing or company-internal purposes.

Returns
true if marked for internal use only

◆ IsInUse()

virtual bool imtlic::IProductInstanceInfo::IsInUse ( ) const
pure virtual

Check if this product instance is currently in use.

Returns
true if the instance is active/in-use, false otherwise

◆ IsMultiProduct()

virtual bool imtlic::IProductInstanceInfo::IsMultiProduct ( ) const
pure virtual

Checks whether this product instance represents multiple items (multi-product).

◆ RemoveLicense()

virtual void imtlic::IProductInstanceInfo::RemoveLicense ( const QByteArray &  licenseId)
pure virtual

Remove an activated license from this product instance.

Parameters
licenseIdID of the license to deactivate

◆ SetInternalUse()

virtual void imtlic::IProductInstanceInfo::SetInternalUse ( bool  internalUse)
pure virtual

Set whether this product instance is for internal use only.

Parameters
internalUsetrue to mark for internal use only

◆ SetInUse()

virtual void imtlic::IProductInstanceInfo::SetInUse ( bool  inUse)
pure virtual

Set the usage status for this product instance.

Parameters
inUsetrue to mark as in-use, false otherwise

◆ SetMultiProduct()

virtual void imtlic::IProductInstanceInfo::SetMultiProduct ( bool  isMulti)
pure virtual

Sets whether this product instance represents multiple items.

◆ SetParentInstanceId()

virtual void imtlic::IProductInstanceInfo::SetParentInstanceId ( const QByteArray &  parentInstanceId)
pure virtual

Set the ID of the parent product instance. This establishes a parent-child relationship for license distribution.

Parameters
parentInstanceIdID of the parent instance, or empty to mark as root instance

◆ SetProductCount()

virtual void imtlic::IProductInstanceInfo::SetProductCount ( int  count)
pure virtual

Set the count of items in this product instance. This usually makes sense only if the product is marked as multi-product.

◆ SetProductInstanceId()

virtual void imtlic::IProductInstanceInfo::SetProductInstanceId ( const QByteArray &  instanceId)
pure virtual

Set the unique ID of this product instance.

Parameters
instanceIdUnique identifier for this installation

◆ SetProject()

virtual void imtlic::IProductInstanceInfo::SetProject ( const QByteArray &  project)
pure virtual

Set the project assignment for this product instance.

Parameters
projectProject identifier

◆ SetSerialNumber()

virtual void imtlic::IProductInstanceInfo::SetSerialNumber ( const QByteArray &  serialNumber)
pure virtual

Set the serial number of this product instance.

Parameters
serialNumberSerial number to assign

◆ SetupProductInstance()

virtual void imtlic::IProductInstanceInfo::SetupProductInstance ( const QByteArray &  productId,
const QByteArray &  instanceId,
const QByteArray &  customerId 
)
pure virtual

Set up this instance for a given product. This establishes the relationship between the instance and its product/customer.

Parameters
productIdLogical ID of the product (not a repository/database ID)
instanceIdUnique identifier for this product instance (e.g., MAC address, hardware ID)
customerIdLogical ID of the customer (not a repository/database ID)