00001 /* 00002 !concept {:name => "Catching SMS control messages"} 00003 */ 00004 00005 #ifndef __kr_sms_trigger_epoc_hpp__ 00006 #define __kr_sms_trigger_epoc_hpp__ 00007 00008 #include "ac_app_context.h" 00009 #include "utils_cl2.h" 00010 00011 #include <e32base.h> 00012 #include <es_sock.h> 00013 #include <gsmubuf.h> 00014 #include <gsmumsg.h> 00015 #include <smsuaddr.h> 00016 00017 /***koog 00018 (require racket/class) 00019 (require codegen/symbian-ctor) 00020 00021 (ctor-defines (new 00022 (class ctor% 00023 (super-new) 00024 (define/override (class-name) "CSmsTrigger") 00025 (define/override (args/string) "ac_AppContext* aAppContext") 00026 (define/override (init-expr) "CActive(EPriorityStandard), iAppContext(aAppContext), iFs(ac_Fs(aAppContext))") 00027 (define/override (ctor-code) "CActiveScheduler::Add(this);") 00028 ))) 00029 ***/ 00030 #define CTOR_DECL_CSmsTrigger \ 00031 public: static CSmsTrigger* NewLC(ac_AppContext* aAppContext); \ 00032 public: static CSmsTrigger* NewL(ac_AppContext* aAppContext); \ 00033 private: CSmsTrigger(ac_AppContext* aAppContext); \ 00034 private: void ConstructL(); 00035 00036 #define CTOR_IMPL_CSmsTrigger \ 00037 CSmsTrigger* CSmsTrigger::NewLC(ac_AppContext* aAppContext) \ 00038 { \ 00039 CSmsTrigger* obj = new (ELeave) CSmsTrigger(aAppContext); \ 00040 CleanupStack::PushL(obj); \ 00041 obj->ConstructL(); \ 00042 return obj; \ 00043 } \ 00044 \ 00045 CSmsTrigger* CSmsTrigger::NewL(ac_AppContext* aAppContext) \ 00046 { \ 00047 CSmsTrigger* obj = CSmsTrigger::NewLC(aAppContext); \ 00048 CleanupStack::Pop(obj); \ 00049 return obj; \ 00050 } \ 00051 \ 00052 CSmsTrigger::CSmsTrigger(ac_AppContext* aAppContext) : CActive(EPriorityStandard), iAppContext(aAppContext), iFs(ac_Fs(aAppContext)) \ 00053 {CActiveScheduler::Add(this);} 00054 /***end***/ 00055 00056 NONSHARABLE_CLASS(CSmsTrigger) : 00057 public CActive 00058 { 00059 CTOR_DECL_CSmsTrigger; 00060 00061 public: 00062 ~CSmsTrigger(); 00063 00064 private: 00065 ac_AppContext* iAppContext; 00066 RFs& iFs; 00067 DEF_SESSION(RSocketServ, iSocketServ); 00068 DEF_SESSION(RSocket, iSocket); 00069 TSmsAddr iSmsAddr; 00070 TPckgBuf<TUint> iPckgBuf; 00071 TBool iRead; // Ioctl read request (otherwise succeeded request) 00072 00073 private: // CActive 00074 virtual void RunL(); 00075 virtual void DoCancel(); 00076 virtual TInt RunError(TInt errCode); 00077 00078 private: 00079 void MakeRequest(); 00080 }; 00081 00082 #endif /* __kr_sms_trigger_epoc_hpp__ */ 00083 00084 /** 00085 00086 Copyright 2011 Helsinki Institute for Information Technology (HIIT) 00087 and the authors. All rights reserved. 00088 00089 Authors: Tero Hasu <tero.hasu@hut.fi> 00090 00091 Permission is hereby granted, free of charge, to any person 00092 obtaining a copy of this software and associated documentation files 00093 (the "Software"), to deal in the Software without restriction, 00094 including without limitation the rights to use, copy, modify, merge, 00095 publish, distribute, sublicense, and/or sell copies of the Software, 00096 and to permit persons to whom the Software is furnished to do so, 00097 subject to the following conditions: 00098 00099 The above copyright notice and this permission notice shall be 00100 included in all copies or substantial portions of the Software. 00101 00102 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00103 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00104 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00105 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 00106 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 00107 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 00108 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 00109 SOFTWARE. 00110 00111 **/
ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:54 2011 by Doxygen 1.6.1