|
1 /* |
|
2 * Copyright (c) 2005-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 |
|
19 |
|
20 #ifndef OBEXINITIATOR_H |
|
21 #define OBEXINITIATOR_H |
|
22 |
|
23 _LIT(KObexDescription, "Obex Server Interface"); |
|
24 _LIT(KConsoleName, "Obex Server"); |
|
25 /** |
|
26 * CObexInitiator implements the MObexServerNotify interface. |
|
27 * It has implementations of virtual functions from the MObexServerNotify |
|
28 * It also allows for an CObexServer to be created, started and stopped. |
|
29 * This class is implemented in the CSession2 derived class, this class can be extended |
|
30 * to make a greater use of the CObexServer class. |
|
31 * |
|
32 */ |
|
33 NONSHARABLE_CLASS(CObexInitiator) : public CBase, private MObexServerNotify |
|
34 { |
|
35 |
|
36 public: |
|
37 static CObexInitiator* NewL(); |
|
38 ~CObexInitiator(); |
|
39 void StartObexServerL(); |
|
40 void StopObexServer(); |
|
41 |
|
42 private: |
|
43 void ConstructL(); |
|
44 CObexInitiator(); |
|
45 // These are the MObexServerNotify functions |
|
46 virtual void ErrorIndication (TInt aError); |
|
47 virtual void TransportUpIndication (); |
|
48 virtual void TransportDownIndication (); |
|
49 virtual TInt ObexConnectIndication (const TObexConnectInfo& aRemoteInfo, const TDesC8& aInfo); |
|
50 virtual void ObexDisconnectIndication (const TDesC8& aInfo); |
|
51 virtual CObexBufObject* PutRequestIndication (); |
|
52 virtual TInt PutPacketIndication (); |
|
53 virtual TInt PutCompleteIndication (); |
|
54 virtual CObexBufObject* GetRequestIndication (CObexBaseObject *aRequestedObject); |
|
55 virtual TInt GetPacketIndication (); |
|
56 virtual TInt GetCompleteIndication (); |
|
57 virtual TInt SetPathIndication (const CObex::TSetPathInfo& aPathInfo, const TDesC8& aInfo); |
|
58 virtual void AbortIndication (); |
|
59 |
|
60 private: |
|
61 CObexServer* iObexServer; |
|
62 CConsoleBase* iConsole; |
|
63 |
|
64 |
|
65 }; |
|
66 |
|
67 |
|
68 #endif // OBEXINITIATOR_H |