williamr@2
|
1 |
/*
|
williamr@2
|
2 |
* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
3 |
* All rights reserved.
|
williamr@2
|
4 |
* This component and the accompanying materials are made available
|
williamr@2
|
5 |
* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
|
williamr@2
|
6 |
* which accompanies this distribution, and is available
|
williamr@2
|
7 |
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
|
williamr@2
|
8 |
*
|
williamr@2
|
9 |
* Initial Contributors:
|
williamr@2
|
10 |
* Nokia Corporation - initial contribution.
|
williamr@2
|
11 |
*
|
williamr@2
|
12 |
* Contributors:
|
williamr@2
|
13 |
*
|
williamr@2
|
14 |
* Description:
|
williamr@2
|
15 |
* CUCCSDeviceControl Class
|
williamr@2
|
16 |
*
|
williamr@2
|
17 |
*/
|
williamr@2
|
18 |
|
williamr@2
|
19 |
|
williamr@2
|
20 |
#ifndef _CUCCSDeviceControl_H
|
williamr@2
|
21 |
#define _CUCCSDeviceControl_H
|
williamr@2
|
22 |
|
williamr@2
|
23 |
|
williamr@2
|
24 |
/*****************************************************************************
|
williamr@2
|
25 |
*
|
williamr@2
|
26 |
* System Includes
|
williamr@2
|
27 |
*
|
williamr@2
|
28 |
****************************************************************************/
|
williamr@2
|
29 |
#include <e32cons.h>
|
williamr@2
|
30 |
#include <e32def.h>
|
williamr@2
|
31 |
|
williamr@2
|
32 |
#include <cuccsdeviceprotocol.h>
|
williamr@2
|
33 |
|
williamr@2
|
34 |
/*****************************************************************************
|
williamr@2
|
35 |
*
|
williamr@2
|
36 |
* Local Includes
|
williamr@2
|
37 |
*
|
williamr@2
|
38 |
****************************************************************************/
|
williamr@2
|
39 |
|
williamr@2
|
40 |
|
williamr@2
|
41 |
/*****************************************************************************
|
williamr@2
|
42 |
*
|
williamr@2
|
43 |
* Types
|
williamr@2
|
44 |
*
|
williamr@2
|
45 |
****************************************************************************/
|
williamr@2
|
46 |
typedef enum {
|
williamr@2
|
47 |
TDC_SUCCESS,
|
williamr@2
|
48 |
TDC_ERRINTIALISING,
|
williamr@2
|
49 |
TDC_ERRSENDING,
|
williamr@2
|
50 |
TDC_ERRRECV,
|
williamr@2
|
51 |
TDC_INVALIDREPLY,
|
williamr@2
|
52 |
TDC_VARNAMETOOLONG,
|
williamr@2
|
53 |
TDC_VARVALTOOLONG,
|
williamr@2
|
54 |
TDC_COMMDBERR,
|
williamr@2
|
55 |
TDC_RECORDIDNOTSPECIFIED,
|
williamr@2
|
56 |
TDC_COMMANDLINETOOLONG
|
williamr@2
|
57 |
} TDCError;
|
williamr@2
|
58 |
|
williamr@2
|
59 |
|
williamr@2
|
60 |
/*****************************************************************************
|
williamr@2
|
61 |
*
|
williamr@2
|
62 |
* CUCCSDeviceControl
|
williamr@2
|
63 |
*
|
williamr@2
|
64 |
****************************************************************************/
|
williamr@2
|
65 |
class CUCCSDeviceControl : CBase
|
williamr@2
|
66 |
{
|
williamr@2
|
67 |
public:
|
williamr@2
|
68 |
// Construction / Destruction
|
williamr@2
|
69 |
IMPORT_C static CUCCSDeviceControl* New();
|
williamr@2
|
70 |
IMPORT_C ~CUCCSDeviceControl();
|
williamr@2
|
71 |
|
williamr@2
|
72 |
// External interface
|
williamr@2
|
73 |
IMPORT_C TUint connectL( TDesC *aRemoteHost, TDPTransport aTransportType = TDP_SERIAL );
|
williamr@2
|
74 |
IMPORT_C TUint startUseCase( TUint aData, int *aErrorCode );
|
williamr@2
|
75 |
IMPORT_C TUint signal( TUint aData, int *aErrorCode );
|
williamr@2
|
76 |
IMPORT_C TUint waitfor( TUint aData, int *aErrorCode );
|
williamr@2
|
77 |
IMPORT_C TUint rendezvous( TUint aData, int *aErrorCode );
|
williamr@2
|
78 |
IMPORT_C TUint endUseCase( TUint aUseCaseData, TUint aResult, int *aErrorCode );
|
williamr@2
|
79 |
IMPORT_C TUint getVariableName( char* aVariableName, char* aOutputBuffer, int aOutputBufferSize, int *aErrorCode );
|
williamr@2
|
80 |
IMPORT_C TUint runCommandL( char* aCommandLine, int *aErrorCode );
|
williamr@2
|
81 |
|
williamr@2
|
82 |
private:
|
williamr@2
|
83 |
CUCCSDeviceControl();
|
williamr@2
|
84 |
void ConstructL();
|
williamr@2
|
85 |
|
williamr@2
|
86 |
private:
|
williamr@2
|
87 |
CUCCSDeviceProtocol *iProtocol;
|
williamr@2
|
88 |
};
|
williamr@2
|
89 |
|
williamr@2
|
90 |
#endif
|
williamr@2
|
91 |
|
williamr@2
|
92 |
|
williamr@2
|
93 |
|
williamr@2
|
94 |
|
williamr@2
|
95 |
|