epoc-session.hpp

Go to the documentation of this file.
00001 #ifndef __epoc_session_hpp__
00002 #define __epoc_session_hpp__
00003 
00004 #include <e32std.h>
00005 
00006 #define DEF_SESSION_OPEN(x) TBool x##IsOpen
00007 #define DEF_SESSION(t,x) t x; DEF_SESSION_OPEN(x)
00008 #define IS_SESSION_OPEN(x) (x##IsOpen)
00009 #define SET_SESSION_OPEN(x) x##IsOpen = ETrue
00010 #define SET_SESSION_CLOSED(x) x##IsOpen = EFalse
00011 #define SESSION_CLOSE_IF_OPEN(x) { if (IS_SESSION_OPEN(x)) { x.Close(); SET_SESSION_CLOSED(x); } }
00012 #define LEAVE_IF_ERROR_OR_SET_SESSION_OPEN(x,act) { User::LeaveIfError(act); x##IsOpen = ETrue; }
00013 
00014 #endif /* __epoc_session_hpp__ */
00015 
00016 /**
00017 
00018 epoc-session.hpp
00019 
00020 Copyright 2009 Helsinki Institute for Information Technology (HIIT)
00021 and the authors. All rights reserved.
00022 
00023 Authors: Tero Hasu <tero.hasu@hut.fi>
00024 
00025 Permission is hereby granted, free of charge, to any person
00026 obtaining a copy of this software and associated documentation files
00027 (the "Software"), to deal in the Software without restriction,
00028 including without limitation the rights to use, copy, modify, merge,
00029 publish, distribute, sublicense, and/or sell copies of the Software,
00030 and to permit persons to whom the Software is furnished to do so,
00031 subject to the following conditions:
00032 
00033 The above copyright notice and this permission notice shall be
00034 included in all copies or substantial portions of the Software.
00035 
00036 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00037 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00038 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00039 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
00040 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
00041 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00042 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
00043 SOFTWARE.
00044 
00045  **/

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