ut_immediate_epoc.hpp

Go to the documentation of this file.
00001 /*
00002  !concept {:name => "A generic AO that completes immediately",
00003    :desc => "A Symbian active object (AO) that does nothing but gives the event loop a chance to run before invoking its callback."}
00004 */
00005 
00006 #ifndef __ut_immediate_epoc_hpp__
00007 #define __ut_immediate_epoc_hpp__
00008 
00009 #include <e32base.h>
00010 
00011 class MImmediateObserver
00012 {
00013 public:
00014   virtual void HandleImmediateEvent() = 0;
00015   virtual TInt HandleImmediateError(TInt errCode);
00016   virtual TInt HandleImmediateLeave(TInt errCode);
00017 };
00018 
00019 NONSHARABLE_CLASS(CImmediateAo) : public CActive
00020 {
00021  public:
00022   static CImmediateAo* NewL(MImmediateObserver& aObserver);
00023   ~CImmediateAo();
00024 
00025  private:
00026   CImmediateAo(MImmediateObserver& aObserver);
00027 
00028  public:
00029   void Complete();
00030 
00031  private:
00032   void DoCancel();
00033   TInt RunError(TInt aError);
00034   void RunL();
00035 
00036  private:
00037   MImmediateObserver& iObserver;
00038 };
00039 
00040 #endif /* __ut_immediate_epoc_hpp__ */
00041 
00042 /**
00043 
00044 Copyright 2010 Helsinki Institute for Information Technology (HIIT)
00045 and the authors. All rights reserved.
00046 
00047 Authors: Tero Hasu <tero.hasu@hut.fi>
00048 
00049 Permission is hereby granted, free of charge, to any person
00050 obtaining a copy of this software and associated documentation files
00051 (the "Software"), to deal in the Software without restriction,
00052 including without limitation the rights to use, copy, modify, merge,
00053 publish, distribute, sublicense, and/or sell copies of the Software,
00054 and to permit persons to whom the Software is furnished to do so,
00055 subject to the following conditions:
00056 
00057 The above copyright notice and this permission notice shall be
00058 included in all copies or substantial portions of the Software.
00059 
00060 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00061 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00062 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00063 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
00064 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
00065 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00066 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
00067 SOFTWARE.
00068 
00069  **/

ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:57 2011 by Doxygen 1.6.1