40
|
1 |
/*
|
|
2 |
* Copyright (c) 2002-2010 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: Define SRCS's transport ECom interface.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef _SRCSTRANSPORT_
|
|
21 |
#define _SRCSTRANSPORT_
|
|
22 |
|
|
23 |
// INCLUDES
|
|
24 |
#include <e32base.h>
|
|
25 |
#include <ecom.h>
|
|
26 |
#include <badesca.h>
|
|
27 |
#include <obex.h>
|
|
28 |
#include "SrcsClSv.h"
|
|
29 |
|
|
30 |
// CONSTANTS
|
|
31 |
// UID of this interface
|
|
32 |
const TUid KCSrcsTransportUid = {0x101F7C9A};
|
|
33 |
|
|
34 |
// default OBEX receiving buffer size,
|
|
35 |
// used when service controller does not specify the receiving buffer size in its .rss
|
|
36 |
const TUint KSRCSDefaultReceiveMtu = 0x4000;
|
|
37 |
|
|
38 |
// default OBEX sending buffer size,
|
|
39 |
// used when service controller does not specify the sending buffer size in its .rss
|
|
40 |
const TUint KSRCSDefaultTransmitMtu = 0x3000;
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
/**
|
|
46 |
* An abstract class being representative of the
|
|
47 |
* concrete class which the client wishes to use.
|
|
48 |
* It acts as a base, for a real class to provide all the
|
|
49 |
* functionality that a client requires.
|
|
50 |
* It supplies instantiation & destruction by using
|
|
51 |
* the ECom framework, and functional services
|
|
52 |
* by using the methods of the actual class.
|
|
53 |
*/
|
|
54 |
class CSrcsTransport : public CBase, public MObexAuthChallengeHandler
|
|
55 |
{
|
|
56 |
public:
|
|
57 |
|
|
58 |
/**
|
|
59 |
* Two-phased constructor.
|
|
60 |
*/
|
|
61 |
static CSrcsTransport* NewL(TUid aImplUid, CImplementationInformation* aParams );
|
|
62 |
|
|
63 |
/**
|
|
64 |
* Destructor.
|
|
65 |
*/
|
|
66 |
virtual ~CSrcsTransport();
|
|
67 |
|
|
68 |
/**
|
|
69 |
* Request a list of all available implementations which satisfies this given interface.
|
|
70 |
*
|
|
71 |
* @param aImplInfoArray Implementation instance array.
|
|
72 |
* @return none.
|
|
73 |
*/
|
|
74 |
static void ListAllImplementationsL(RImplInfoPtrArray& aImplInfoArray);
|
|
75 |
|
|
76 |
/**
|
|
77 |
* Request a list of matching implementations which satisfies this given interface.
|
|
78 |
*
|
|
79 |
* @param aMatchString String to be matched by the implemention.
|
|
80 |
* @param aImplInfoArray Implementation instance array.
|
|
81 |
* @return none.
|
|
82 |
*/
|
|
83 |
static void ListImplementationsL(const TDesC8& aMatchString, RImplInfoPtrArray& aImplInfoArray);
|
|
84 |
|
|
85 |
/**
|
|
86 |
* Check if OBEX service is still active.
|
|
87 |
*
|
|
88 |
* @return true: OBEX service is still active.
|
|
89 |
* false: OBEX service is inactive.
|
|
90 |
*/
|
|
91 |
virtual TBool IsOBEXActive() = 0;
|
|
92 |
|
|
93 |
/**
|
|
94 |
* Perform any outstanding initialization tasks.
|
|
95 |
*
|
|
96 |
* The transport may decide to implement two-phase initialization to improve performance where needed.
|
|
97 |
* For instance, USB Transport has to register all service controller's interfaces and complete the message from obex class controller
|
|
98 |
* as soon as possible to satisfy timing requirements and defer service controller plugin creation to later stage.
|
|
99 |
*
|
|
100 |
* @return none.
|
|
101 |
*/
|
|
102 |
virtual void PostInitializeL();
|
|
103 |
|
|
104 |
|
|
105 |
protected:
|
|
106 |
/**
|
|
107 |
* C++ default Constructor
|
|
108 |
*/
|
|
109 |
inline CSrcsTransport();
|
|
110 |
|
|
111 |
/**
|
|
112 |
* MObexAuthChallengeHandler implementation
|
|
113 |
*/
|
|
114 |
|
|
115 |
/**
|
|
116 |
* Password for authenticated connection
|
|
117 |
*
|
|
118 |
* @param aUserID user id.
|
|
119 |
*/
|
|
120 |
virtual void GetUserPasswordL( const TDesC& aUserID ) = 0;
|
|
121 |
|
|
122 |
|
|
123 |
private:
|
|
124 |
// Unique instance identifier key
|
|
125 |
TUid iDtor_ID_Key;
|
|
126 |
};
|
|
127 |
|
|
128 |
#include "SrcsTransport.inl"
|
|
129 |
|
|
130 |
#endif
|
|
131 |
|