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 
00157 namespace knoxremotedesktop {
00158 
00159 
00160 
00181 typedef enum {
00182 
00183         FD_INVALID, FD_DEV_FB0,        // FD returned from framebuffer device
00184 
00185         FD_SHARED_MEM  // FD returned from shared memory in case of surface flinger.
00186 
00187 } FDType;
00188 
00189 
00190 
00274 enum {
00275 
00276         PF_UNKNOWN, PF_RGB_565, PF_BGRA_8888, PF_RGBA_8888
00277 
00278 };
00279 
00280 
00281 
00300 typedef struct {
00301 
00310         int bpp;
00311 
00320         int redoffset;
00321 
00330         int redlength;
00331 
00340         int greenoffset;
00341 
00350         int greenlength;
00351 
00360         int blueoffset;
00361 
00370         int bluelength;
00371 
00380         int alphaoffset;
00381 
00390         int alphalength;
00391 
00392 } PixelFormatDetail;
00393 
00394 
00395 
00418 class DirtyRegion {
00419 
00420 public:
00421 
00422         DirtyRegion() :
00423 
00424                         dirtyRects(0), numRects(0), maxRects(0), dexDirtyRects(0), dexNumRects(0) {
00425 
00426         }
00427 
00428         ~DirtyRegion() {
00429 
00430         }
00431 
00432 
00433 
00434 public:
00435 
00444         ARect *dirtyRects; // Array of Rects
00445 
00446 
00447 
00456         int numRects; // Number of Dirty Rects in the Array
00457 
00458 
00459 
00468         int maxRects; // Size of Array
00469 
00470 // Dual Dex
00475     ARect *dexDirtyRects; // Array of Rects of dex screen
00476 
00481     int dexNumRects; // Number of Dirty Rects in the Array for dex screen
00482 };
00483 
00484 
00485 
00502 class IRemoteDesktopListener {
00503 
00504 public:
00505 
00506         virtual ~IRemoteDesktopListener() {
00507 
00508         }
00509 
00510 
00511 
00528         virtual void screenChanged() = 0;
00529         
00541     virtual void dexStateChanged(bool isDexConnected) = 0;
00542 
00543 };
00544 
00545 
00546 
00651 class IRemoteDesktop {
00652 
00653 public:
00654 
00655         virtual ~IRemoteDesktop() {
00656 
00657         }
00658 
00659         ;
00660 
00661 
00662 
00703         static IRemoteDesktop *getInstance();
00704 
00705 
00706 
00771         virtual bool init() = 0;
00772 
00773 
00774 
00867         virtual void getScreenInfo(int *width, int *height, int *bytesPerPixel,
00868 
00869                         int *pixelFormat) = 0;
00870 
00871 
00872 
00957         virtual bool getFrameBufInfo(int *fd, FDType *fdType) = 0;
00958 
00959 
00960 
01059         virtual bool setListener(IRemoteDesktopListener *listener) = 0;
01060 
01061 
01062 
01240         virtual bool captureScreen(DirtyRegion &region) = 0;
01241 
01242 
01243 
01312         virtual void getScreenPixelFormatInfo(PixelFormatDetail &formatDetail) = 0;
01313 
01314 
01315 
01317 
01319 
01320 
01321 
01418         virtual bool setScreenInfo(int prefW, int prefH, int prefFormat) = 0;
01419 
01420 
01421 
01510         virtual void getDefaultScreenInfo(int *hwwidth, int *hwheight,
01511 
01512                         int *hwbytesPerPixel, int *hwpixelFormat) = 0;
01513 
01514     // Dual Dex
01515 
01564     virtual int getDefaultDexScreenInfo(int *hwwidth, int *hwheight, int *hwbytesPerPixel) = 0;
01565 
01608     virtual bool setDexScreenInfo(int prefW, int prefH) = 0;
01609 
01650     virtual void getDexBufInfo(int * fdDex) = 0;
01651 
01694     virtual void getDexScreenInfo(int *width, int *height, int *bytesPerPixel) = 0;
01695 
01696 };
01697 
01698 
01699 
01700 } //namespace knoxremotedesktop
01701 
01702 
01703 
01704 #endif // MDM_SAMSUNG_REMOTEDESKTOP_H
01705 
 All Classes Namespaces Functions Variables Enumerations