Mobile Device Management
 
Native SDK
remotecontrol/RemoteDesktop.h
00001 
00037 #ifndef MDM_SAMSUNG_REMOTEDESKTOP_H
00038 
00039 #define MDM_SAMSUNG_REMOTEDESKTOP_H
00040 
00041 
00042 
00043 #include <sys/types.h>
00044 
00045 #include <android/rect.h>
00046 
00047 
00048 
00049 // WTL_EDM
00050 
00051 
00052 
00159 namespace knoxremotedesktop {
00160 
00161 
00162 
00185 typedef enum {
00186 
00187         FD_INVALID, FD_DEV_FB0,        // FD returned from framebuffer device
00188 
00189         FD_SHARED_MEM  // FD returned from shared memory in case of surface flinger.
00190 
00191 } FDType;
00192 
00193 
00194 
00279 enum {
00280 
00281         PF_UNKNOWN, PF_RGB_565, PF_BGRA_8888, PF_RGBA_8888
00282 
00283 };
00284 
00285 
00286 
00307 typedef struct {
00308 
00317         int bpp;
00318 
00327         int redoffset;
00328 
00337         int redlength;
00338 
00347         int greenoffset;
00348 
00357         int greenlength;
00358 
00367         int blueoffset;
00368 
00377         int bluelength;
00378 
00387         int alphaoffset;
00388 
00397         int alphalength;
00398 
00399 } PixelFormatDetail;
00400 
00401 
00402 
00427 class DirtyRegion {
00428 
00429 public:
00430 
00431         DirtyRegion() :
00432 
00433                         dirtyRects(0), numRects(0), maxRects(0), dexDirtyRects(0), dexNumRects(0) {
00434 
00435         }
00436 
00437         ~DirtyRegion() {
00438 
00439         }
00440 
00441 
00442 
00443 public:
00444 
00453         ARect *dirtyRects; // Array of Rects
00454 
00455 
00456 
00465         int numRects; // Number of Dirty Rects in the Array
00466 
00467 
00468 
00477         int maxRects; // Size of Array
00478 
00479 // Dual Dex
00484     ARect *dexDirtyRects; // Array of Rects of dex screen
00485 
00490     int dexNumRects; // Number of Dirty Rects in the Array for dex screen
00491 };
00492 
00493 
00494 
00513 class IRemoteDesktopListener {
00514 
00515 public:
00516 
00517         virtual ~IRemoteDesktopListener() {
00518 
00519         }
00520 
00521 
00522 
00541         virtual void screenChanged() = 0;
00542         
00554     virtual void dexStateChanged(bool isDexConnected) = 0;
00555 
00556 };
00557 
00558 
00559 
00666 class IRemoteDesktop {
00667 
00668 public:
00669 
00670         virtual ~IRemoteDesktop() {
00671 
00672         }
00673 
00674         ;
00675 
00676 
00677 
00720         static IRemoteDesktop *getInstance();
00721 
00722 
00723 
00790         virtual bool init() = 0;
00791 
00792 
00793 
00888         virtual void getScreenInfo(int *width, int *height, int *bytesPerPixel,
00889 
00890                         int *pixelFormat) = 0;
00891 
00892 
00893 
00980         virtual bool getFrameBufInfo(int *fd, FDType *fdType) = 0;
00981 
00982 
00983 
01084         virtual bool setListener(IRemoteDesktopListener *listener) = 0;
01085 
01086 
01087 
01267         virtual bool captureScreen(DirtyRegion &region) = 0;
01268 
01269 
01270 
01341         virtual void getScreenPixelFormatInfo(PixelFormatDetail &formatDetail) = 0;
01342 
01343 
01344 
01346 
01348 
01349 
01350 
01449         virtual bool setScreenInfo(int prefW, int prefH, int prefFormat) = 0;
01450 
01451 
01452 
01543         virtual void getDefaultScreenInfo(int *hwwidth, int *hwheight,
01544 
01545                         int *hwbytesPerPixel, int *hwpixelFormat) = 0;
01546 
01547     // Dual Dex
01548 
01597     virtual int getDefaultDexScreenInfo(int *hwwidth, int *hwheight, int *hwbytesPerPixel) = 0;
01598 
01641     virtual bool setDexScreenInfo(int prefW, int prefH) = 0;
01642 
01683     virtual void getDexBufInfo(int * fdDex) = 0;
01684 
01727     virtual void getDexScreenInfo(int *width, int *height, int *bytesPerPixel) = 0;
01728 
01729 };
01730 
01731 
01732 
01733 } //namespace knoxremotedesktop
01734 
01735 
01736 
01737 #endif // MDM_SAMSUNG_REMOTEDESKTOP_H
01738 
 All Classes Namespaces Functions Variables Enumerations