telephonyserverplugins/simatktsy/inc/CSatNotifySendUssd.h
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 /*
       
     2 * Copyright (c) 2005-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:
       
    15 * Name        : CSatNotifySendUssd.h
       
    16 * Part of     : Common SIM ATK TSY / commonsimatktsy
       
    17 * Specific notifications class
       
    18 * Version     : 1.0
       
    19 *
       
    20 */
       
    21 
       
    22 
       
    23 
       
    24 #ifndef CSATNOTIFYSENDUSSD_H
       
    25 #define CSATNOTIFYSENDUSSD_H
       
    26 
       
    27 
       
    28 //  INCLUDES
       
    29 #include <etelsat.h>
       
    30 #include "MSatNotificationsBase.h"
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 class CSatDataPackage;
       
    34 class CSatNotificationsTsy;
       
    35 
       
    36 /**
       
    37 * DESCRIPTION
       
    38 * SAT Send USSD notification class.
       
    39 * Created when client requests to be notified when Send USSD
       
    40 * command arrives from SIM.
       
    41 *
       
    42 * Sends an USSD string towards the network. Upon receiving this
       
    43 * command, the SAT shall decide if it is able to execute the command.
       
    44 * @lib Commonsimatktsy
       
    45 * @since 3.1
       
    46 */
       
    47 NONSHARABLE_CLASS ( CSatNotifySendUssd ) : public CBase,
       
    48                            public MSatNotificationsBase
       
    49     {
       
    50     public:   // Constructors and destructor
       
    51     
       
    52         /**
       
    53         * Two-phased constructor.
       
    54         * @param aNotificationsTsy: Pointer to NotificationsTsy
       
    55         * return CSatNotifySendUssd*: created object 
       
    56         */
       
    57         static CSatNotifySendUssd* NewL( 
       
    58         	CSatNotificationsTsy* aNotificationsTsy );
       
    59 
       
    60         /**
       
    61         * C++ Destructor.
       
    62         */
       
    63         ~CSatNotifySendUssd();
       
    64 
       
    65 	private:
       
    66 	
       
    67         /**
       
    68         * By default C++ constructor is private.
       
    69         * @param aNotificationsTsy: Pointer to NotificationsTsy
       
    70         * @return None
       
    71         */
       
    72         CSatNotifySendUssd( CSatNotificationsTsy* aNotificationsTsy );
       
    73 
       
    74         /**
       
    75         * Class attributes are created in ConstructL. 
       
    76         * @param None
       
    77         * @return None
       
    78         */
       
    79         void ConstructL();
       
    80 
       
    81     public: // Functions from base classes
       
    82 
       
    83         /**
       
    84         * Send Ussd Notification request received from client
       
    85         * @param aReqHandle request handle from ETel
       
    86         * @param aDataPtr pointer to parameter class
       
    87         * @return KErrNone
       
    88         */
       
    89         TInt Notify( const TTsyReqHandle aTsyReqHandle,
       
    90             const TDataPackage& aPackage );
       
    91 
       
    92         /**
       
    93         * Cancels notification request for Send Ussd.
       
    94         * @param aReqHandle notify request handle
       
    95         * @return KErrNone
       
    96         */
       
    97         TInt CancelNotification( const TTsyReqHandle aReqHandle );
       
    98                  
       
    99         /**
       
   100         * Completes Send Ussd message to client
       
   101         * @param aDataPackage: Packaged return data
       
   102         * @param aErrorCode: Possible error code
       
   103         * @return KErrNone/ KErrCorrupt
       
   104         */
       
   105         TInt CompleteNotifyL( CSatDataPackage* aDataPackage, TInt aErrorCode );
       
   106 
       
   107         /**
       
   108         * From CSatNotificationsBase handles Send Ussd terminal response 
       
   109         * coming from client.
       
   110         * @param aRsp: Response structure
       
   111         * @return KErrNone/ KErrCorrupt
       
   112         */
       
   113         TInt TerminalResponseL( TDes8* aRsp );
       
   114 
       
   115 	public: // New functions
       
   116 	
       
   117         /**
       
   118         * Create notification specific terminal response data
       
   119         * @param aPCmdNumber: Proactive command number
       
   120         * @param aGeneralResult result of the proactive command display text
       
   121         * @param aAdditionalInfo Additional info response might give
       
   122         * @param aDcs Data Coding Scheme
       
   123         * @return Success/ Failure value
       
   124         */
       
   125         TInt CreateTerminalRespL( TUint8 aPCmdNumber, TUint8 aGeneralResult,
       
   126             					 TDesC16& aAdditionalInfo, 
       
   127             					 TDesC16& aTextString, TUint8 aDcs = NULL );  
       
   128 
       
   129     private: // Data
       
   130 
       
   131         // Send Ussd package store
       
   132         RSat::TSendUssdV1Pckg* iSendUssdV1Pckg;
       
   133         // Pointer to the notifications tsy class
       
   134         CSatNotificationsTsy* iNotificationsTsy;
       
   135     };
       
   136 
       
   137 
       
   138 #endif // CSATNOTIFYSENDUSSD_H