Mobile SDK for Windows Apps2.0
Transforming Windows apps into Mobile apps
virtualdevice.h
Go to the documentation of this file.
00001 
00012 #pragma once
00013 
00014 #include <cmp.h>
00015 #include <cmpabstract.h>
00016 
00017 class CitrixMobile;
00018 
00019 [
00020     object,
00021     oleautomation,
00022     pointer_default(unique),
00023     nonextensible,
00024     uuid("97D73E5F-6F33-4328-B380-36AC5A9FF716"),
00025     helpstring("Citrix Virtual Device Interface")
00026 ]
00027 __interface IVirtualDevice: IUnknown
00028 {
00029     STDMETHODIMP OpenSessionForProcess([in]DWORD processId, [out, retval]CMPRESULT* result);
00030 };
00031 
00032 
00033 // CMPEvents implements the callback for Session events
00034 
00039 class CMPEvents: public ICMPEVENTCALLBACK
00040 {
00041 public:
00042     CMPEvents(CitrixMobile *cmpobj):
00043     _cmpobj(cmpobj),
00044     _refcnt(1)
00045     {
00046         // just needed to capture the cmp object and set the refcount to 1
00047     }
00048 
00049     virtual void AddRef();
00050     virtual void Release();
00051 
00052     virtual void DisableEvents()
00053     {
00054         _cmpobj = NULL;
00055     }
00056 
00057     virtual void ButtonPressed(CMP_BUTTON_ID buttonId);
00058     virtual void DisplaySettingsChanged(const CMP_DISPLAY_SETTINGS *dispSettings);
00059     virtual void OrientationChanged(CMPRESULT rc, const CMP_ORIENTATION_DATA *orientationData);
00060     virtual void ScrollModeChanged(CMPRESULT rc, CMP_SCROLL_MODE scrollMode);
00061     virtual void KeyboardStateChanged(CMPRESULT rc, const CMP_KEYBOARD_STATE* keyboardState);
00062     virtual void ViewportOriginChanged(CMPRESULT rc, const CMP_DISPLAY_POINT *point);
00063     virtual void ButtonTargetChanged(CMPRESULT rc, CMP_BUTTON_ID buttonId, CMP_BUTTON_TARGET buttonTarget);
00064     virtual void ControlStateChanged(CMPRESULT rc, UINT16 ControlState);
00065     virtual void SMSStarted(CMPRESULT rc, CMP_UNIQUE_ID SMSId);
00066     virtual void PhoneCallStarted(CMPRESULT rc, CMP_UNIQUE_ID phoneCallId);
00067     virtual void PickerControlStateChanged(CMP_UNIQUE_ID ControlId, UINT16 PickerFlags, CMPRESULT result, UINT16 SelectedItemIndex);
00068     virtual void CameraPictureTaken(CMPRESULT rc, CMP_UNIQUE_ID PictureId, CMP_IMAGE_FORMAT PictureFormat, UINT32 PictureSize, const BSTR filename);
00069     virtual void EventFilterChanged(CMPRESULT result, CMP_EVENT_ID EventId, UINT16 FilterFlags);
00070     virtual void UserNotified(CMPRESULT rc, CMP_UNIQUE_ID NotificationId);
00071     virtual void CameraPictureRemoved(CMPRESULT result, CMP_UNIQUE_ID PictureId);
00072     virtual void ForegroundAppChanged(DWORD foregroundProcessId);
00073     virtual void AppForeground();
00074     virtual void AppBackground();
00075     virtual void SessionStateChanged(CMP_SESSION_STATE state);
00076     virtual void ChannelStateChanged(CMP_CHANNEL_STATE state);
00077     virtual void ViewportChanged(CMPRESULT rc, UINT16 flags, UINT16 zoomFactor, const CMP_DISPLAY_RECT* serverViewport, const CMP_DISPLAY_RECT* clientViewport);
00078 
00079     virtual void PictureCaptured(CMPRESULT rc, CMP_UNIQUE_LONG_ID uniqueId, const BSTR pictureMetadata, const BSTR filename, const BSTR thumbnail, UINT32 pictureSize, const CMP_CAPTURE_PICTURE_OPTIONS *options);
00080     virtual void VideoCaptured(CMPRESULT rc, CMP_UNIQUE_LONG_ID uniqueId, const BSTR pictureMetadata, const BSTR filename, UINT32 videoSize, const CMP_CAPTURE_VIDEO_OPTIONS *options);
00081     virtual void AudioCaptured(CMPRESULT rc, CMP_UNIQUE_LONG_ID uniqueId, const BSTR pictureMetadata, const BSTR filename, UINT32 audioSize, const CMP_CAPTURE_AUDIO_OPTIONS *options);
00082 
00083     virtual void SupportedOrientationsChanged(CMPRESULT rc, CMP_SUPPORTED_ORIENTATIONS supportedOrientations);
00084         virtual void VDOContextSwitched(CMPRESULT rc, DWORD currentProcessId, DWORD previousProcessId);
00085     virtual void CaptureMediaRemoved(CMPRESULT rc, CMP_UNIQUE_LONG_ID captureId);
00086 
00087 private:
00088     CitrixMobile* _cmpobj;
00089     UINT          _refcnt;
00090 
00091 };
00092 
00093 
00095 
00096 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Events Defines