Mobile SDK for Windows Apps2.0
Transforming Windows apps into Mobile apps
CitrixMobile Class Reference

#include <CitrixMobility.h>

Inherits IButton, ICamera, ICapabilities, IChannel, ICMPDevice, ICMPDispatch, IControl, IDisplay, IEventFilter, IEventSource, IKeyboard, IMessage, INotification, IPhone, IPicker, ISession, IVirtualDevice, ICMPCapture, and IOrientation.

List of all members.

Public Member Functions

 CitrixMobile ()
HRESULT FinalConstruct ()
void FinalRelease ()
STDMETHODIMP IsSessionActive (VARIANT_BOOL *sessionActive)
 Determine if there is an active session object which is available.
STDMETHODIMP GetSessionState (CMP_SESSION_STATE *sessionState)
 Get the current state of the session.
STDMETHODIMP OpenSession (CMPRESULT *result)
 Open a session between the application and the mobile device.
STDMETHODIMP CloseSession (CMPRESULT *result)
 Close the session between the application and the mobile device.
STDMETHODIMP GetErrorText (CMP_ERROR_ID errorId, BSTR *errorText, CMPRESULT *result)
 Retrieve text for error code - not implemented.
STDMETHODIMP SetSessionOptionBool (CMP_SESSION_OPTION option, VARIANT_BOOL value, CMPRESULT *rc)
 Set session boolean option.
STDMETHODIMP GetSessionOptionBool (CMP_SESSION_OPTION option, VARIANT_BOOL *value, CMPRESULT *rc)
 Get session boolean option.
STDMETHODIMP RegisterCMPProcess (DWORD processId, CMPRESULT *rc)
 Register the process as belonging to CMP.
STDMETHODIMP UnregisterCMPProcess (DWORD processId, CMPRESULT *rc)
 Unregister the process as belonging to CMP.
STDMETHODIMP DetectCMPProcess (DWORD processId, VARIANT_BOOL *value, CMPRESULT *rc)
 Detect if a process is using CMP.
STDMETHODIMP IsChannelOpen (VARIANT_BOOL *channelStarted)
 Is virtual channel open.
STDMETHODIMP OpenChannel (CMP_CHANNEL_FLAGS channelFlags, CMPRESULT *result)
 Open the MRVC virtual channel.
STDMETHODIMP CloseChannel (CMPRESULT *result)
 Close the link between the application and the service.
STDMETHODIMP GetChannelState (CMP_CHANNEL_STATE *state)
 Get the current state of the channel.
STDMETHODIMP GetCapabilityBool (CMP_CAP_ID capId, CMP_KEY_ID keyId, VARIANT_BOOL *keyValue, CMPRESULT *result)
 Get capability boolean value.
STDMETHODIMP GetCapabilityInt16 (CMP_CAP_ID capId, CMP_KEY_ID keyId, INT16 *keyValue, CMPRESULT *result)
 Get capability integer 16-bit value.
STDMETHODIMP GetCapabilityUInt16 (CMP_CAP_ID capId, CMP_KEY_ID keyId, PUINT16 value, CMPRESULT *result)
 Get capability unsigned integer 16-bit value.
STDMETHODIMP GetCapabilityInt32 (CMP_CAP_ID capId, CMP_KEY_ID keyId, PINT32 keyValue, CMPRESULT *result)
 Get capability integer 32-bit value.
STDMETHODIMP GetCapabilityUInt32 (CMP_CAP_ID capId, CMP_KEY_ID keyId, PUINT32 keyValue, CMPRESULT *result)
 Get capability unsigned integer 32-bit value.
STDMETHODIMP FireSessionStateChangedEvent (CMP_SESSION_STATE state)
STDMETHODIMP FireChannelStateChangedEvent (CMP_CHANNEL_STATE state)
STDMETHODIMP FireOrientationChangedEvent (CMPRESULT rc, CMP_ORIENTATION_DATA *orientationData)
STDMETHODIMP FirePictureTakenEvent (CMPRESULT rc, CMP_UNIQUE_ID imageID, CMP_IMAGE_FORMAT pictType, INT32 pictureSize, BSTR filename)
STDMETHODIMP FireSMSStartedEvent (CMPRESULT rc, CMP_UNIQUE_ID msgID)
STDMETHODIMP FireButtonPressedEvent (CMP_BUTTON_ID button)
STDMETHODIMP FireDisplaySettingsChangedEvent (CMP_DISPLAY_SETTINGS *displayMetrics)
STDMETHODIMP FireScrollModeChangedEvent (CMPRESULT rc, CMP_SCROLL_MODE scrollMode)
STDMETHODIMP FireKeyboardStateChangedEvent (CMPRESULT rc, CMP_KEYBOARD_STATE *keyboardState)
STDMETHODIMP FireViewportOriginChangedEvent (CMPRESULT rc, CMP_DISPLAY_POINT *point)
STDMETHODIMP FireButtonTargetChangedEvent (CMPRESULT rc, CMP_BUTTON_ID button, CMP_BUTTON_TARGET buttonTarget)
STDMETHODIMP FireControlStateChangedEvent (CMPRESULT rc, INT16 controlState)
STDMETHODIMP FirePhoneCallStartedEvent (CMPRESULT rc, CMP_UNIQUE_ID callId)
STDMETHODIMP FireUserNotifiedEvent (CMPRESULT rc, CMP_UNIQUE_ID notificationId)
STDMETHODIMP FireCameraPictureRemovedEvent (CMPRESULT rc, CMP_UNIQUE_ID pictureId)
STDMETHODIMP FireEventFilterChangedEvent (CMPRESULT rc, CMP_EVENT_ID eventId, INT16 filterFlags)
STDMETHODIMP FirePickerControlStateChangedEvent (CMP_UNIQUE_ID controlId, INT16 pickerFlags, CMPRESULT result, INT16 selectedItemIndex)
STDMETHODIMP FireViewportChangedEvent (CMPRESULT rc, INT16 flags, INT16 zoomFactor, CMP_DISPLAY_RECT *serverViewport, CMP_DISPLAY_RECT *clientViewport)
STDMETHODIMP FirePictureCaptured (CMPRESULT rc, CMP_UNIQUE_LONG_ID uniqueId, BSTR pictureMetadata, BSTR filename, BSTR thumbnail, UINT32 pictureSize, CMP_CAPTURE_PICTURE_OPTIONS *options)
STDMETHODIMP FireVideoCaptured (CMPRESULT rc, CMP_UNIQUE_LONG_ID uniqueId, BSTR videoMetadata, BSTR filename, UINT32 videoSize, CMP_CAPTURE_VIDEO_OPTIONS *options)
STDMETHODIMP FireAudioCaptured (CMPRESULT rc, CMP_UNIQUE_LONG_ID uniqueId, BSTR audioMetadata, BSTR filename, UINT32 audioSize, CMP_CAPTURE_AUDIO_OPTIONS *options)
STDMETHODIMP FireAppForeground ()
STDMETHODIMP FireAppBackground ()
STDMETHODIMP FireForegroundAppChanged (DWORD foregroundProcessId)
STDMETHODIMP FireSupportedOrientationsChanged (CMPRESULT rc, CMP_SUPPORTED_ORIENTATIONS supportedOrientations)
STDMETHODIMP FireCaptureMediaRemoved (CMPRESULT rc, CMP_UNIQUE_LONG_ID captureId)
STDMETHODIMP HideKeyboard (CMPRESULT *result)
 Hide the display keyboard.
STDMETHODIMP ShowKeyboard (CMP_KEYBOARD_STATE *kybdState, CMPRESULT *result)
 Show the display keyboard with the given properties.
STDMETHODIMP GetKeyboardState (CMP_KEYBOARD_STATE *kybdState, CMPRESULT *result)
 Get the current keyboard state.
STDMETHODIMP GetOrientation (CMP_ORIENTATION_DATA *orientationData, CMPRESULT *result)
 Get current orientation data.
STDMETHODIMP SetOrientation (CMP_ORIENTATION_POSITION orientation, INT16 orientationFlags, CMPRESULT *result)
 Set the application orientation.
STDMETHODIMP GetScrollMode (CMP_SCROLL_MODE *scrollMode, CMPRESULT *result)
 Get current scroll mode.
STDMETHODIMP SetScrollMode (CMP_SCROLL_MODE scrollMode, CMPRESULT *result)
 Set the scroll mode from the mobile device.
STDMETHODIMP SetViewportOrigin (CMP_DISPLAY_POINT *pt, INT16 viewportFlags, CMPRESULT *result)
 Set the origin of the Citrix Receiver viewport.
STDMETHODIMP GetViewportOrigin (CMP_DISPLAY_POINT *pt, CMPRESULT *result)
 Get the origin of the Citrix Receiver viewport.
STDMETHODIMP GetDisplaySettings (CMP_DISPLAY_SETTINGS *dispSettings, CMPRESULT *result)
 Get the current display settings for the mobile device.
STDMETHODIMP SetViewport (INT16 flags, INT16 zoomFactor, CMP_DISPLAY_RECT *serverViewport, CMPRESULT *result)
 Set the viewport for the mobile device.
STDMETHODIMP GetViewport (INT16 *flags, INT16 *zoomFactor, CMP_DISPLAY_RECT *serverViewport, CMP_DISPLAY_RECT *clientViewport, CMPRESULT *result)
 Get the current viewport for the mobile device.
STDMETHODIMP TakePicture (CMP_IMAGE_FORMAT imgType, CMP_UNIQUE_ID imageID, CMPRESULT *result)
 Take a picture.
STDMETHODIMP GetPictureFilename (CMP_UNIQUE_ID pictureId, BSTR *filename, CMPRESULT *result)
 Get the picture filename from the mobile device.
STDMETHODIMP GetPictureState (CMP_UNIQUE_ID pictureId, PINT32 size, CMP_PICTURE_STATE *pictState, CMPRESULT *result)
 Get the current picture state based on unique Id.
STDMETHODIMP RemovePicture (CMP_UNIQUE_ID pictureId, CMPRESULT *result)
 Remove the picture on the mobile device.
STDMETHODIMP StartPhoneCall (BSTR phoneNumber, CMP_UNIQUE_ID phoneCallId, CMPRESULT *result)
 Start a phone call.
STDMETHODIMP SendSMS (BSTR phoneNumber, CMP_UNIQUE_ID messageId, BSTR SMSText, CMPRESULT *result)
STDMETHODIMP HidePicker (CMP_UNIQUE_ID controlID, CMPRESULT *result)
 Hide a picker control that is currently being displayed.
STDMETHODIMP ShowPicker (CMP_UNIQUE_ID controlID, CMP_DISPLAY_RECT *rect, INT32 selectedIndex, BSTR listItems, BSTR title, CMPRESULT *result)
 Show the picker control on the mobile device.
STDMETHODIMP ShowPicker (CMP_UNIQUE_ID controlID, CMP_DISPLAY_RECT *rect, INT32 selectedIndex, SAFEARRAY **pickerText, BSTR pickerTitle, CMPRESULT *result)
 Show the picker control on the mobile device. This version is compatible with automation.
STDMETHODIMP SetButtonTarget (CMP_BUTTON_ID button, CMP_BUTTON_TARGET target, CMPRESULT *result)
 Set the target for pressing a button.
STDMETHODIMP GetButtonTarget (CMP_BUTTON_ID button, CMP_BUTTON_TARGET *target, CMPRESULT *result)
 Get the current button target (host of client)
STDMETHODIMP GetPickerState (CMP_UNIQUE_ID controlId, PINT16 pickerState, CMPRESULT *result)
 Get the picker control state on the mobile device.
STDMETHODIMP EnableControls (CMPRESULT *result)
 Enable the Receiver Controls for use.
STDMETHODIMP DisableControls (CMPRESULT *result)
 Disable the Receiver Controls from being used.
STDMETHODIMP GetControlsFlags (PINT16 controlFlags, CMPRESULT *result)
 Get the current receiver controls flags.
STDMETHODIMP GetDevicePropertyBool (CMP_DEV_BOOL_PROP_ID propertyId, VARIANT_BOOL *value, CMPRESULT *result)
 Get a boolean mobile device property setting.
STDMETHODIMP GetDevicePropertyString (CMP_DEV_STRING_PROP_ID propertyId, BSTR *string, CMPRESULT *result)
 Get a string mobile device property setting.
STDMETHODIMP FilterEvent (CMP_EVENT_ID eventId, INT16 filterFlags, CMPRESULT *result)
 Enable or disable event notification.
STDMETHODIMP NotifyUser (CMP_UNIQUE_ID notificationId, INT16 notificationFlags, BSTR notificationText, CMPRESULT *result)
 Notify the user of an event using a combination of vibration, sound, light, and text.
STDMETHODIMP OpenSessionForProcess (DWORD processId, CMPRESULT *result)
 Open a session between the application and the mobile device.
STDMETHODIMP CapturePicture (CMP_CAPTURE_PICTURE_OPTIONS *options, CMP_UNIQUE_LONG_ID *uniqueId, CMPRESULT *result)
 Capture a picture with the desired options.
STDMETHODIMP CaptureVideo (CMP_CAPTURE_VIDEO_OPTIONS *options, CMP_UNIQUE_LONG_ID *uniqueId, CMPRESULT *result)
 Capture a video with the desired options.
STDMETHODIMP CaptureAudio (CMP_CAPTURE_AUDIO_OPTIONS *options, CMP_UNIQUE_LONG_ID *uniqueId, CMPRESULT *result)
 Capture audio with the desired options.
STDMETHODIMP RemoveCapturedData (CMP_UNIQUE_LONG_ID uniqueId, CMPRESULT *result)
 Remove the files that were captured from before.
STDMETHODIMP SetSupportedOrientations (CMP_SUPPORTED_ORIENTATIONS supportedOrientations, CMPRESULT *result)
 Set which orientations can be used with the application.
STDMETHODIMP GetSupportedOrientations (CMP_SUPPORTED_ORIENTATIONS *supportedOrientations, CMPRESULT *result)
 Get which orientations can be used with the application.

Detailed Description


Constructor & Destructor Documentation


Member Function Documentation

HRESULT CitrixMobile::CaptureAudio ( CMP_CAPTURE_AUDIO_OPTIONS options,
CMP_UNIQUE_LONG_ID uniqueId,
CMPRESULT result 
)

Capture audio with the desired options.

Parameters:
optionsdesired options for capturing and generating the audio
uniqueIdunique capture ID
resultreturn code of CMP call
Returns:
HRESULT

Reimplemented from ICMPCapture.

HRESULT CitrixMobile::CapturePicture ( CMP_CAPTURE_PICTURE_OPTIONS options,
CMP_UNIQUE_LONG_ID uniqueId,
CMPRESULT result 
)

Capture a picture with the desired options.

Parameters:
optionsdesired options for capturing and generating the picture
uniqueIdunique capture ID
resultreturn code of CMP call
Returns:
HRESULT

Reimplemented from ICMPCapture.

HRESULT CitrixMobile::CaptureVideo ( CMP_CAPTURE_VIDEO_OPTIONS options,
CMP_UNIQUE_LONG_ID uniqueId,
CMPRESULT result 
)

Capture a video with the desired options.

Parameters:
optionsdesired options for capturing and generating the video
uniqueIdunique capture ID
resultreturn code of CMP call
Returns:
HRESULT

Reimplemented from ICMPCapture.

STDMETHODIMP CitrixMobile::CloseChannel ( CMPRESULT result)

Close the link between the application and the service.

Parameters:
result- result of the operation
Returns:
HRESULT

Reimplemented from IChannel.

HRESULT CitrixMobile::CloseSession ( CMPRESULT result)

Close the session between the application and the mobile device.

Parameters:
resultresult of CMP call
Returns:
HRESULT

Reimplemented from ICMPDispatch.

HRESULT CitrixMobile::DetectCMPProcess ( DWORD  processId,
VARIANT_BOOL *  detectFlag,
CMPRESULT result 
)

Detect if a process is using CMP.

During the development of CMP, it became necessary to know whether or not a process was hosting the CMP object. This was needed to avoid the automatic XenApp code from interfering with the process that already handles things using the CMP API.

Parameters:
processIdprocess Id of the process to be checked
detectFlagindicates if it is using CMP (TRUE) or it is a legacy application (FALSE)
resultreturned CMPRESULT
Returns:
HRESULT

Reimplemented from ICMPDispatch.

STDMETHODIMP CitrixMobile::DisableControls ( CMPRESULT result)

Disable the Receiver Controls from being used.

Parameters:
result- result of the operation
Returns:
HRESULT

Reimplemented from IControl.

STDMETHODIMP CitrixMobile::EnableControls ( CMPRESULT result)

Enable the Receiver Controls for use.

Parameters:
result- result of the operation
Returns:
HRESULT

Reimplemented from IControl.

STDMETHODIMP CitrixMobile::FilterEvent ( CMP_EVENT_ID  eventId,
INT16  filterFlags,
CMPRESULT result 
)

Enable or disable event notification.

Parameters:
eventId- unique event id
filterFlags- flags used for filtering events
result- result of the operation
Returns:
HRESULT

Reimplemented from IEventFilter.

Reimplemented from IEventSource.

Reimplemented from IEventSource.

STDMETHODIMP CitrixMobile::FireAudioCaptured ( CMPRESULT  rc,
CMP_UNIQUE_LONG_ID  uniqueId,
BSTR  audioMetadata,
BSTR  filename,
UINT32  audioSize,
CMP_CAPTURE_AUDIO_OPTIONS options 
)

Reimplemented from IEventSource.

Reimplemented from IEventSource.

STDMETHODIMP CitrixMobile::FireButtonTargetChangedEvent ( CMPRESULT  rc,
CMP_BUTTON_ID  button,
CMP_BUTTON_TARGET  buttonTarget 
)

Reimplemented from IEventSource.

Reimplemented from IEventSource.

Reimplemented from IEventSource.

Reimplemented from IEventSource.

STDMETHODIMP CitrixMobile::FireControlStateChangedEvent ( CMPRESULT  rc,
INT16  controlState 
)

Reimplemented from IEventSource.

Reimplemented from IEventSource.

STDMETHODIMP CitrixMobile::FireEventFilterChangedEvent ( CMPRESULT  rc,
CMP_EVENT_ID  eventId,
INT16  filterFlags 
)

Reimplemented from IEventSource.

STDMETHODIMP CitrixMobile::FireForegroundAppChanged ( DWORD  foregroundProcessId)

Reimplemented from IEventSource.

STDMETHODIMP CitrixMobile::FireKeyboardStateChangedEvent ( CMPRESULT  rc,
CMP_KEYBOARD_STATE keyboardState 
)

Reimplemented from IEventSource.

STDMETHODIMP CitrixMobile::FireOrientationChangedEvent ( CMPRESULT  rc,
CMP_ORIENTATION_DATA orientationData 
)

Reimplemented from IEventSource.

Reimplemented from IEventSource.

STDMETHODIMP CitrixMobile::FirePickerControlStateChangedEvent ( CMP_UNIQUE_ID  controlId,
INT16  pickerFlags,
CMPRESULT  result,
INT16  selectedItemIndex 
)

Reimplemented from IEventSource.

STDMETHODIMP CitrixMobile::FirePictureCaptured ( CMPRESULT  rc,
CMP_UNIQUE_LONG_ID  uniqueId,
BSTR  pictureMetadata,
BSTR  filename,
BSTR  thumbnail,
UINT32  pictureSize,
CMP_CAPTURE_PICTURE_OPTIONS options 
)

Reimplemented from IEventSource.

STDMETHODIMP CitrixMobile::FirePictureTakenEvent ( CMPRESULT  rc,
CMP_UNIQUE_ID  imageID,
CMP_IMAGE_FORMAT  pictType,
INT32  pictureSize,
BSTR  filename 
)

Reimplemented from IEventSource.

Reimplemented from IEventSource.

Reimplemented from IEventSource.

STDMETHODIMP CitrixMobile::FireSMSStartedEvent ( CMPRESULT  rc,
CMP_UNIQUE_ID  msgID 
)

Reimplemented from IEventSource.

Reimplemented from IEventSource.

STDMETHODIMP CitrixMobile::FireUserNotifiedEvent ( CMPRESULT  rc,
CMP_UNIQUE_ID  notificationId 
)

Reimplemented from IEventSource.

STDMETHODIMP CitrixMobile::FireVideoCaptured ( CMPRESULT  rc,
CMP_UNIQUE_LONG_ID  uniqueId,
BSTR  videoMetadata,
BSTR  filename,
UINT32  videoSize,
CMP_CAPTURE_VIDEO_OPTIONS options 
)

Reimplemented from IEventSource.

STDMETHODIMP CitrixMobile::FireViewportChangedEvent ( CMPRESULT  rc,
INT16  flags,
INT16  zoomFactor,
CMP_DISPLAY_RECT serverViewport,
CMP_DISPLAY_RECT clientViewport 
)

Reimplemented from IEventSource.

Reimplemented from IEventSource.

STDMETHODIMP CitrixMobile::GetButtonTarget ( CMP_BUTTON_ID  button,
CMP_BUTTON_TARGET target,
CMPRESULT result 
)

Get the current button target (host of client)

Get the current destination for button events. The target will either be the server or the client. The host application will be notified of button events if it is the destination. Otherwise the client (mobile device) will handle it like normal.

Parameters:
button- selected button (home, search, back, etc.)
target- destination for events (server or client)
result- returned CMP-based result
Returns:
HRESULT

Reimplemented from IButton.

HRESULT CitrixMobile::GetCapabilityBool ( CMP_CAP_ID  capId,
CMP_KEY_ID  keyId,
VARIANT_BOOL *  value,
CMPRESULT result 
)

Get capability boolean value.

Return capability setting to the caller. This call only returns VARIANT_BOOL which is a short. The reason for using this instead of BOOL is that VARIANT_BOOL is compatible with automation. The capability id along with the key id determines which setting we are trying to get. Internally in the MRVC User mode code, it maps the request to the actual capability data. This API strategy is easier than having to implement one call per capability setting.

Parameters:
capId- capability selected (e.g. CAPID_INPUT)
keyId- key selected (e.g. CAP_INPUT_ENABLE)
value- returned value (boolean)
result- returned CMP-based result
Returns:
HRESULT

Reimplemented from ICapabilities.

HRESULT CitrixMobile::GetCapabilityInt16 ( CMP_CAP_ID  capId,
CMP_KEY_ID  keyId,
INT16 *  keyValue,
CMPRESULT result 
)

Get capability integer 16-bit value.

Return capability setting to the caller. This call only returns INT16. This call is compatible with automation. The capability id along with the key id determines which setting we are trying to get. Internally in the MRVC User mode code, it maps the request to the actual capability data. This API strategy is easier than having to implement one call per capability setting.

Parameters:
capId- capability selected (e.g. CAPID_INPUT)
keyId- key selected (e.g. CAP_INPUT_ENABLE)
keyValue- returned value (INT16)
result- returned CMP-based result
Returns:
HRESULT

Reimplemented from ICapabilities.

HRESULT CitrixMobile::GetCapabilityInt32 ( CMP_CAP_ID  capId,
CMP_KEY_ID  keyId,
PINT32  value,
CMPRESULT result 
)

Get capability integer 32-bit value.

Return capability setting to the caller. This call only returns INT32. This call is compatible with automation. The capability id along with the key id determines which setting we are trying to get. Internally in the MRVC User mode code, it maps the request to the actual capability data. This API strategy is easier than having to implement one call per capability setting.

Parameters:
capId- capability selected (e.g. CAPID_INPUT)
keyId- key selected (e.g. CAP_INPUT_ENABLE)
value- returned value (INT32)
result- returned CMP-based result
Returns:
HRESULT
HRESULT CitrixMobile::GetCapabilityUInt16 ( CMP_CAP_ID  capId,
CMP_KEY_ID  keyId,
PUINT16  value,
CMPRESULT result 
)

Get capability unsigned integer 16-bit value.

Return capability setting to the caller. This call only returns UINT16. This call is not compatible with automation. The capability id along with the key id determines which setting we are trying to get. Internally in the MRVC User mode code, it maps the request to the actual capability data. This API strategy is easier than having to implement one call per capability setting.

Parameters:
capId- capability selected (e.g. CAPID_INPUT)
keyId- key selected (e.g. CAP_INPUT_ENABLE)
value- returned value (UINT16)
result- returned CMP-based result
Returns:
HRESULT
HRESULT CitrixMobile::GetCapabilityUInt32 ( CMP_CAP_ID  capId,
CMP_KEY_ID  keyId,
PUINT32  value,
CMPRESULT result 
)

Get capability unsigned integer 32-bit value.

Return capability setting to the caller. This call only returns UINT32. This call is not compatible with automation. The capability id along with the key id determines which setting we are trying to get. Internally in the MRVC User mode code, it maps the request to the actual capability data. This API strategy is easier than having to implement one call per capability setting.

Parameters:
capId- capability selected (e.g. CAPID_INPUT)
keyId- key selected (e.g. CAP_INPUT_ENABLE)
value- returned value (UINT32)
result- returned CMP-based result
Returns:
HRESULT

Get the current state of the channel.

Parameters:
state- returned channel state CMP_CHANNEL_STATE
Returns:
HRESULT

Reimplemented from IChannel.

STDMETHODIMP CitrixMobile::GetControlsFlags ( PINT16  controlFlags,
CMPRESULT result 
)

Get the current receiver controls flags.

Parameters:
controlFlags- returned flags for controls
result- result of the operation
Returns:
HRESULT

Reimplemented from IControl.

STDMETHODIMP CitrixMobile::GetDevicePropertyBool ( CMP_DEV_BOOL_PROP_ID  propertyId,
VARIANT_BOOL *  value,
CMPRESULT result 
)

Get a boolean mobile device property setting.

Gets a device property in boolean representation. The device properties are a collection of values that reveal what the device features are. The values do not change during the lifetime of a connection as they do not report on the state of the feature, only if it is present. E.g. if you query for CMP_DEVICE_BLUETOOTH this will return true if the phone supports bluetooth, regardless of whether it is on or off. However values may change when you roam a session to a different client device.

Parameters:
propertyId- unique property Id to get
value- returned value for property
result- result of the operation
Returns:
HRESULT

Reimplemented from ICMPDevice.

STDMETHODIMP CitrixMobile::GetDevicePropertyString ( CMP_DEV_STRING_PROP_ID  propertyId,
BSTR *  value,
CMPRESULT result 
)

Get a string mobile device property setting.

This is useful for determining more granular features on the device and also an easy way to publish flexible information.

Parameters:
propertyId- unique property Id to get
value- returned value for property
result- result of the operation
Returns:
HRESULT

Reimplemented from ICMPDevice.

STDMETHODIMP CitrixMobile::GetDisplaySettings ( CMP_DISPLAY_SETTINGS dispSettings,
CMPRESULT result 
)

Get the current display settings for the mobile device.

Parameters:
dispSettings- display settings
result- result of the operation
Returns:
HRESULT

Reimplemented from ICMPDispatch.

STDMETHODIMP CitrixMobile::GetErrorText ( CMP_ERROR_ID  errorId,
BSTR *  errorText,
CMPRESULT result 
)

Retrieve text for error code - not implemented.

Parameters:
errorId
errorText
result
Returns:
HRESULT

Reimplemented from ISession.

STDMETHODIMP CitrixMobile::GetKeyboardState ( CMP_KEYBOARD_STATE kybdState,
CMPRESULT result 
)

Get the current keyboard state.

Parameters:
kybdState- returned keyboard selection and other keyboard settings
result- result of the operation
Returns:
HRESULT

Reimplemented from ICMPDispatch.

STDMETHODIMP CitrixMobile::GetOrientation ( CMP_ORIENTATION_DATA orientationData,
CMPRESULT result 
)

Get current orientation data.

Get the current orientation data (application and device orientation, orientation flags) from the mobile device. Device and application orientation can be different based on the orientation flags.

Parameters:
orientationData- contains the relevant orientation data
result- result of the operation
Returns:
HRESULT

Reimplemented from ICMPDispatch.

STDMETHODIMP CitrixMobile::GetPickerState ( CMP_UNIQUE_ID  controlId,
PINT16  pickerState,
CMPRESULT result 
)

Get the picker control state on the mobile device.

Parameters:
controlId- picker control identifier
pickerState- returned picker state
result- result of the operation
Returns:
HRESULT

Reimplemented from ICMPDispatch.

STDMETHODIMP CitrixMobile::GetPictureFilename ( CMP_UNIQUE_ID  pictureId,
BSTR *  filename,
CMPRESULT result 
)

Get the picture filename from the mobile device.

Get the filename of the picture from the mobile device camera. Once the application has the name, it can directly access the picture data as a file.

Parameters:
pictureId- unique picture identifier
filename- returned filename
result- returned CMP-based result
Returns:
HRESULT

Reimplemented from ICamera.

STDMETHODIMP CitrixMobile::GetPictureState ( CMP_UNIQUE_ID  pictureId,
PINT32  size,
CMP_PICTURE_STATE pictState,
CMPRESULT result 
)

Get the current picture state based on unique Id.

Get the picture state from the mobile device camera. This could be used to poll the status of the camera after taking a picture. An alternative is to use the events related to the picture being taken.

Parameters:
pictureId- unique picture identifier
size- returned size of picture
pictState- returned state of the picture (downloading, downloaded)
result- returned CMP-based result
Returns:
HRESULT
STDMETHODIMP CitrixMobile::GetScrollMode ( CMP_SCROLL_MODE scrollMode,
CMPRESULT result 
)

Get current scroll mode.

Get the current scroll mode from the mobile device. For everything we can set, the intention is being able to retrieve those settings as well.

Parameters:
scrollMode- returned scroll mode
result- result of the operation
Returns:
HRESULT

Reimplemented from ICMPDispatch.

STDMETHODIMP CitrixMobile::GetSessionOptionBool ( CMP_SESSION_OPTION  option,
VARIANT_BOOL *  value,
CMPRESULT rc 
)

Get session boolean option.

Parameters:
optionsession option
valuereturned boolean value for option
rcreturned CMP result
Returns:
HRESULT

Reimplemented from ISession.

STDMETHODIMP CitrixMobile::GetSessionState ( CMP_SESSION_STATE sessionState)

Get the current state of the session.

Parameters:
sessionState
Returns:
HRESULT

Reimplemented from ICMPDispatch.

STDMETHODIMP CitrixMobile::GetSupportedOrientations ( CMP_SUPPORTED_ORIENTATIONS supportedOrientations,
CMPRESULT result 
)

Get which orientations can be used with the application.

Parameters:
supportedOrientationsorientations supported
resultCMPRESULT
Returns:
HRESULT

Reimplemented from ICMPDispatch.

STDMETHODIMP CitrixMobile::GetViewport ( INT16 *  flags,
INT16 *  zoomFactor,
CMP_DISPLAY_RECT serverViewport,
CMP_DISPLAY_RECT clientViewport,
CMPRESULT result 
)

Get the current viewport for the mobile device.

Parameters:
flagsindicates which fields are valid
zoomFactorThe amount of zoom used (200 = 2x)
serverViewportThe rectangle coordinates of the server viewport
clientViewportThe rectangle coordinates of the client viewport
resultCMPRESULT
Returns:
HRESULT

Reimplemented from ICMPDispatch.

STDMETHODIMP CitrixMobile::GetViewportOrigin ( CMP_DISPLAY_POINT pt,
CMPRESULT result 
)

Get the origin of the Citrix Receiver viewport.

Parameters:
pt- position of the viewport (top, left)
result- result of the operation
Returns:
HRESULT

Reimplemented from ICMPDispatch.

STDMETHODIMP CitrixMobile::HideKeyboard ( CMPRESULT result)

Hide the display keyboard.

Parameters:
result- result of the operation
Returns:
HRESULT

Reimplemented from ICMPDispatch.

STDMETHODIMP CitrixMobile::HidePicker ( CMP_UNIQUE_ID  controlId,
CMPRESULT result 
)

Hide a picker control that is currently being displayed.

Parameters:
controlId- picker control identifier
result- result of the operation
Returns:
HRESULT

Reimplemented from ICMPDispatch.

STDMETHODIMP CitrixMobile::IsChannelOpen ( VARIANT_BOOL *  StartFlag)

Is virtual channel open.

Check to see if virtual channel is open Determine if the ICA MRVC Virtual Channel is currently open to the other side. If this returns true, the communication between the server and client should be connected and able to exchange ICA packets.

Parameters:
StartFlag- returns the state of the virtual channel being open
Returns:
HRESULT

Reimplemented from IChannel.

STDMETHODIMP CitrixMobile::IsSessionActive ( VARIANT_BOOL *  sessionActive)

Determine if there is an active session object which is available.

Parameters:
sessionActive
Returns:
HRESULT

Reimplemented from ICMPDispatch.

STDMETHODIMP CitrixMobile::NotifyUser ( CMP_UNIQUE_ID  notificationId,
INT16  notificationFlags,
BSTR  notifyText,
CMPRESULT result 
)

Notify the user of an event using a combination of vibration, sound, light, and text.

Parameters:
notificationId- notification identifier
notificationFlags- controls which options are used
notifyText- text to display
result- result of the operation
Returns:
HRESULT

Reimplemented from ICMPDispatch.

STDMETHODIMP CitrixMobile::OpenChannel ( CMP_CHANNEL_FLAGS  channelFlags,
CMPRESULT result 
)

Open the MRVC virtual channel.

Start the link between the two sides. Bind the channel if it has not already been done.

Parameters:
channelFlags- flags to control how the channel is opened
result- result of the operation (optional)
Returns:
HRESULT

Reimplemented from IChannel.

HRESULT CitrixMobile::OpenSession ( CMPRESULT result)

Open a session between the application and the mobile device.

Parameters:
resultreturn code of CMP call
Returns:
HRESULT

Reimplemented from ICMPDispatch.

HRESULT CitrixMobile::OpenSessionForProcess ( DWORD  processId,
CMPRESULT result 
)

Open a session between the application and the mobile device.

Parameters:
processIdprocess ID for the application
resultreturn code of CMP call
Returns:
HRESULT

Reimplemented from ICMPDispatch.

HRESULT CitrixMobile::RegisterCMPProcess ( DWORD  processId,
CMPRESULT result 
)

Register the process as belonging to CMP.

This stops other Citrix programs from adjusting behaviour for mobile device.

Parameters:
processIdProcess Id of the process to register with CMP
resultreturned CMPRESULT
Returns:
HRESULT

Reimplemented from ICMPDispatch.

HRESULT CitrixMobile::RemoveCapturedData ( CMP_UNIQUE_LONG_ID  uniqueId,
CMPRESULT result 
)

Remove the files that were captured from before.

Parameters:
uniqueIdunique capture ID
resultreturn code of CMP call
Returns:
HRESULT

Reimplemented from ICMPCapture.

STDMETHODIMP CitrixMobile::RemovePicture ( CMP_UNIQUE_ID  pictureId,
CMPRESULT result 
)

Remove the picture on the mobile device.

Remove the picture from the mobile device. We no longer need it for download and there is no reason to keep it on the device. This function only works with images that were taken with our API. The pictureId only works with our pictures. The client does not know if it is okay to delete a picture until it is told.

Parameters:
pictureId- unique picture identifier
result- returned CMP-based result
Returns:
HRESULT

Reimplemented from ICamera.

STDMETHODIMP CitrixMobile::SendSMS ( BSTR  phoneNumber,
CMP_UNIQUE_ID  messageId,
BSTR  SMSText,
CMPRESULT result 
)

Send a SMS message using the mobile device

Parameters:
phoneNumber- phone number for destination
messageId- message identifier
SMSText- text to send in SMS
result- result of the operation
Returns:
HRESULT

Reimplemented from ICMPDispatch.

STDMETHODIMP CitrixMobile::SetButtonTarget ( CMP_BUTTON_ID  button,
CMP_BUTTON_TARGET  target,
CMPRESULT result 
)

Set the target for pressing a button.

Set the destination for button events. The target will either be the server or the client. The host application will be notified of button events if it is selected. Otherwise the client (mobile device) will handle it like normal.

Care should be taken to restore button redirection before the program completes. It is a known issue (Redirect Button) and unexpected results will happen if the "back" button is not restored to select the moble device (client).

Parameters:
button- selected button (home, search, back, etc.)
target- destination for events (server or client)
result- returned CMP-based result
Returns:
HRESULT

Reimplemented from IButton.

STDMETHODIMP CitrixMobile::SetOrientation ( CMP_ORIENTATION_POSITION  orientation,
INT16  orientationFlags,
CMPRESULT result 
)

Set the application orientation.

Set the application orientation and orientation flags for the mobile device. Device and application orientation can be different based on the orientation flags.

Parameters:
orientation- contains the relevant orientation data
orientationFlags- controls the orientation to either be "follow" or "locked"
result- result of the operation
Returns:
HRESULT

Reimplemented from ICMPDispatch.

STDMETHODIMP CitrixMobile::SetScrollMode ( CMP_SCROLL_MODE  scrollMode,
CMPRESULT result 
)

Set the scroll mode from the mobile device.

Parameters:
scrollMode- scroll mode to set CMP_SCROLL_MODE
result- result of the operation
Returns:
HRESULT

Reimplemented from ICMPDispatch.

STDMETHODIMP CitrixMobile::SetSessionOptionBool ( CMP_SESSION_OPTION  option,
VARIANT_BOOL  value,
CMPRESULT rc 
)

Set session boolean option.

Parameters:
optionsession option
valueboolean value for option
rcreturned CMP result
Returns:
HRESULT

Reimplemented from ISession.

STDMETHODIMP CitrixMobile::SetSupportedOrientations ( CMP_SUPPORTED_ORIENTATIONS  supportedOrientations,
CMPRESULT result 
)

Set which orientations can be used with the application.

Parameters:
supportedOrientationsorientations supported
resultCMPRESULT
Returns:
HRESULT

Reimplemented from ICMPDispatch.

STDMETHODIMP CitrixMobile::SetViewport ( INT16  flags,
INT16  zoomFactor,
CMP_DISPLAY_RECT serverViewport,
CMPRESULT result 
)

Set the viewport for the mobile device.

Parameters:
flagsindicates which fields are to be used
zoomFactorThe amount of zoom used (200 = 2x)
serverViewportThe rectangle coordinates of the server viewport
resultCMPRESULT
Returns:
HRESULT

Reimplemented from ICMPDispatch.

STDMETHODIMP CitrixMobile::SetViewportOrigin ( CMP_DISPLAY_POINT pt,
INT16  viewportFlags,
CMPRESULT result 
)

Set the origin of the Citrix Receiver viewport.

Parameters:
pt- Location to position the viewport (top, left)
viewportFlags- flags to control how set viewport works
result- result of the operation
Returns:
HRESULT

Reimplemented from ICMPDispatch.

STDMETHODIMP CitrixMobile::ShowKeyboard ( CMP_KEYBOARD_STATE kybdState,
CMPRESULT result 
)

Show the display keyboard with the given properties.

Parameters:
kybdState- keyboard selection and other keyboard settings
result- result of the operation
Returns:
HRESULT

Reimplemented from ICMPDispatch.

STDMETHODIMP CitrixMobile::ShowPicker ( CMP_UNIQUE_ID  controlId,
CMP_DISPLAY_RECT rect,
INT32  selectedIndex,
BSTR  stringBuffer,
BSTR  title,
CMPRESULT result 
)

Show the picker control on the mobile device.

Parameters:
controlId- control identifier
rect- viewport rectangle to use for text input area
selectedIndex- which item to have selected by default
stringBuffer- picker control text
title- picker control title
result- result of the operation
Returns:
HRESULT

Reimplemented from IPicker.

STDMETHODIMP CitrixMobile::ShowPicker ( CMP_UNIQUE_ID  controlId,
CMP_DISPLAY_RECT rect,
INT32  selectedIndex,
SAFEARRAY **  pickerTextSA,
BSTR  pickerTitle,
CMPRESULT result 
)

Show the picker control on the mobile device. This version is compatible with automation.

Parameters:
controlId- control identifier
rect- viewport rectangle to use
selectedIndex- which item to have selected by default
pickerTextSA- picker control text
pickerTitle- picker title text
result- result of the operation
Returns:
HRESULT

Reimplemented from ICMPDispatch.

STDMETHODIMP CitrixMobile::StartPhoneCall ( BSTR  phoneNumber,
CMP_UNIQUE_ID  phoneCallId,
CMPRESULT result 
)

Start a phone call.

Initiate a phone call using the mobile device. It is important to worry about how this could be used so it assumed that the dialing process is not fully automated.

Parameters:
phoneNumber- phone number to dial
phoneCallId- unique phone call identifier
result- result of the operation
Returns:
HRESULT

Reimplemented from ICMPDispatch.

STDMETHODIMP CitrixMobile::TakePicture ( CMP_IMAGE_FORMAT  pictureType,
CMP_UNIQUE_ID  pictureId,
CMPRESULT result 
)

Take a picture.

Starts the process of taking a picture on the mobile device camera. The image type is selected to specify which image format should be used. At this time it is either PNG or JPEG. A unique picture Id should be used to track the picture status and be able to retrieve the data

Parameters:
pictureType- picture format type (either JPEG or PNG)
pictureId- unique picture identifier
result- returned CMP-based result
Returns:
HRESULT

Reimplemented from ICamera.

HRESULT CitrixMobile::UnregisterCMPProcess ( DWORD  processId,
CMPRESULT result 
)

Unregister the process as belonging to CMP.

Parameters:
processId- processId to unregister
result- returned CMPRESULT
Returns:
HRESULT

Reimplemented from ICMPDispatch.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Events Defines