phoneclientserver/phoneclient/Inc/Ussd/ussd_ext/rphcltussd.h
changeset 0 ff3b6d0fd310
child 19 7d48bed6ce0c
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     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:  USSD subsession.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef RPHCLTUSSD_H
       
    20 #define RPHCLTUSSD_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <PhCltTypes.h>
       
    25 #include <CPhCltUssd.h>
       
    26 
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class RPhCltServer;
       
    30 
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 *  USSD subsession.
       
    36 *
       
    37 *  @lib phoneclient.lib
       
    38 *  @since 1.0
       
    39 */
       
    40 class RPhCltUssd : public RSubSessionBase
       
    41     {
       
    42 
       
    43     public: // New functions        
       
    44 
       
    45         /**
       
    46         * Constructor.
       
    47         */      
       
    48         RPhCltUssd();
       
    49 
       
    50         /**
       
    51         * Creates a subsession with the phone server.
       
    52         * 
       
    53         * @param aServer Pre-opened PhCltServer session.
       
    54         * @return Symbian OS standard error code.
       
    55         */      
       
    56         TInt Open( RPhCltServer& aServer );
       
    57 
       
    58         /**
       
    59         * Closes the session. Cancels all notify requests.
       
    60         * Remember to call this to a connected session in some point.
       
    61         */
       
    62         void Close();
       
    63 
       
    64         //------------------From app and phone idle-----------------------
       
    65 
       
    66         /**
       
    67         * Tells server to start sending the given string.
       
    68         *
       
    69         * @param aReqStatus Status request to be completed after sending.
       
    70         * @param aMsgData The 7-bit buffer.
       
    71         * @param aMsgAttribute Send definitions.
       
    72         */
       
    73         void SendUssd( 
       
    74             TRequestStatus& aReqStatus, 
       
    75             const TDesC8& aMsgData, 
       
    76             const TDesC8& aMsgAttribute );
       
    77 
       
    78         /**
       
    79         * Informs the server that the active object taking care of notify 
       
    80         * events has issued Cancel() so server can delete all notifys/events 
       
    81         * concerning it and sent a cancel signal.
       
    82         */      
       
    83         void CancelSend();
       
    84 
       
    85         //---------------From msg center-------------------
       
    86 
       
    87         /**
       
    88         * Starts editor. Creates own window server session.
       
    89         *
       
    90         * @return Error code.
       
    91         */
       
    92         TInt StartUssdEditor() const ;
       
    93 
       
    94 
       
    95         // ------------ For SAT -------------------
       
    96 
       
    97         /**
       
    98         * Starts SAT session.
       
    99         *
       
   100         * @param aStatus Completed status.
       
   101         * @param aReceiveMessage Received message.
       
   102         * @param aShowNotesAndDcs Contains the information of note showing,
       
   103         *                         ( Phone Client -> Phone Server ) and
       
   104         *                         The used dcs in received message
       
   105         *                         ( Phone Server -> Phone Client ).
       
   106         */
       
   107         void StartSAT( 
       
   108             TRequestStatus& aStatus, 
       
   109             TDes& aReceiveMessage, 
       
   110             TPckg< TUint >& aShowNotesAndDcs );
       
   111 
       
   112         /**
       
   113         * Cancels SAT session.
       
   114         */ 
       
   115         void StopSAT();
       
   116 
       
   117 
       
   118 
       
   119         //--------------------- From app ------------------------------
       
   120 
       
   121         /**
       
   122         * UI informs that it is been created
       
   123         * 
       
   124         * @return Error code.
       
   125         */
       
   126        TInt AppStarting();
       
   127 
       
   128         /**
       
   129         * UI informs that it is terminating.
       
   130         *
       
   131         * @param aExitReason The reason why the application was terminated.
       
   132         * @return Error code.
       
   133         */
       
   134         TInt AppTerminating( 
       
   135             TPhCltUssdAppExitReason aExitReason );
       
   136 
       
   137         /**
       
   138         * UI informs that it is brougth to foreground.
       
   139         *
       
   140         * @return Should the editor be emptied?
       
   141         */
       
   142         TBool AppToForeground();
       
   143 
       
   144         /**
       
   145         * UI informs that it is gone background.
       
   146         *
       
   147         * @return Error code.
       
   148         */
       
   149         TInt AppToBackground();
       
   150 
       
   151 
       
   152 
       
   153 
       
   154     };
       
   155 
       
   156 #endif // RPHCLTUSSD_H