equal
deleted
inserted
replaced
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
31 @publishedPartner |
31 @publishedPartner |
32 @released |
32 @released |
33 */ |
33 */ |
34 EXPORT_C TInt RSsmAdaptationBase::Connect() |
34 EXPORT_C TInt RSsmAdaptationBase::Connect() |
35 { |
35 { |
36 const TInt err = DoConnect(KAsyncMessageSlots); |
36 return Connect(KAsyncMessageSlots); |
37 return err; |
|
38 } |
37 } |
39 |
38 |
40 /** |
39 /** |
41 Connect this session and pre-allocate the number of asynchronous message slots you will need. |
40 Connect this session and pre-allocate the number of asynchronous message slots you will need. |
42 I.e. the max number of asynchronoud calls to this call you will ever need. |
41 I.e. the max number of asynchronoud calls to this call you will ever need. |
50 @publishedPartner |
49 @publishedPartner |
51 @released |
50 @released |
52 */ |
51 */ |
53 EXPORT_C TInt RSsmAdaptationBase::Connect(TInt aAsyncMessageSlotCount) |
52 EXPORT_C TInt RSsmAdaptationBase::Connect(TInt aAsyncMessageSlotCount) |
54 { |
53 { |
55 const TInt err = DoConnect(aAsyncMessageSlotCount); |
54 const TInt err = DoConnect(KSusAdaptionServerName, aAsyncMessageSlotCount); |
56 return err; |
55 return err; |
57 } |
56 } |
58 |
57 |
59 TInt RSsmAdaptationBase::DoConnect(TInt aAsyncMessageSlotCount) |
58 /** |
|
59 * This exists for testing purposes only |
|
60 * @internalComponent |
|
61 */ |
|
62 #ifdef TEST_SSM_SERVER |
|
63 |
|
64 TInt RSsmAdaptationBase::Connect(const TDesC& aServerName) |
|
65 { |
|
66 return DoConnect(aServerName, KAsyncMessageSlots); |
|
67 } |
|
68 #endif //TEST_SSM_SERVER |
|
69 |
|
70 /** |
|
71 @internalComponent |
|
72 */ |
|
73 TInt RSsmAdaptationBase::DoConnect(const TDesC& aServerName, const TInt aAsyncMessageSlotCount) |
60 { |
74 { |
61 if(!Handle()) |
75 if(!Handle()) |
62 { |
76 { |
63 return CreateSession(KSusAdaptionServerName, Version(), aAsyncMessageSlotCount); |
77 return CreateSession(aServerName, Version(), aAsyncMessageSlotCount); |
64 } |
78 } |
65 |
79 |
66 return KErrAlreadyExists; |
80 return KErrAlreadyExists; |
67 } |
81 } |
68 |
82 |