- Timestamp:
- Dec 17, 2008 11:36:22 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/symbian_ua/main_symbian.cpp
r2174 r2379 29 29 30 30 // Needed by APS 31 TPtrC APP_UID = _L("A000000 E");31 TPtrC APP_UID = _L("A000000D"); 32 32 33 34 ////////////////////////////////////////////////////////////////////////////35 class MyTask : public CActive36 {37 public:38 static MyTask *NewL(CActiveSchedulerWait *asw);39 ~MyTask();40 void Start();41 42 protected:43 MyTask(CActiveSchedulerWait *asw);44 void ConstructL();45 virtual void RunL();46 virtual void DoCancel();47 48 private:49 RTimer timer_;50 CActiveSchedulerWait *asw_;51 };52 53 MyTask::MyTask(CActiveSchedulerWait *asw)54 : CActive(EPriorityNormal), asw_(asw)55 {56 }57 58 MyTask::~MyTask()59 {60 timer_.Close();61 }62 63 void MyTask::ConstructL()64 {65 timer_.CreateLocal();66 CActiveScheduler::Add(this);67 }68 69 MyTask *MyTask::NewL(CActiveSchedulerWait *asw)70 {71 MyTask *self = new (ELeave) MyTask(asw);72 CleanupStack::PushL(self);73 74 self->ConstructL();75 76 CleanupStack::Pop(self);77 return self;78 }79 80 void MyTask::Start()81 {82 timer_.After(iStatus, 0);83 SetActive();84 }85 86 void MyTask::RunL()87 {88 ua_main();89 asw_->AsyncStop();90 }91 92 void MyTask::DoCancel()93 {94 95 }96 33 97 34 //////////////////////////////////////////////////////////////////////////// … … 103 40 CActiveScheduler::Install(scheduler); 104 41 105 CActiveSchedulerWait *asw = new CActiveSchedulerWait; 106 CleanupStack::PushL(asw); 107 108 MyTask *task = MyTask::NewL(asw); 109 task->Start(); 110 111 asw->Start(); 112 113 delete task; 114 115 CleanupStack::Pop(asw); 116 delete asw; 42 ua_main(); 117 43 118 44 CActiveScheduler::Install(NULL);
Note: See TracChangeset
for help on using the changeset viewer.