interface IUsbClient {
// Properties
readonly ${devicesJs}: ${IDevice}[];
readonly ${trustedServersDb}: ${ITrustedServersDatabase};
// Methods
${addDevice}(remoteAddress: string, deviceKey: string, authKey?: string): ${IDevice};
${getRemoteSharedDevices#getRemoteSharedDevices1}(remoteAddress: string): ${IRemoteDevice}[];
${getRemoteServerPublicKey}(remoteAddress: string): ${IPublicKey};
${installLicenseFile}(path: string): void;
}
public interface IUsbClient
{
// Properties
Array ${devices} { get; }
${ITrustedServersDatabase} ${trustedServersDb} { get; }
// Methods
${IDevice} ${addDevice}(string remoteAddress, string deviceKey, object authKey);
Array ${getRemoteSharedDevices}(string remoteAddress);
${IPublicKey} ${getRemoteServerPublicKey}(string remoteAddress);
void ${addListener}(${IUsbClientListener} pListener);
void ${removeListener}(${IUsbClientListener} pListener);
void ${installLicenseFile}(string path);
void ${installLicenseInMemory}(byte[] data);
}
struct IUsbClient : IDispatch
{
// Properties
SAFEARRAY(${IDevice}) ${devices}; // get
${ITrustedServersDatabasePtr#ITrustedServersDatabase} ${trustedServersDb}; // get
// Methods
${IDevicePtr#IDevice} ${addDevice}(_bstr_t remoteAddress, _bstr_t deviceKey, const _variant_t & authKey);
SAFEARRAY(${IRemoteDevice}) ${getRemoteSharedDevices}(_bstr_t remoteAddress);
${IPublicKeyPtr#IPublicKey} ${getRemoteServerPublicKey}(_bstr_t remoteAddress);
HRESULT ${addListener}(${IUsbClientListener *#IUsbClientListener} pListener);
HRESULT ${removeListener}(${IUsbClientListener *#IUsbClientListener} pListener);
HRESULT ${installLicenseFile}(_bstr_t path);
HRESULT ${installLicenseInMemory}(SAFEARRAY(BYTE) data);
};
// This property is not available in scripting environment
Array devices { get; }
SAFEARRAY(${IDevice}) devices; // get
Returns a list of all local USB devices. USB devices that are currently disconnected are also included in this list.
readonly devicesJs: ${IDevice}[];
// This property is not available in managed environment
// This property is not available in native environment
Returns a list of all local USB devices. USB devices that are currently disconnected are also included in this list.
readonly trustedServersDb: ${ITrustedServersDatabase};
${ITrustedServersDatabase} trustedServersDb { get; }
${ITrustedServersDatabasePtr#ITrustedServersDatabase} trustedServersDb; // get
Holds a reference to a trusted servers database.
addDevice(remoteAddress: string, deviceKey: string, authKey?: string): ${IDevice};
${IDevice} addDevice(string remoteAddress, string deviceKey, object authKey);
${IDevicePtr#IDevice} addDevice(_bstr_t remoteAddress, _bstr_t deviceKey, const _variant_t & authKey);
remoteAddressdeviceKeyauthKeyAdd a new remote USB device.
getRemoteServerPublicKey(remoteAddress: string): ${IPublicKey};
${IPublicKey} getRemoteServerPublicKey(string remoteAddress);
${IPublicKeyPtr#IPublicKey} getRemoteServerPublicKey(_bstr_t remoteAddress);
remoteAddressConnect to the remote server and obtain its public key.
// This method is not available in scripting environment
void addListener(${IUsbClientListener} pListener);
HRESULT addListener(${IUsbClientListener *#IUsbClientListener} pListener);
pListenerAdds specified listener object to the list of listener objects. When new USB device is connected, library calls methods of the supplied listener object, passing a reference to a connected device.
// This method is not available in scripting environment
void removeListener(${IUsbClientListener} pListener);
HRESULT removeListener(${IUsbClientListener *#IUsbClientListener} pListener);
pListenerRemoves specified listener object from the list of listener objects.
installLicenseFile(path: string): void;
void installLicenseFile(string path);
HRESULT installLicenseFile(_bstr_t path);
pathInstall the given license file. Throws an exception if an error occurs.
// This method is not available in scripting environment
void installLicenseInMemory(byte[] data);
HRESULT installLicenseInMemory(SAFEARRAY(BYTE) data);
dataInstall the license from the memory buffer.