Mobile Device Management
 
Native SDK
remotecontrol/RemoteDesktop.h
00001 
00019 #ifndef MDM_SAMSUNG_REMOTEDESKTOP_H
00020 #define MDM_SAMSUNG_REMOTEDESKTOP_H
00021 
00022 #include <sys/types.h>
00023 #include <android/rect.h>
00024 
00025 // WTL_EDM
00026 
00081 namespace knoxremotedesktop {
00082 
00095 typedef enum {
00096         FD_INVALID, FD_DEV_FB0,        // FD returned from framebuffer device
00097         FD_SHARED_MEM  // FD returned from shared memory in case of surface flinger.
00098 } FDType;
00099 
00143 enum {
00144         PF_UNKNOWN, PF_RGB_565, PF_BGRA_8888, PF_RGBA_8888
00145 };
00146 
00158 typedef struct {
00163         int bpp;
00168         int redoffset;
00173         int redlength;
00178         int greenoffset;
00183         int greenlength;
00188         int blueoffset;
00193         int bluelength;
00198         int alphaoffset;
00203         int alphalength;
00204 } PixelFormatDetail;
00205 
00219 class DirtyRegion {
00220 public:
00221         DirtyRegion() :
00222                         dirtyRects(0), numRects(0), maxRects(0), dexDirtyRects(0), dexNumRects(0) {
00223         }
00224         ~DirtyRegion() {
00225         }
00226 
00227 public:
00232         ARect *dirtyRects; // Array of Rects
00233 
00238         int numRects; // Number of Dirty Rects in the Array
00239 
00244         int maxRects; // Size of Array
00245 
00246 // Dual Dex
00251     ARect *dexDirtyRects; // Array of Rects of dex screen
00252 
00257     int dexNumRects; // Number of Dirty Rects in the Array for dex screen
00258 };
00259 
00270 class IRemoteDesktopListener {
00271 public:
00272         virtual ~IRemoteDesktopListener() {
00273         }
00274 
00285         virtual void screenChanged() = 0;
00286         
00298     virtual void dexStateChanged(bool isDexConnected) = 0;
00299 };
00300 
00355 class IRemoteDesktop {
00356 public:
00357         virtual ~IRemoteDesktop() {
00358         }
00359         ;
00360 
00383         static IRemoteDesktop *getInstance();
00384 
00419         virtual bool init() = 0;
00420 
00469         virtual void getScreenInfo(int *width, int *height, int *bytesPerPixel,
00470                         int *pixelFormat) = 0;
00471 
00516         virtual bool getFrameBufInfo(int *fd, FDType *fdType) = 0;
00517 
00569         virtual bool setListener(IRemoteDesktopListener *listener) = 0;
00570 
00666         virtual bool captureScreen(DirtyRegion &region) = 0;
00667 
00704         virtual void getScreenPixelFormatInfo(PixelFormatDetail &formatDetail) = 0;
00705 
00708 
00765         virtual bool setScreenInfo(int prefW, int prefH, int prefFormat) = 0;
00766 
00813         virtual void getDefaultScreenInfo(int *hwwidth, int *hwheight,
00814                         int *hwbytesPerPixel, int *hwpixelFormat) = 0;
00815     // Dual Dex
00816 
00866     virtual int getDefaultDexScreenInfo(int *hwwidth, int *hwheight, int *hwbytesPerPixel) = 0;
00867 
00911     virtual bool setDexScreenInfo(int prefW, int prefH) = 0;
00912 
00954     virtual void getDexBufInfo(int * fdDex) = 0;
00955 
00999     virtual void getDexScreenInfo(int *width, int *height, int *bytesPerPixel) = 0;
01000 };
01001 
01002 } //namespace knoxremotedesktop
01003 
01004 #endif // MDM_SAMSUNG_REMOTEDESKTOP_H
 All Classes Namespaces Functions Variables Enumerations