telephonyserverplugins/simatktsy/inc/CSatNotifyOpenChannel.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        : CSatNotifyOpenChannel.h
       
    16 * Part of     : Common SIM ATK TSY / commonsimatktsy
       
    17 * Specific notifications class
       
    18 * Version     : 1.0
       
    19 *
       
    20 */
       
    21 
       
    22 
       
    23 
       
    24 #ifndef CSATNOTIFYOPENCHANNEL_H
       
    25 #define CSATNOTIFYOPENCHANNEL_H
       
    26 
       
    27 
       
    28 //  INCLUDES
       
    29 #include <etelsat.h>
       
    30 #include "MSatNotificationsBase.h"
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 class CSatDataPackage;
       
    34 class CBerTlv;
       
    35 
       
    36 /**
       
    37 * DESCRIPTION
       
    38 * SAT Open channel notification class.
       
    39 * Created when client requests to be notified when Open Channel
       
    40 * command arrives from SIM.
       
    41 *
       
    42 * The purpose of this command is to enable the SAT
       
    43 * (which alerts other applications in the phone) to be notified
       
    44 * of the changes to the SIM configuration that have occurred as
       
    45 * the result of a SIM application activity. It is up to SAT to
       
    46 * ensure this is done correctly.
       
    47 * @lib Commonsimatktsy
       
    48 * @since 3.1
       
    49 */
       
    50 NONSHARABLE_CLASS ( CSatNotifyOpenChannel ) : public CBase,
       
    51                               public MSatNotificationsBase
       
    52     {
       
    53     public:  // Constructors and destructor
       
    54 
       
    55         /**
       
    56         * Two-phased constructor.
       
    57         * @param aNotificationsTsy: Pointer to NotificationsTsy
       
    58         * return CSatNotifyOpenChannel*: created object 
       
    59         */
       
    60         static CSatNotifyOpenChannel* NewL( 
       
    61         	CSatNotificationsTsy* aNotificationsTsy );
       
    62 
       
    63         /**
       
    64         * C++ Destructor.
       
    65         */
       
    66         ~CSatNotifyOpenChannel();
       
    67 
       
    68 	private:
       
    69 	
       
    70         /**
       
    71         * By default C++ constructor is private.
       
    72         * @param aNotificationsTsy: Pointer to NotificationsTsy
       
    73         * @return None
       
    74         */
       
    75         CSatNotifyOpenChannel( CSatNotificationsTsy* aNotificationsTsy );
       
    76 
       
    77         /**
       
    78         * Class attributes are created in ConstructL. 
       
    79         * @param None
       
    80         * @return None
       
    81         */
       
    82         void ConstructL();
       
    83 
       
    84     public: // Functions from base classes
       
    85                 
       
    86         /**
       
    87         * Notification request received from client
       
    88         * @param aTsyReqHandle: request handle from ETel
       
    89         * @param aPackage: Packed data
       
    90         * @return KErrNone
       
    91         */
       
    92         TInt Notify( const TTsyReqHandle aTsyReqHandle,
       
    93             const TDataPackage& aPackage );
       
    94 
       
    95         /**
       
    96         * Cancels notification request about display text change.
       
    97         * @param aReqHandle notify request handle
       
    98         * @return KErrNone
       
    99         */
       
   100         TInt CancelNotification( const TTsyReqHandle aReqHandle );
       
   101         
       
   102         /**
       
   103         * Completes the notification request received from client
       
   104         * @param aDataPackage: Packed return data
       
   105         * @param aErrorCode: Possible error code
       
   106         * @return KErrNone
       
   107         */
       
   108         TInt CompleteNotifyL( CSatDataPackage* aDataPackage, TInt aErrorCode );
       
   109 
       
   110         /**
       
   111         * Handles the Display text terminal response
       
   112         * @param aRsp: Response structure
       
   113         * @return Success/ Failure value
       
   114         */
       
   115         TInt TerminalResponseL( TDes8* aRsp );
       
   116 
       
   117 	private: // New functions
       
   118 
       
   119         /**
       
   120         * Create notification specific terminal response data
       
   121         * @param aPCmdNumber: Proactive command number
       
   122         * @param aGeneralResult: Result of the proactive command
       
   123         * @param aAdditionalInfo: Additional info for terminal response
       
   124         * @return Success/Failure value
       
   125         */
       
   126         TInt CreateTerminalRespL( TUint8 aPCmdNumber, TUint8 aGeneralResult,
       
   127                                   const TDesC16& aAdditionalInfo );
       
   128         
       
   129 
       
   130     private:    // Data
       
   131     	
       
   132 		RSat::TOpenChannelBaseV2Pckg* iOpenBaseChannelV2Pckg;
       
   133         // Open Cs Channel package store. Package allocated
       
   134         // in this class and received from ETel
       
   135         RSat::TOpenCsChannelV2Pckg* iOpenCsChannelV2Pckg;
       
   136         // Open Gprs Channel package store. Package allocated
       
   137         // in this class and received from ETel
       
   138         RSat::TOpenGprsChannelV4Pckg* iOpenGprsChannelV4Pckg;
       
   139         // Open Local Link Channel package store. Package allocated
       
   140         // in this class and received from ETel
       
   141         RSat::TOpenLocalLinksChannelV2Pckg* iOpenLocalLinksChannelV2Pckg;
       
   142         // Pointer to the notifications tsy class
       
   143         CSatNotificationsTsy* iNotificationsTsy;
       
   144 		// Bearer type
       
   145 		TUint8 iBearerType;
       
   146 		// Bearer
       
   147 		TBuf8<RSat::KBearerParamsMaxSize> iBearer;
       
   148 		// Buffer size
       
   149         TUint16 iBufferSize;
       
   150     };
       
   151 
       
   152 #endif // CSATNOTIFYOPENCHANNEL_H