- Timestamp:
- Mar 12, 2009 6:11:37 PM (16 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk
-
Property
svn:mergeinfo
set to
False
/pjproject/branches/projects/aps-direct merged eligible
-
Property
svn:mergeinfo
set to
False
-
pjproject/trunk/pjsip-apps/src/symsndtest/main_symbian.cpp
r2394 r2506 30 30 31 31 // Needed by APS 32 TPtrC APP_UID = _L("A000000 D");32 TPtrC APP_UID = _L("A000000E"); 33 33 34 34 int app_main(); 35 35 36 37 ////////////////////////////////////////////////////////////////////////////38 class MyTask : public CActive39 {40 public:41 static MyTask *NewL(CActiveSchedulerWait *asw);42 ~MyTask();43 void Start();44 45 protected:46 MyTask(CActiveSchedulerWait *asw);47 void ConstructL();48 virtual void RunL();49 virtual void DoCancel();50 51 private:52 RTimer timer_;53 CActiveSchedulerWait *asw_;54 };55 56 MyTask::MyTask(CActiveSchedulerWait *asw)57 : CActive(EPriorityNormal), asw_(asw)58 {59 }60 61 MyTask::~MyTask()62 {63 timer_.Close();64 }65 66 void MyTask::ConstructL()67 {68 timer_.CreateLocal();69 CActiveScheduler::Add(this);70 }71 72 MyTask *MyTask::NewL(CActiveSchedulerWait *asw)73 {74 MyTask *self = new (ELeave) MyTask(asw);75 CleanupStack::PushL(self);76 77 self->ConstructL();78 79 CleanupStack::Pop(self);80 return self;81 }82 83 void MyTask::Start()84 {85 timer_.After(iStatus, 0);86 SetActive();87 }88 89 void MyTask::RunL()90 {91 int rc = app_main();92 asw_->AsyncStop();93 }94 95 void MyTask::DoCancel()96 {97 98 }99 36 100 37 //////////////////////////////////////////////////////////////////////////// … … 106 43 CActiveScheduler::Install(scheduler); 107 44 108 CActiveSchedulerWait *asw = new CActiveSchedulerWait; 109 CleanupStack::PushL(asw); 110 111 MyTask *task = MyTask::NewL(asw); 112 task->Start(); 45 app_main(); 113 46 114 asw->Start();115 116 delete task;117 118 CleanupStack::Pop(asw);119 delete asw;120 121 47 CActiveScheduler::Install(NULL); 122 48 CleanupStack::Pop(scheduler); … … 143 69 TRAPD(startError, DoStartL()); 144 70 145 console->Printf(_L("[press any key to close]\n"));146 console->Getch();147 71 //console->Printf(_L("[press any key to close]\n")); 72 //console->Getch(); 73 148 74 delete console; 149 75 delete cleanup; 150 76 151 CloseSTDLIB(); 77 CloseSTDLIB(); 152 78 153 79 // Mark end of heap usage, detect memory leaks
Note: See TracChangeset
for help on using the changeset viewer.