Collapse All
Parallels Desktop® 10 for Mac — C API Reference Guide
PrlVm_PtmSubscribe Function
PHT_VIRTUAL_MACHINE

Subscribe on object properties changes.

Syntax
PRL_RESULT PrlVm_PtmSubscribe(
    PRL_HANDLE hVm, 
    PRL_CONST_STR szObject, 
    PRL_UINT32 * pValuePropertiesId, 
    PRL_UINT32 cValue, 
    PRL_UINT32 * pNotifyPropertiesId, 
    PRL_UINT32 cNotify
);
File

PrlApiPtm.h

Parameters

hVm
[in] A handle of type PHT_DESKTOP_CONTROL .
szObject
[in] An object name in PTM namespace to subscribe notifications with.
pValuePropertiesId
[in] point to an array of UINT32 elements containing PropertyId's. Values of specified properties will be automatically sent back to client whenever they are changed. Can be NULL only when cValues is zero, otherwise must point to valid array.
cValue
[in] number of elements in array pointed by pValuePropertiesId Zero is a valid argument, see Notes.
pNotifyPropertiesId
[in] point to an array of UINT32 elements containin PropertyId's PTM will notify about those properties changes, but the values of those changed properties will be NOT sent to client. Client may query value of a changed property explicitly using PrlVm_PtmQuery . Can be NULL only when cNotify is zero, otherwise must point to valid array.
cNotify
[in] number of elements in array pointed by pNotifyPropertiesId Zero is a valid argument, see Notes.

Notes
Subscription is not cumulative. Value and Notification IDs are immediatelly overwrite previous subscription. Therefore, when both cValue and cNotify are zero, this routine performs complete Unsubscribe.

Properties values and change notifications are delivered to client within PRL_PTM_OBJECT structure by PET_PTM_EVT_PROPERTY_CHANGED event

Returns

PRL_RESULT . Possible values: PRL_ERR_INVALID_HANDLE - invalid handle passed PRL_ERR_INVALID_ARG - invalid argument(s) have been passed PRL_ERR_UNIMPLEMENTED - feature is not implemented for specified handle. PRL_ERR_OPERATION_FAILED - client already subscribed PRL_ERR_FAILURE - failed to send command. PRL_ERR_SUCCESS - function completed successfully.

Links
Copyright © 1999-2015 Parallels IP Holdings GmbH and its affiliates. All rights reserved.
What do you think about this topic? Send feedback!