0
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef __toolssrvserver_H__
|
|
19 |
#define __toolssrvserver_H__
|
|
20 |
|
|
21 |
// System includes
|
|
22 |
#include <e32base.h>
|
|
23 |
#include "toolslaunchmgr.h"
|
|
24 |
//
|
|
25 |
// CToolsSrvServer (header)
|
|
26 |
// The Tools Server
|
|
27 |
//
|
|
28 |
#ifdef EKA2
|
|
29 |
class CToolsSrvServer : public CPolicyServer
|
|
30 |
#else
|
|
31 |
class CToolsSrvServer : public CServer2
|
|
32 |
#endif
|
|
33 |
{
|
|
34 |
public:
|
|
35 |
static CToolsSrvServer* NewLC();
|
|
36 |
~CToolsSrvServer();
|
|
37 |
|
|
38 |
private:
|
|
39 |
CToolsSrvServer();
|
|
40 |
void ConstructL();
|
|
41 |
|
|
42 |
public:
|
|
43 |
CSession2* NewSessionL(const TVersion& aVersion,const RMessage2& aMessage) const;
|
|
44 |
// called by the session objects
|
|
45 |
void SessionOpened();
|
|
46 |
void SessionClosed();
|
|
47 |
|
|
48 |
public:
|
|
49 |
TConnectionStatus GetUsbConnStatus();
|
|
50 |
ILaunchManagerInterface* GetLaunchInterface();
|
|
51 |
|
|
52 |
private:
|
|
53 |
TInt RunError(TInt aError);
|
|
54 |
|
|
55 |
private:
|
|
56 |
TInt iSessionCount;
|
|
57 |
CToolsLaunchMgr* iLaunchManager;
|
|
58 |
#ifdef EKA2
|
|
59 |
TCustomResult CustomSecurityCheckL(const RMessage2& aMsg, TInt& aAction, TSecurityInfo& aMissing);
|
|
60 |
#endif
|
|
61 |
};
|
|
62 |
|
|
63 |
//
|
|
64 |
// inline implementations
|
|
65 |
//
|
|
66 |
/*
|
|
67 |
* To get the Launchmanger instance to be used for sessions
|
|
68 |
*
|
|
69 |
*/
|
|
70 |
inline ILaunchManagerInterface* CToolsSrvServer::GetLaunchInterface()
|
|
71 |
{
|
|
72 |
if(iLaunchManager)
|
|
73 |
return iLaunchManager;
|
|
74 |
return NULL;
|
|
75 |
|
|
76 |
}
|
|
77 |
|
|
78 |
#endif
|