os/ossrv/genericopenlibs/openenvcore/backend/inc/signalserver.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description:
sl@0
    15
* Name        : signalserver.h
sl@0
    16
* Part of     : Signal server
sl@0
    17
* 
sl@0
    18
*
sl@0
    19
*/
sl@0
    20
sl@0
    21
sl@0
    22
sl@0
    23
#ifndef SIGNALSERVER_H
sl@0
    24
#define SIGNALSERVER_H
sl@0
    25
sl@0
    26
// INCLUDES
sl@0
    27
#include <e32std.h>
sl@0
    28
#include <e32base.h>
sl@0
    29
#include "signalshutdown.h"
sl@0
    30
#include "rpipe.h"
sl@0
    31
sl@0
    32
/*
sl@0
    33
server name
sl@0
    34
*/
sl@0
    35
_LIT(KServerName,"SignalServer");
sl@0
    36
/*
sl@0
    37
A version must be specified when creating a session with the server
sl@0
    38
*/
sl@0
    39
const TUint KSignalServMajorVersionNumber=1;
sl@0
    40
const TUint KSignalServMinorVersionNumber=0;
sl@0
    41
const TUint KSignalServBuildVersionNumber=0;
sl@0
    42
sl@0
    43
// CLASS DECLARATION
sl@0
    44
class CSignalServer : public CServer2
sl@0
    45
	{
sl@0
    46
public:
sl@0
    47
	virtual ~CSignalServer();
sl@0
    48
	static CServer2* NewL();
sl@0
    49
	void AddSession();
sl@0
    50
	void RemoveSession();
sl@0
    51
	void ServiceL(const RMessage2&);
sl@0
    52
sl@0
    53
private:
sl@0
    54
	CSignalServer(CActive::TPriority aPriority);
sl@0
    55
	CSession2* NewSessionL(const TVersion&,const RMessage2&) const;
sl@0
    56
	void ConstructL();
sl@0
    57
	TInt CheckForCapability(const RMessage2&);
sl@0
    58
	TInt iSessionCount;
sl@0
    59
	CSigShutDown *iShutDown;
sl@0
    60
	struct TOeProcessHdl
sl@0
    61
		{
sl@0
    62
		TInt 	mPid;
sl@0
    63
		RPipe	mPipe;
sl@0
    64
sl@0
    65
		static TBool MatchByPid(const TOeProcessHdl& aProc1, const TOeProcessHdl& aProc2)
sl@0
    66
			{
sl@0
    67
			if (aProc1.mPid == aProc2.mPid)
sl@0
    68
				{
sl@0
    69
				return ETrue;
sl@0
    70
				}
sl@0
    71
			return EFalse;
sl@0
    72
			}
sl@0
    73
		};
sl@0
    74
	RArray<TOeProcessHdl>	iProcessHdlList;
sl@0
    75
	};
sl@0
    76
sl@0
    77
#endif // SIGNALSERVER_H