29
|
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: EComm interface implementation and the client side of DUN
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef C_CDUNPLUGIN_H
|
|
20 |
#define C_CDUNPLUGIN_H
|
|
21 |
|
|
22 |
#include <locodbearer.h>
|
|
23 |
#include <locodserviceplugin.h>
|
|
24 |
#include "dunclient.h"
|
|
25 |
|
|
26 |
class CDunActive;
|
|
27 |
|
|
28 |
/**
|
|
29 |
* Class of EComm interface implementation and the client side of DUN
|
|
30 |
*
|
|
31 |
* @since S60 v3.2
|
|
32 |
*/
|
|
33 |
NONSHARABLE_CLASS( CDunPlugin ) : public CLocodServicePlugin
|
|
34 |
{
|
|
35 |
|
|
36 |
public:
|
|
37 |
|
|
38 |
/**
|
|
39 |
* Two-phased constructor.
|
|
40 |
* @param aParams LOCOD service plugin parameters
|
|
41 |
* @return Instance of self
|
|
42 |
*/
|
|
43 |
static CDunPlugin* NewL( TLocodServicePluginParams& aParams );
|
|
44 |
|
|
45 |
/**
|
|
46 |
* Destructor.
|
|
47 |
*/
|
|
48 |
~CDunPlugin();
|
|
49 |
|
|
50 |
/**
|
|
51 |
* Return owned RServer
|
|
52 |
*
|
|
53 |
* @since S60 3.2
|
|
54 |
* @return RDun
|
|
55 |
*/
|
|
56 |
RDun& Server();
|
|
57 |
|
|
58 |
/**
|
|
59 |
* Called by instance of CDunActive to inform Observer of service completed.
|
|
60 |
* Destruct the active object.
|
|
61 |
*
|
|
62 |
* @since S60 3.2
|
|
63 |
* @param aRequest Request to service
|
|
64 |
* @param aError Error value
|
|
65 |
* @return None
|
|
66 |
*/
|
|
67 |
void ServiceCompleted( MDunActive* aRequest, TInt aError );
|
|
68 |
|
|
69 |
// from base class CLocodServicePlugin
|
|
70 |
|
|
71 |
/**
|
|
72 |
* From CLocodServicePlugin.
|
|
73 |
* Implements interface virtual function
|
|
74 |
*
|
|
75 |
* @since S60 3.2
|
|
76 |
* @param aBearer, BT/IR/USB bearer defined in locodbearer.h
|
|
77 |
* @param aBearerStatus, the status of this bearer,
|
|
78 |
ETrue if it is available;
|
|
79 |
EFalse otherwise.
|
|
80 |
* @return None
|
|
81 |
*/
|
|
82 |
void ManageService( TLocodBearer aBearer, TBool aBearerStatus );
|
|
83 |
|
|
84 |
private:
|
|
85 |
|
|
86 |
CDunPlugin( TLocodServicePluginParams& aParams );
|
|
87 |
|
|
88 |
void ConstructL();
|
|
89 |
|
|
90 |
/**
|
|
91 |
* Reports completion status to LOCOD
|
|
92 |
*
|
|
93 |
* @since S60 3.2
|
|
94 |
* @param aBearer Bearer to report
|
|
95 |
* @param aBearerStatus Bearer status to report
|
|
96 |
* @param aErr Error condition to report
|
|
97 |
* @return None
|
|
98 |
*/
|
|
99 |
void ReportCompletion( TLocodBearer aBearer,
|
|
100 |
TBool aBearerStatus,
|
|
101 |
TInt aErr);
|
|
102 |
|
|
103 |
private: // data
|
|
104 |
|
|
105 |
/**
|
|
106 |
* Client side of DUN Server
|
|
107 |
*/
|
|
108 |
RDun iServer;
|
|
109 |
|
|
110 |
/**
|
|
111 |
* Array of Active Object
|
|
112 |
*/
|
|
113 |
RPointerArray<CDunActive> iActiveContainer;
|
|
114 |
|
|
115 |
};
|
|
116 |
|
|
117 |
#endif // C_CDUNPLUGIN_H
|