sl@0: /* sl@0: * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * Name : signalserver.h sl@0: * Part of : Signal server sl@0: * sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: #ifndef SIGNALSERVER_H sl@0: #define SIGNALSERVER_H sl@0: sl@0: // INCLUDES sl@0: #include sl@0: #include sl@0: #include "signalshutdown.h" sl@0: #include "rpipe.h" sl@0: sl@0: /* sl@0: server name sl@0: */ sl@0: _LIT(KServerName,"SignalServer"); sl@0: /* sl@0: A version must be specified when creating a session with the server sl@0: */ sl@0: const TUint KSignalServMajorVersionNumber=1; sl@0: const TUint KSignalServMinorVersionNumber=0; sl@0: const TUint KSignalServBuildVersionNumber=0; sl@0: sl@0: // CLASS DECLARATION sl@0: class CSignalServer : public CServer2 sl@0: { sl@0: public: sl@0: virtual ~CSignalServer(); sl@0: static CServer2* NewL(); sl@0: void AddSession(); sl@0: void RemoveSession(); sl@0: void ServiceL(const RMessage2&); sl@0: sl@0: private: sl@0: CSignalServer(CActive::TPriority aPriority); sl@0: CSession2* NewSessionL(const TVersion&,const RMessage2&) const; sl@0: void ConstructL(); sl@0: TInt CheckForCapability(const RMessage2&); sl@0: TInt iSessionCount; sl@0: CSigShutDown *iShutDown; sl@0: struct TOeProcessHdl sl@0: { sl@0: TInt mPid; sl@0: RPipe mPipe; sl@0: sl@0: static TBool MatchByPid(const TOeProcessHdl& aProc1, const TOeProcessHdl& aProc2) sl@0: { sl@0: if (aProc1.mPid == aProc2.mPid) sl@0: { sl@0: return ETrue; sl@0: } sl@0: return EFalse; sl@0: } sl@0: }; sl@0: RArray iProcessHdlList; sl@0: }; sl@0: sl@0: #endif // SIGNALSERVER_H