|
Nokia N97 SDK Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : applicationusinguisettings.h 00004 * Part of : datamobility 00005 * Description : Example of class declaration using connection 00006 * and connection UI settings. 00007 * 00008 * Copyright (c) 2007 Nokia Corporation. 00009 * This material, including documentation and any related 00010 * computer programs, is protected by copyright controlled by 00011 * Nokia Corporation. 00012 * ============================================================================== 00013 */ 00014 00015 #ifndef APPLICATIONUSINGUISETTINGS_H 00016 #define APPLICATIONUSINGUISETTINGS_H 00017 00018 // INCLUDES 00019 #include <e32base.h> 00020 #include <in_sock.h> 00021 #include <cmapplicationsettingsui.h> 00022 00023 // FORWARD DECLARATIONS 00024 class MDataMobilityPrinter; 00025 00026 // CLASS DECLARATION 00027 00028 /** 00029 * CApplicationUsingUiSettings example of class using connection 00030 * and connection UI settings. 00031 * 00032 */ 00033 class CApplicationUsingUiSettings : public CActive 00034 { 00035 public: // Constructors and destructor 00036 00037 /** 00038 * NewL is first phase of two-phased constructor. 00039 */ 00040 static CApplicationUsingUiSettings* NewL( MDataMobilityPrinter& aObserver ); 00041 00042 /** 00043 * Destructor of ApplicationUsingUiSettings. 00044 */ 00045 ~CApplicationUsingUiSettings(); 00046 00047 public: // From CActive 00048 00049 void RunL(); 00050 00051 void DoCancel(); 00052 00053 public: // New functions 00054 00055 /** 00056 * Start the connection. 00057 */ 00058 void StartL(); 00059 00060 TBool ConnectionSettingL(); 00061 00062 private: 00063 00064 /** 00065 * C++ default constructor. 00066 */ 00067 CApplicationUsingUiSettings( MDataMobilityPrinter& aObserver ); 00068 00069 /** 00070 * By default Symbian OS constructor is private. 00071 */ 00072 void ConstructL(); 00073 00074 /** 00075 * Helper method to send message to print to the observer. 00076 * @param aResourceId Resource identifier of the string to print. 00077 */ 00078 void PrintL( TInt aResourceId ); 00079 00080 /** 00081 * Helper method to send message to print to the observer. 00082 * @param aResourceId Resource identifier of the string to print. 00083 * @param aInt Integer value replacing %N in the string. 00084 */ 00085 void PrintL( TInt aResourceId, TInt aInt ); 00086 00087 private: // Data 00088 00089 MDataMobilityPrinter& iObserver; // Pointer to Observer 00090 RConnection iConnection; 00091 RSocketServ iSocketServer; 00092 TCmSettingSelection iUserSelection; 00093 }; 00094 00095 #endif // APPLICATIONUSINGUISETTINGS_H 00096
|
© Nokia 2009 |