- Timestamp:
- May 2, 2007 6:54:19 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/symbian_ua/main_symbian.cpp
r1242 r1244 133 133 134 134 135 //////////////////////////////////////////////////////////////////////////// 136 137 class TMyTrapHandler : public TTrapHandler 138 { 139 public: 140 void Install(); 141 void Uninstall(); 142 virtual IMPORT_C void Trap(); 143 virtual IMPORT_C void UnTrap(); 144 virtual IMPORT_C void Leave(TInt aValue); 145 146 private: 147 TTrapHandler *prev_; 148 }; 149 150 void TMyTrapHandler::Install() { 151 prev_ = User::SetTrapHandler(this); 152 } 153 154 void TMyTrapHandler::Uninstall() { 155 User::SetTrapHandler(prev_); 156 } 157 158 IMPORT_C void TMyTrapHandler::Trap() 159 { 160 prev_->Trap(); 161 } 162 163 IMPORT_C void TMyTrapHandler::UnTrap() 164 { 165 prev_->UnTrap(); 166 } 167 168 IMPORT_C void TMyTrapHandler::Leave(TInt aValue) 169 { 170 prev_->Leave(aValue); 171 } 172 173 174 //////////////////////////////////////////////////////////////////////////// 175 135 176 // Global Functions 136 177 GLDEF_C TInt E32Main() 137 178 { 179 TMyTrapHandler th; 180 181 th.Install(); 182 138 183 // Create cleanup stack 139 184 //__UHEAP_MARK; … … 153 198 delete cleanup; 154 199 //__UHEAP_MARKEND; 200 201 th.Uninstall(); 155 202 return KErrNone; 156 203 }
Note: See TracChangeset
for help on using the changeset viewer.