📄 contextnotify.h
字号:
/*
002 Copyright (C) 2004 Mika Raento - Renaud Petit
003
004 This program is free software; you can redistribute it and/or modify
005 it under the terms of the GNU General Public License as published by
006 the Free Software Foundation; either version 2 of the License, or
007 (at your option) any later version.
008
009 This program is distributed in the hope that it will be useful,
010 but WITHOUT ANY WARRANTY; without even the implied warranty of
011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
012 GNU General Public License for more details.
013
014 You should have received a copy of the GNU General Public License
015 along with this program; if not, write to the Free Software
016 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
017
018
019 email: mraento@cs.helsinki.fi - petit@cs.helsinki.fi
020 */
021
022
023 #ifndef __CONTEXTNOTIFY__
024 #define __CONTEXTNOTIFY__
025
026 #include <e32base.h>
027 #include <w32std.h>
028
029 #include "NotifyCommon.h"
030 #include "drawer.h"
031 #include "foreground.h"
032
033 class CContextNotify : public CServer
034 {
035 public:
036
037 static CContextNotify* NewL();
038 static CContextNotify* NewLC();
039 ~CContextNotify();
040
041 static TInt ThreadFunction(TAny* aNone);
042
043 void IncrementSessions();
044 void DecrementSessions();
045
046 void RunL();
047 TInt CheckedRunError(TInt aError);
048
049 CContextNotify(TInt aPriority) ;
050
051 void ConstructL() ;
052
053 static void PanicClient(const RMessage& aMessage, TContextNotifyPanic aReason);
054 static void PanicServer(TContextNotifyPanic aReason);
055 static void ThreadFunctionL();
056
057 //-------------------------------------------------------------
058 // communications ...
059 //-------------------------------------------------------------
060
061 void TerminateContextNotify();
062
063 void CancelRequest(const RMessage &aMessage);
064
065 public:
066 TInt AddIconL(TInt aIconHandle, TInt aMaskHandle);
067 void ChangeIconL(TInt aId, TInt aIconHandle, TInt aMaskHandle);
068 void RemoveIcon(TInt aId);
069
070 void ReportError(TContextNotifyRqstComplete aErrorType, TDesC & aErrorCode, TDesC & aErrorValue);
071
072 enum TEvent { ETerminated };
073 private:
074 void NotifySessions(TEvent aEvent);
075
076 TInt iSessionCount;
077 CSharableSession * NewSessionL(const TVersion &aVersion) const;
078
079 RWsSession iWsSession; bool ws_is_open;
080 CDrawer* iDrawer;
081 CForeground* iForeground;
082
083 };
084
085 #endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -