phonesrv_plat/phone_client_ussd_api/inc/CPhCltUssd.h
changeset 46 2fa1fa551b0b
parent 42 35488577e233
child 48 78df25012fda
equal deleted inserted replaced
42:35488577e233 46:2fa1fa551b0b
     1 /*
       
     2 * Copyright (c) 2002 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:  Interface for sending messages.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPHCLTUSSD_H
       
    20 #define CPHCLTUSSD_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 // CLASS DECLARATION
       
    28 
       
    29 /**
       
    30 * USSD application Exit reason.
       
    31 */
       
    32 enum TPhCltUssdAppExitReason
       
    33     {
       
    34     EPhCltUserExit,          // User exited the application.
       
    35     EPhCltSendCompleted,     // Send operation was completed.
       
    36     EPhCltExitReasonUnknown  // Exit reason is unknown.
       
    37     };
       
    38 
       
    39 // The next four values are for SAT dcs.
       
    40 const TUint KPhCltDcs7Bit    = 101; // 7-bit dcs.
       
    41 const TUint KPhCltDcs8Bit    = 102; // 8-bit dcs.
       
    42 const TUint KPhCltDcsUcs2    = 103; // UCS2 dcs.
       
    43 const TUint KPhCltDcsUnknown = 104; // Unknown dcs.
       
    44 
       
    45 // The notes are shown in SAT session.
       
    46 const TUint KPhCltShowNotes = 1000;
       
    47 
       
    48 /**
       
    49 *  Interface for sending messages.
       
    50 *
       
    51 *  @lib phoneclient.lib
       
    52 *  @since 1.0
       
    53 */
       
    54 class CPhCltUssd : 
       
    55     public CBase
       
    56     
       
    57     {
       
    58     public:  // Constructors and destructor
       
    59         
       
    60         /**
       
    61         * Two-phased constructor.
       
    62         *
       
    63         * @param aShowNotes If ETrue, notes are shown.
       
    64         * @return Pointer to created CPhCltUssd instance.
       
    65         */
       
    66         IMPORT_C static CPhCltUssd* NewL( TBool aShowNotes = ETrue );
       
    67 
       
    68     public: // New functions
       
    69 
       
    70         /**
       
    71         * Send Ussd string to network with default DCS.
       
    72         *
       
    73         * @param aMsgData Unicode string to be sent.
       
    74         * @return Error code.
       
    75         */
       
    76         virtual TInt SendUssd( const TDesC& aMsgData ) = 0;
       
    77 
       
    78         /**
       
    79         * Send Ussd buffer to network with default DCS.
       
    80         *
       
    81         * @param aMsgData 7-bit buffer to be sent.
       
    82         * @return Error code.
       
    83         */
       
    84         virtual TInt SendUssd( const TDesC8& aMsgData ) = 0;
       
    85 
       
    86         /**
       
    87         * Send Ussd buffer to network with given DCS.
       
    88         *
       
    89         * @param aMsgData 7-bit buffer to be sent.
       
    90         * @param iSendDcs Specifies DCS and the send type.
       
    91         * @return Error code.
       
    92         */
       
    93         IMPORT_C virtual TInt SendUssd( 
       
    94             const TDesC8& aMsgData, 
       
    95             const TUint8 iSendDcs ) = 0;
       
    96 
       
    97         /**
       
    98         * Cancels outstanding Send request.
       
    99         */
       
   100         virtual void SendUssdCancel() = 0;
       
   101                
       
   102         /**
       
   103         * Set data coding scheme
       
   104         * 
       
   105         * @param aDCS data coding scheme value
       
   106         */
       
   107         virtual void SetDCS( TUint8 aDCS ) = 0;
       
   108         
       
   109         /**
       
   110         * Starts editor. Creates own window server session.
       
   111         *
       
   112         * @return Error code.
       
   113         */
       
   114         IMPORT_C virtual TInt StartUssdEditor() const = 0;
       
   115     
       
   116     protected:    
       
   117         /**
       
   118         * C++ constructor.
       
   119         */
       
   120         CPhCltUssd();
       
   121         
       
   122     };
       
   123 
       
   124 #endif // CPHCLTUSSD_H
       
   125 
       
   126 // End of File