telephonyserverplugins/simatktsy/inc/CSatNotifySetUpCall.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        : CSatNotifySetUpCall.h
       
    16 * Part of     : Common SIM ATK TSY / commonsimatktsy
       
    17 * Specific notifications class
       
    18 * Version     : 1.0
       
    19 *
       
    20 */
       
    21 
       
    22 
       
    23 
       
    24 #ifndef CSATNOTIFYSETUPCALL_H
       
    25 #define CSATNOTIFYSETUPCALL_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 Setup Call notification class.
       
    39 * Created when client requests to be notified when Setup Call
       
    40 * command arrives from SIM.
       
    41 *
       
    42 * Setup a call. Can be setup in three different ways:
       
    43 * - Set up a call, only if not currently busy on another call
       
    44 * - Set up a call, put all other call on hold
       
    45 * - Set up a call, disconnect other calls
       
    46 * @lib Commonsimatktsy
       
    47 * @since 3.1
       
    48 */
       
    49 NONSHARABLE_CLASS ( CSatNotifySetUpCall ) : public CBase,
       
    50                             public MSatNotificationsBase
       
    51     {
       
    52     public:   // Constructors and destructor
       
    53         
       
    54         /**
       
    55         * Two-phased constructor.
       
    56         * @param aNotificationsTsy: Pointer to NotificationsTsy
       
    57         * return CSatNotifySetUpCall*: created object 
       
    58         */
       
    59         static CSatNotifySetUpCall* NewL( 
       
    60         	CSatNotificationsTsy* aNotificationsTsy );
       
    61 
       
    62         /**
       
    63         * C++ Destructor.
       
    64         */
       
    65         ~CSatNotifySetUpCall();
       
    66 
       
    67 	private:
       
    68         /**
       
    69         * By default C++ constructor is private.
       
    70         * @param aNotificationsTsy: Pointer to NotificationsTsy
       
    71         * @return None
       
    72         */
       
    73         CSatNotifySetUpCall( CSatNotificationsTsy* aNotificationsTsy );
       
    74 
       
    75         /**
       
    76         * Class attributes are created in ConstructL. 
       
    77         * @param None
       
    78         * @return None
       
    79         */
       
    80         void ConstructL();
       
    81         
       
    82     public: // Functions from base classes
       
    83 
       
    84         /**
       
    85         * Set up call Notification request received from client
       
    86         * @param aTsyReqHandle: request handle from ETel
       
    87         * @param aPackage: Packed data
       
    88         * @return KErrNone
       
    89         */
       
    90         TInt Notify( const TTsyReqHandle aTsyReqHandle,
       
    91             const TDataPackage& aPackage );
       
    92 
       
    93         /**
       
    94         * Cancels notification request for SetUpCall.
       
    95         * @param aReqHandle notify request handle
       
    96         * @return KErrNone
       
    97         */
       
    98         TInt CancelNotification( const TTsyReqHandle aReqHandle );
       
    99                  
       
   100         /**
       
   101         * Completes SetUpCall message to client
       
   102         * @param aDataPackage: Packaged return data
       
   103         * @param aErrorCode: Possible error code
       
   104         * @return KErrNone/ KErrCorrupt
       
   105         */
       
   106         TInt CompleteNotifyL( CSatDataPackage* aDataPackage, TInt aErrorCode );
       
   107 
       
   108         /**
       
   109         * From CSatNotificationsBase handles Set up call terminal response 
       
   110         * coming from client.
       
   111         * @param aRsp: Response structure
       
   112         * @return KErrNone/ KErrCorrupt
       
   113         */
       
   114         TInt TerminalResponseL( TDes8* aRsp );
       
   115 
       
   116 	public: // New functions
       
   117 	
       
   118         /**
       
   119         * Create notification specific terminal response data
       
   120         * @param aPCmdNumber: Proactive command number
       
   121         * @param aGeneralResult: Result of the proactive command
       
   122         * @param aAdditionalInfo: Additional info for terminal response
       
   123         * @return Success/Failure value
       
   124         */
       
   125         TInt CreateTerminalRespL( 
       
   126             TUint8 aPCmdNumber, TUint8 aGeneralResult, 
       
   127             TDesC16& aAdditionalInfo );
       
   128         
       
   129         /**
       
   130         * Cache call connected event
       
   131         * @param aEnvelope
       
   132         * @return none
       
   133         */
       
   134         void StoreCallConnectedEvent( const TDesC8& aEnvelope );
       
   135 
       
   136     private: // Data
       
   137 
       
   138         // Setup Call package store. Package received from ETel
       
   139         RSat::TSetUpCallV1Pckg* iSetUpCallV1Pckg;
       
   140         // Cache for Call connected event
       
   141         TBuf8<12>               iCallConnectedEvent;
       
   142         // Pointer to the notifications tsy class
       
   143         CSatNotificationsTsy* iNotificationsTsy;
       
   144         // CC result
       
   145         TUint8 iCCResult;
       
   146     };
       
   147 
       
   148 #endif // CSATNOTIFYSETUPCALL_H