Ignore:
Timestamp:
Mar 12, 2009 6:11:37 PM (16 years ago)
Author:
bennylp
Message:

(Major) Task #737 and #738: integration of APS-Direct and Audiodev from aps-direct branch to trunk.

Location:
pjproject/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk

  • pjproject/trunk/pjsip-apps/src/symsndtest/main_symbian.cpp

    r2394 r2506  
    3030 
    3131// Needed by APS 
    32 TPtrC APP_UID = _L("A000000D"); 
     32TPtrC APP_UID = _L("A000000E"); 
    3333 
    3434int app_main(); 
    3535 
    36  
    37 //////////////////////////////////////////////////////////////////////////// 
    38 class MyTask : public CActive 
    39 { 
    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 } 
    9936 
    10037//////////////////////////////////////////////////////////////////////////// 
     
    10643    CActiveScheduler::Install(scheduler); 
    10744 
    108     CActiveSchedulerWait *asw = new CActiveSchedulerWait; 
    109     CleanupStack::PushL(asw); 
    110      
    111     MyTask *task = MyTask::NewL(asw); 
    112     task->Start(); 
     45    app_main(); 
    11346 
    114     asw->Start(); 
    115      
    116     delete task; 
    117      
    118     CleanupStack::Pop(asw); 
    119     delete asw; 
    120      
    12147    CActiveScheduler::Install(NULL); 
    12248    CleanupStack::Pop(scheduler); 
     
    14369    TRAPD(startError, DoStartL()); 
    14470 
    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 
    14874    delete console; 
    14975    delete cleanup; 
    15076 
    151     CloseSTDLIB();  
     77    CloseSTDLIB(); 
    15278 
    15379    // Mark end of heap usage, detect memory leaks 
Note: See TracChangeset for help on using the changeset viewer.