equal
deleted
inserted
replaced
1 /* |
|
2 * Copyright (c) 2006, 2007 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: Interface for identity object. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "s_ximpidentity.h" |
|
20 |
|
21 MyMXIMPIdentityStub::MyMXIMPIdentityStub() |
|
22 { |
|
23 } |
|
24 MyMXIMPIdentityStub::~MyMXIMPIdentityStub() |
|
25 { |
|
26 if(iIdentity) |
|
27 { |
|
28 delete iIdentity; |
|
29 } |
|
30 } |
|
31 |
|
32 const TDesC16& MyMXIMPIdentityStub::Identity() const |
|
33 { |
|
34 return iIdentity->Des(); |
|
35 } |
|
36 |
|
37 void MyMXIMPIdentityStub::SetIdentityL( |
|
38 const TDesC16& aIdentity ) |
|
39 { |
|
40 if ( iIdentity ) |
|
41 { |
|
42 iIdentity->ReAlloc( aIdentity.Length() ); |
|
43 } |
|
44 else |
|
45 { |
|
46 iIdentity = HBufC::NewL( aIdentity.Length() ); |
|
47 } |
|
48 |
|
49 iIdentity->Des().Copy( aIdentity ); |
|
50 |
|
51 } |
|
52 |
|
53 |
|
54 const TAny* MyMXIMPIdentityStub::GetInterface( |
|
55 TInt32 /*aInterfaceId*/, |
|
56 TIfGetOps /*aOps*/ ) const |
|
57 { |
|
58 return this; |
|
59 } |
|
60 |
|
61 TAny* MyMXIMPIdentityStub::GetInterface( |
|
62 TInt32 /*aInterfaceId*/, |
|
63 TIfGetOps /*aOps*/ ) |
|
64 { |
|
65 return this; |
|
66 } |
|
67 |
|
68 TInt32 MyMXIMPIdentityStub::GetInterfaceId() const |
|
69 { |
|
70 return KErrNone; |
|
71 } |
|