25
|
1 |
/*
|
|
2 |
* Copyright (c) 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: Handles the commands "AT+COPS=..." and "AT+COPS?"
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef M_CMDPLUGINOBSERVER_H
|
|
20 |
#define M_CMDPLUGINOBSERVER_H
|
|
21 |
|
|
22 |
|
|
23 |
enum TCharacterTypes
|
|
24 |
{
|
|
25 |
ECharTypeCR, // Carriage return
|
|
26 |
ECharTypeLF, // Line feed
|
|
27 |
ECharTypeBS // Backspace
|
|
28 |
};
|
|
29 |
|
|
30 |
enum TModeTypes
|
|
31 |
{
|
|
32 |
EModeTypeQuiet, // Quiet mode
|
|
33 |
EModeTypeVerbose // Verbose mode
|
|
34 |
};
|
|
35 |
|
|
36 |
|
|
37 |
/**
|
|
38 |
* Class for accessing plugin information and common functionality
|
|
39 |
*
|
|
40 |
* @since S60 v5.0
|
|
41 |
*/
|
|
42 |
NONSHARABLE_CLASS( MCmdPluginObserver )
|
|
43 |
{
|
|
44 |
|
|
45 |
public:
|
|
46 |
|
|
47 |
/**
|
|
48 |
* Creates an AT command reply based on the reply type and completes the
|
|
49 |
* request to ATEXT. Uses iReplyBuffer for reply storage.
|
|
50 |
*
|
|
51 |
* @since TB9.2
|
|
52 |
* @param aReplyType Type of reply
|
|
53 |
* @param aDstBuffer Destination buffer; used for the API requiring the
|
|
54 |
* AT command reply
|
|
55 |
* @param aSrcBuffer Source buffer; used only if aReplyType is EReplyTypeOther
|
|
56 |
* @param aError Completion code. If not KErrNone then other arguments are
|
|
57 |
* ignored and the request is completed to ATEXT with
|
|
58 |
* EReplyTypeUndefined.
|
|
59 |
* @return None
|
|
60 |
*/
|
|
61 |
virtual TInt CreateReplyAndComplete( TATExtensionReplyType aReplyType,
|
|
62 |
const TDesC8& aSrcBuffer=KNullDesC8,
|
|
63 |
TInt aError=KErrNone ) = 0;
|
|
64 |
|
|
65 |
/**
|
|
66 |
* Creates a buffer for "OK" or "ERROR" reply based on the line settings
|
|
67 |
*
|
|
68 |
* @since TB9.2
|
|
69 |
* @param aReplyBuffer Destination buffer for the created reply
|
|
70 |
* @param aOkReply ETrue if "OK" reply needed,
|
|
71 |
* EFalse if "ERROR" reply needed
|
|
72 |
* @return Symbian error code on error, KErrNone otherwise
|
|
73 |
*/
|
|
74 |
virtual TInt CreateOkOrErrorReply( RBuf8& aReplyBuffer,
|
|
75 |
TBool aOkReply ) = 0;
|
|
76 |
|
|
77 |
/**
|
|
78 |
* Returns the array of supported commands
|
|
79 |
*
|
|
80 |
* @since TB9.2
|
|
81 |
* @param aCmd Array of supported commands
|
|
82 |
* @return Symbian error code on error, KErrNone otherwise
|
|
83 |
*/
|
|
84 |
virtual TInt GetSupportedCommands( RPointerArray<HBufC8>& aCmds ) = 0;
|
|
85 |
|
|
86 |
/**
|
|
87 |
* Returns plugin's character value settings (from CATExtPluginBase)
|
|
88 |
*
|
|
89 |
* @since TB9.2
|
|
90 |
* @param aCharType Character's type
|
|
91 |
* @param aChar Character's value matching aCharType
|
|
92 |
* @return Symbian error code on error, KErrNone otherwise
|
|
93 |
*/
|
|
94 |
virtual TInt GetCharacterValue( TCharacterTypes aCharType, TChar& aChar ) = 0;
|
|
95 |
|
|
96 |
/**
|
|
97 |
* Returns plugin's mode value settings (from CATExtPluginBase)
|
|
98 |
*
|
|
99 |
* @since TB9.2
|
|
100 |
* @param aModeType Mode type
|
|
101 |
* @param aMode Mode value matching aModeType
|
|
102 |
* @return Symbian error code on error, KErrNone otherwise
|
|
103 |
*/
|
|
104 |
virtual TInt GetModeValue( TModeTypes aModeType, TBool& aMode ) = 0;
|
|
105 |
|
|
106 |
};
|
|
107 |
|
|
108 |
|
|
109 |
#endif // M_CMDPLUGINOBSERVER_H
|