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 00161 namespace knoxremotedesktop { 00162 00163 00164 00189 typedef enum { 00190 00191 FD_INVALID, FD_DEV_FB0, // FD returned from framebuffer device 00192 00193 FD_SHARED_MEM // FD returned from shared memory in case of surface flinger. 00194 00195 } FDType; 00196 00197 00198 00285 enum { 00286 00287 PF_UNKNOWN, PF_RGB_565, PF_BGRA_8888, PF_RGBA_8888 00288 00289 }; 00290 00291 00292 00315 typedef struct { 00316 00325 int bpp; 00326 00335 int redoffset; 00336 00345 int redlength; 00346 00355 int greenoffset; 00356 00365 int greenlength; 00366 00375 int blueoffset; 00376 00385 int bluelength; 00386 00395 int alphaoffset; 00396 00405 int alphalength; 00406 00407 } PixelFormatDetail; 00408 00409 00410 00437 class DirtyRegion { 00438 00439 public: 00440 00441 DirtyRegion() : 00442 00443 dirtyRects(0), numRects(0), maxRects(0), dexDirtyRects(0), dexNumRects(0) { 00444 00445 } 00446 00447 ~DirtyRegion() { 00448 00449 } 00450 00451 00452 00453 public: 00454 00463 ARect *dirtyRects; // Array of Rects 00464 00465 00466 00475 int numRects; // Number of Dirty Rects in the Array 00476 00477 00478 00487 int maxRects; // Size of Array 00488 00489 // Dual Dex 00494 ARect *dexDirtyRects; // Array of Rects of dex screen 00495 00500 int dexNumRects; // Number of Dirty Rects in the Array for dex screen 00501 }; 00502 00503 00504 00525 class IRemoteDesktopListener { 00526 00527 public: 00528 00529 virtual ~IRemoteDesktopListener() { 00530 00531 } 00532 00533 00534 00555 virtual void screenChanged() = 0; 00556 00568 virtual void dexStateChanged(bool isDexConnected) = 0; 00569 00570 }; 00571 00572 00573 00682 class IRemoteDesktop { 00683 00684 public: 00685 00686 virtual ~IRemoteDesktop() { 00687 00688 } 00689 00690 ; 00691 00692 00693 00738 static IRemoteDesktop *getInstance(); 00739 00740 00741 00810 virtual bool init() = 0; 00811 00812 00813 00910 virtual void getScreenInfo(int *width, int *height, int *bytesPerPixel, 00911 00912 int *pixelFormat) = 0; 00913 00914 00915 01004 virtual bool getFrameBufInfo(int *fd, FDType *fdType) = 0; 01005 01006 01007 01110 virtual bool setListener(IRemoteDesktopListener *listener) = 0; 01111 01112 01113 01295 virtual bool captureScreen(DirtyRegion ®ion) = 0; 01296 01297 01298 01371 virtual void getScreenPixelFormatInfo(PixelFormatDetail &formatDetail) = 0; 01372 01373 01374 01376 01378 01379 01380 01481 virtual bool setScreenInfo(int prefW, int prefH, int prefFormat) = 0; 01482 01483 01484 01577 virtual void getDefaultScreenInfo(int *hwwidth, int *hwheight, 01578 01579 int *hwbytesPerPixel, int *hwpixelFormat) = 0; 01580 01581 // Dual Dex 01582 01632 virtual int getDefaultDexScreenInfo(int *hwwidth, int *hwheight, int *hwbytesPerPixel) = 0; 01633 01677 virtual bool setDexScreenInfo(int prefW, int prefH) = 0; 01678 01720 virtual void getDexBufInfo(int * fdDex) = 0; 01721 01765 virtual void getDexScreenInfo(int *width, int *height, int *bytesPerPixel) = 0; 01766 01767 }; 01768 01769 01770 01771 } //namespace knoxremotedesktop 01772 01773 01774 01775 #endif // MDM_SAMSUNG_REMOTEDESKTOP_H 01776