|
Nokia N97 SDK Example Applications Guide |
#include <applicationusinguisettings.h>
Inheritance diagram for CApplicationUsingUiSettings:

Definition at line 33 of file applicationusinguisettings.h.
Public Member Functions |
|
| ~CApplicationUsingUiSettings () | |
| void | RunL () |
| void | DoCancel () |
| void | StartL () |
| TBool | ConnectionSettingL () |
Static Public Member Functions |
|
| static CApplicationUsingUiSettings * | NewL (MDataMobilityPrinter &aObserver) |
Private Member Functions |
|
| CApplicationUsingUiSettings (MDataMobilityPrinter &aObserver) | |
| void | ConstructL () |
| void | PrintL (TInt aResourceId) |
| void | PrintL (TInt aResourceId, TInt aInt) |
Private Attributes |
|
| MDataMobilityPrinter & | iObserver |
| RConnection | iConnection |
| RSocketServ | iSocketServer |
| TCmSettingSelection | iUserSelection |
|
|
Destructor of ApplicationUsingUiSettings. Definition at line 62 of file applicationusinguisettings.cpp. References iConnection, and iSocketServer. 00063 { 00064 Cancel(); 00065 00066 iConnection.Close(); 00067 00068 iSocketServer.Close(); 00069 }
|
|
|
C++ default constructor. Definition at line 51 of file applicationusinguisettings.cpp. Referenced by NewL(). 00052 : CActive( CActive::EPriorityStandard ), 00053 iObserver( aObserver ) 00054 { 00055 CActiveScheduler::Add( this ); 00056 }
|
|
|
NewL is first phase of two-phased constructor. Definition at line 28 of file applicationusinguisettings.cpp. References CApplicationUsingUiSettings(). 00029 { 00030 CApplicationUsingUiSettings* self = 00031 new ( ELeave ) CApplicationUsingUiSettings( aObserver ); 00032 CleanupStack::PushL( self ); 00033 self->ConstructL(); 00034 CleanupStack::Pop( self ); 00035 return self; 00036 }
|
|
|
Start the connection. Definition at line 75 of file applicationusinguisettings.cpp. References ConnectionSettingL(), iConnection, iSocketServer, iUserSelection, and PrintL(). 00076 { 00077 User::LeaveIfError( iConnection.Open( iSocketServer ) ); 00078 00079 TBool selected = ConnectionSettingL(); 00080 00081 if ( !selected ) 00082 { 00083 PrintL( R_OUTPUT_USER_CANCELLED_THE_SELECTION ); 00084 return; 00085 } 00086 00087 switch ( iUserSelection.iResult ) 00088 { 00089 case CMManager::EDestination: 00090 { 00091 TConnSnapPref prefs; 00092 prefs.SetSnap( iUserSelection.iId ); 00093 00094 PrintL( R_OUTPUT_START_CONNECTION_WITH_PREFERENCES ); 00095 00096 PrintL( R_OUTPUT_SNAP_ID, prefs.Snap() ); 00097 00098 iConnection.Start( prefs, iStatus ); 00099 break; 00100 } 00101 case CMManager::EConnectionMethod: 00102 { 00103 TCommDbConnPref prefs; 00104 prefs.SetIapId( iUserSelection.iId ); 00105 prefs.SetDialogPreference( ECommDbDialogPrefDoNotPrompt ); 00106 00107 PrintL( R_OUTPUT_START_CONNECTION_WITH_PREFERENCES ); 00108 00109 PrintL( R_OUTPUT_IAP_ID, prefs.IapId() ); 00110 00111 iConnection.Start( prefs, iStatus ); 00112 break; 00113 } 00114 case CMManager::EDefaultConnection: 00115 { 00116 PrintL( R_OUTPUT_ATTEMPT_TO_USE_THE_DFT_CONNECTION ); 00117 00118 iConnection.Start( iStatus ); 00119 break; 00120 } 00121 default: // CMManager::EAlwaysAsk 00122 { 00123 TCommDbConnPref prefs; 00124 prefs.SetDialogPreference( ECommDbDialogPrefPrompt ); 00125 00126 PrintL( R_OUTPUT_PROMPT_CONNECTION_DIALOG ); 00127 00128 iConnection.Start( prefs, iStatus ); 00129 } 00130 } 00131 00132 SetActive(); 00133 }
|
|
|
By default Symbian OS constructor is private. Definition at line 42 of file applicationusinguisettings.cpp. References iSocketServer. 00043 { 00044 User::LeaveIfError( iSocketServer.Connect() ); 00045 }
|
|
|
Helper method to send message to print to the observer.
Definition at line 193 of file applicationusinguisettings.cpp. References iObserver, and MDataMobilityPrinter::Print(). Referenced by RunL(), and StartL(). 00194 { 00195 // Load a string from the resource file. 00196 HBufC* message = StringLoader::LoadL( aResourceId ); 00197 00198 iObserver.Print( *message ); 00199 00200 delete message; 00201 }
|
|
||||||||||||
|
Helper method to send message to print to the observer.
Definition at line 207 of file applicationusinguisettings.cpp. References iObserver, and MDataMobilityPrinter::Print(). 00208 { 00209 // Load a string from the resource file. 00210 HBufC* message = StringLoader::LoadL( aResourceId, aInt ); 00211 00212 iObserver.Print( *message ); 00213 00214 delete message; 00215 }
|
|
© Nokia 2009 |