56
|
1 |
/*
|
|
2 |
* Copyright (c) 2005-2006 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: RMnServiceClientBase class implementation
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#include <e32base.h>
|
|
20 |
|
|
21 |
#include <EPos_CPosLandmark.h>
|
|
22 |
#include <epos_poslandmarkserialization.h>
|
|
23 |
|
|
24 |
#include "mndebug.h"
|
|
25 |
#include "mnserviceclientbase.h"
|
|
26 |
|
|
27 |
// ======== LOCAL FUNCTIONS ========
|
|
28 |
|
|
29 |
// ======== MEMBER FUNCTIONS ========
|
|
30 |
|
|
31 |
// ---------------------------------------------------------------------------
|
|
32 |
// ---------------------------------------------------------------------------
|
|
33 |
//
|
|
34 |
RMnServiceClientBase::RMnServiceClientBase() :
|
|
35 |
iLastRequest( EMnIpcNone )
|
|
36 |
{
|
|
37 |
}
|
|
38 |
|
|
39 |
// ---------------------------------------------------------------------------
|
|
40 |
// ---------------------------------------------------------------------------
|
|
41 |
//
|
|
42 |
void RMnServiceClientBase::ConnectL( TUid aProviderUid )
|
|
43 |
{
|
|
44 |
LOG1("RMnServiceClientBase::ConnectL (provider 0x%X)", aProviderUid.iUid);
|
|
45 |
ConnectNewAppL( aProviderUid );
|
|
46 |
#ifdef _DEBUG
|
|
47 |
TPtrC serverName( ServerName() );
|
|
48 |
LOG1("RMnServiceClientBase::ConnectL connected to server '%S'", &serverName);
|
|
49 |
#endif
|
|
50 |
}
|
|
51 |
|
|
52 |
// ---------------------------------------------------------------------------
|
|
53 |
// ---------------------------------------------------------------------------
|
|
54 |
//
|
|
55 |
void RMnServiceClientBase::ConnectChainedL( TUid aProviderUid )
|
|
56 |
{
|
|
57 |
LOG1("RMnServiceClientBase::ConnectChainedL (provider 0x%X)", aProviderUid.iUid);
|
|
58 |
ConnectChainedAppL( aProviderUid );
|
|
59 |
#ifdef _DEBUG
|
|
60 |
TPtrC serverName( ServerName() );
|
|
61 |
LOG1("RMnServiceClientBase::ConnectChainedL connected to server '%S'", &serverName);
|
|
62 |
#endif
|
|
63 |
}
|
|
64 |
|
|
65 |
// ---------------------------------------------------------------------------
|
|
66 |
// ---------------------------------------------------------------------------
|
|
67 |
//
|
|
68 |
void RMnServiceClientBase::Cancel()
|
|
69 |
{
|
|
70 |
LOG("RMnServiceClientBase::Cancel");
|
|
71 |
if ( Handle() && iLastRequest != EMnIpcNone )
|
|
72 |
{
|
|
73 |
TIpcArgs args;
|
|
74 |
args.Set( EMnIpcCancelRequestIdIndex, iLastRequest );
|
|
75 |
SendReceive( EMnIpcCancel, args );
|
|
76 |
}
|
|
77 |
iLastRequest = EMnIpcNone;
|
|
78 |
}
|
|
79 |
|
|
80 |
// ---------------------------------------------------------------------------
|
|
81 |
// ---------------------------------------------------------------------------
|
|
82 |
//
|
|
83 |
void RMnServiceClientBase::Close()
|
|
84 |
{
|
|
85 |
LOG("RMnServiceClientBase::Close");
|
|
86 |
Cancel();
|
|
87 |
RAknAppServiceBase::Close();
|
|
88 |
}
|