examples/SFExamples/RecipeEx/inc/DeviceCapabilitiesScan.h

00001 // Symbian Foundation Example Code
00002 // 
00003 // This software is in the public domain. No copyright is claimed, and you 
00004 // may use it for any purpose without license from the Symbian Foundation.
00005 // No warranty for any purpose is expressed or implied by the authors or
00006 // the Symbian Foundation. 
00007 
00008 
00009 #ifndef __DEVICECAPABILITIESSCAN_H__
00010 #define __DEVICECAPABILITIESSCAN_H__
00011 
00012 #include <e32base.h>    
00013 #include <e32std.h>     
00014 
00015 // Forward declarations
00016 class CLogContainer;
00017 
00026 class CDeviceCapabilitiesScan : public CActive
00027         {
00028 public: // Construction / Destruction
00029 
00033         static CDeviceCapabilitiesScan* NewL(CLogContainer* aLogView);
00034 
00038         static CDeviceCapabilitiesScan* NewLC(CLogContainer* aLogView);
00039 
00041         ~CDeviceCapabilitiesScan();
00042 
00043 public:
00044         
00046         void Start();
00047 
00048 private:
00049         
00053         CDeviceCapabilitiesScan(CLogContainer* aLogView);
00054 
00056         void ConstructL();
00057 
00058 private: // From CActive
00059 
00061         void RunL();
00062 
00064         void DoCancel();
00065 
00067         TInt RunError(TInt aError);
00068         
00069 private:  // Helper functions
00070         
00072         void SelfComplete(TInt aErr);
00073         
00075         const TDesC& DisplayMode(TDisplayMode aMode);
00076 
00078         const TDesC& Orientation(CFbsBitGc::TGraphicsOrientation aOrientation);
00079 
00080 private: // Device capabilities functions       
00081         
00082         /* Discover and log the platform version information string */
00083         void DiscoverPlatformVersionTextL();    
00084         
00085         /* Discover and log the number of screens provided, display mode and number of screen modes */  
00086         void DiscoverDisplayScreensInfoL();     
00087 
00088         /* For each screen mode, log size in pixels and twips and orientation */
00089         void FormatScreenInfoByModeL(CWsScreenDevice& aScreenDevice, TInt aScreenMode); 
00090         
00091         /* Check if touch or pen support is provided */
00092         void CheckForTouchSupportL();
00093         
00094         /* Discover available input modes */
00095         void DiscoverAvailableInputModesL();
00096 
00097         /* Enumerate available input modes */
00098         void EnumerateAvailableInputModesL();
00099         
00100         /* Discover and log multimedia plugin support */        
00101         void DiscoverMultimediaPluginSupportL();
00102         
00103         /* Discover available Sensors */        
00104         void DiscoverAvailableSensorsL();
00105         
00106         
00107 private:
00108         
00110         enum TDeviceCapabilitiesScanState
00111                 {
00112                 EUninitialized, // Uninitialized
00113                 EDiscoveringPlatformVersion, // Requesting platform version ie: 5.0
00114                 EDiscoveringDisplayScreenInfo, // Requesting number of screens and display modes etc
00115                 EDiscoveringInputCapabilities,
00116                 EDiscoveringMultimediaEcomPlugins,
00117                 EDiscoveringAvailableSensors,
00118                 EError
00119                 };
00120 
00121 private:
00122         
00124         TDeviceCapabilitiesScanState iState; 
00125         
00127         CLogContainer* iLogView;
00128         
00129         };
00130 
00131 
00132 
00133 #endif // __DEVICECAPABILITIESSCAN_H__
00134 
00135 
00136 // End of File
00137 

Generated by  doxygen 1.6.2