|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
#include <LandmarksLmOpWrapper.h>
Public Member Functions | |
| CLandmarksLmOpWrapper () | |
| ~CLandmarksLmOpWrapper () | |
| void | StartOperation (CPosLmOperation *aLmOperation, TRequestStatus &aStatus, TBool aReportProgress=EFalse) |
| CPosLmOperation * | LmOperationPtr () |
| void | ExecuteNextStep (TRequestStatus &aStatus) |
| TInt | Progress () |
Protected Member Functions | |
| void | DoCancel () |
| void | RunL () |
Private Member Functions | |
| void | ExecuteNextStep () |
Private Attributes | |
| CPosLmOperation * | iLmOperation |
| the wrapped CPosLmOperation that is executed | |
| TReal32 | iProgress |
| contains a value between 0-1 and indicates the progress | |
| TRequestStatus * | iCallerStatus |
| the req. status of the caller executing the operation | |
| TBool | iReportProgress |
| indicates if progress should be reported or not | |
Definition at line 36 of file LandmarksLmOpWrapper.h.
|
|
C++ default constructor. Definition at line 30 of file LandmarksLmOpWrapper.cpp.
|
|
|
Destructor. Definition at line 37 of file LandmarksLmOpWrapper.cpp. References iLmOperation. 00038 { 00039 Cancel(); 00040 delete iLmOperation; 00041 iLmOperation = NULL; 00042 }
|
|
||||||||||||||||
|
Starts execution of the supplied operation.
Definition at line 50 of file LandmarksLmOpWrapper.cpp. References ExecuteNextStep(), iCallerStatus, iLmOperation, iProgress, and iReportProgress. 00054 { 00055 delete iLmOperation; 00056 iLmOperation = aLmOperation; 00057 iCallerStatus = &aStatus; 00058 iReportProgress = aReportProgress; 00059 iProgress = 0; 00060 00061 ExecuteNextStep(); 00062 }
|
|
|
Returns a pointer to the wrapped CPosLmOperation object. This object keeps ownership of the operation.
Definition at line 70 of file LandmarksLmOpWrapper.cpp. References iLmOperation. 00071 { 00072 return iLmOperation; 00073 }
|
|
|
Executes the next step of the incremental operation. Typically called when progress of the CPosLmOperaiotion is reported.
Definition at line 81 of file LandmarksLmOpWrapper.cpp. References ExecuteNextStep(), and iCallerStatus. 00082 { 00083 iCallerStatus = &aStatus; 00084 ExecuteNextStep(); 00085 }
|
|
|
Return the current progress of the CPosLmnOperation.
Definition at line 93 of file LandmarksLmOpWrapper.cpp. References iProgress. 00094 { 00095 return (TInt) (iProgress * 100); 00096 }
|
|
|
Implements cancellation of an outstanding request. Definition at line 104 of file LandmarksLmOpWrapper.cpp. References iCallerStatus, and iLmOperation. 00105 { 00106 delete iLmOperation; 00107 iLmOperation = NULL; 00108 User::RequestComplete(iCallerStatus, KErrCancel); 00109 }
|
|
|
Handles an active object’s request completion event. Definition at line 117 of file LandmarksLmOpWrapper.cpp. References ExecuteNextStep(), iCallerStatus, and iReportProgress. 00118 { 00119 if (iStatus == KErrNone) 00120 { 00121 // Operation finished. 00122 User::RequestComplete(iCallerStatus, KErrNone); 00123 } 00124 else if (iStatus == KPosLmOperationNotComplete) 00125 { 00126 if (iReportProgress) 00127 { 00128 User::RequestComplete(iCallerStatus, KPosLmOperationNotComplete); 00129 } 00130 else 00131 { 00132 ExecuteNextStep(); 00133 } 00134 } 00135 }
|
|
|
Executes the next step of the incremental operation. Definition at line 143 of file LandmarksLmOpWrapper.cpp. References iLmOperation, and iProgress. 00144 { 00145 iStatus = KRequestPending; 00146 iLmOperation->NextStep(iStatus, iProgress); 00147 SetActive(); 00148 }
|
|
© Nokia 2006 |