os/ossrv/genericopenlibs/openenvcore/backend/inc/signalserver.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/genericopenlibs/openenvcore/backend/inc/signalserver.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,77 @@
     1.4 +/*
     1.5 +* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:
    1.18 +* Name        : signalserver.h
    1.19 +* Part of     : Signal server
    1.20 +* 
    1.21 +*
    1.22 +*/
    1.23 +
    1.24 +
    1.25 +
    1.26 +#ifndef SIGNALSERVER_H
    1.27 +#define SIGNALSERVER_H
    1.28 +
    1.29 +// INCLUDES
    1.30 +#include <e32std.h>
    1.31 +#include <e32base.h>
    1.32 +#include "signalshutdown.h"
    1.33 +#include "rpipe.h"
    1.34 +
    1.35 +/*
    1.36 +server name
    1.37 +*/
    1.38 +_LIT(KServerName,"SignalServer");
    1.39 +/*
    1.40 +A version must be specified when creating a session with the server
    1.41 +*/
    1.42 +const TUint KSignalServMajorVersionNumber=1;
    1.43 +const TUint KSignalServMinorVersionNumber=0;
    1.44 +const TUint KSignalServBuildVersionNumber=0;
    1.45 +
    1.46 +// CLASS DECLARATION
    1.47 +class CSignalServer : public CServer2
    1.48 +	{
    1.49 +public:
    1.50 +	virtual ~CSignalServer();
    1.51 +	static CServer2* NewL();
    1.52 +	void AddSession();
    1.53 +	void RemoveSession();
    1.54 +	void ServiceL(const RMessage2&);
    1.55 +
    1.56 +private:
    1.57 +	CSignalServer(CActive::TPriority aPriority);
    1.58 +	CSession2* NewSessionL(const TVersion&,const RMessage2&) const;
    1.59 +	void ConstructL();
    1.60 +	TInt CheckForCapability(const RMessage2&);
    1.61 +	TInt iSessionCount;
    1.62 +	CSigShutDown *iShutDown;
    1.63 +	struct TOeProcessHdl
    1.64 +		{
    1.65 +		TInt 	mPid;
    1.66 +		RPipe	mPipe;
    1.67 +
    1.68 +		static TBool MatchByPid(const TOeProcessHdl& aProc1, const TOeProcessHdl& aProc2)
    1.69 +			{
    1.70 +			if (aProc1.mPid == aProc2.mPid)
    1.71 +				{
    1.72 +				return ETrue;
    1.73 +				}
    1.74 +			return EFalse;
    1.75 +			}
    1.76 +		};
    1.77 +	RArray<TOeProcessHdl>	iProcessHdlList;
    1.78 +	};
    1.79 +
    1.80 +#endif // SIGNALSERVER_H