telephonyserverplugins/simatktsy/src/CSatNotifyMoreTime.cpp
branchRCL_3
changeset 66 07a122eea281
parent 65 630d2f34d719
equal deleted inserted replaced
65:630d2f34d719 66:07a122eea281
     1 // Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    18 //
    18 //
    19 
    19 
    20 
    20 
    21 
    21 
    22 //INCLUDES
    22 //INCLUDES
    23 
       
    24 #include "OstTraceDefinitions.h"
       
    25 #ifdef OST_TRACE_COMPILER_IN_USE
       
    26 #include "CSatNotifyMoreTimeTraces.h"
       
    27 #endif
       
    28 
       
    29 #include <satcs.h>                  // Etel SAT IPC definitions
    23 #include <satcs.h>                  // Etel SAT IPC definitions
    30 #include "CSatTsy.h"                // Tsy class header
    24 #include "CSatTsy.h"                // Tsy class header
    31 #include "CSatNotifyMoreTime.h"  	// Class header
    25 #include "CSatNotifyMoreTime.h"  	// Class header
    32 #include "CSatNotificationsTsy.h"   // Tsy class header
    26 #include "CSatNotificationsTsy.h"   // Tsy class header
    33 #include "CBerTlv.h"                // Ber Tlv data handling
    27 #include "CBerTlv.h"                // Ber Tlv data handling
    34 #include "TTlv.h"					// TTlv class
    28 #include "TTlv.h"					// TTlv class
    35 #include "CSatDataPackage.h"        // Parameter packing 
    29 #include "CSatDataPackage.h"        // Parameter packing 
       
    30 #include "TfLogger.h"               // For TFLOGSTRING
    36 #include "TSatUtility.h"            // Utilities
    31 #include "TSatUtility.h"            // Utilities
    37 #include "CSatTsyReqHandleStore.h"  // Request handle class
    32 #include "CSatTsyReqHandleStore.h"  // Request handle class
    38 #include "cmmmessagemanagerbase.h"  // Message manager class for forwarding req.
    33 #include "cmmmessagemanagerbase.h"  // Message manager class for forwarding req.
    39 
    34 
    40 // -----------------------------------------------------------------------------
    35 // -----------------------------------------------------------------------------
    45 CSatNotifyMoreTime* CSatNotifyMoreTime::NewL
    40 CSatNotifyMoreTime* CSatNotifyMoreTime::NewL
    46         ( 
    41         ( 
    47         CSatNotificationsTsy* aNotificationsTsy 
    42         CSatNotificationsTsy* aNotificationsTsy 
    48         )
    43         )
    49     {
    44     {
    50     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMORETIME_NEWL_1, "CSAT: CSatNotifyMoreTime::NewL");
    45     TFLOGSTRING("CSAT: CSatNotifyMoreTime::NewL");
    51    	CSatNotifyMoreTime* const satNotifyMoreTime = 
    46    	CSatNotifyMoreTime* const satNotifyMoreTime = 
    52         new ( ELeave ) CSatNotifyMoreTime( aNotificationsTsy );
    47         new ( ELeave ) CSatNotifyMoreTime( aNotificationsTsy );
    53     CleanupStack::PushL( satNotifyMoreTime );
    48     CleanupStack::PushL( satNotifyMoreTime );
    54     satNotifyMoreTime->ConstructL();
    49     satNotifyMoreTime->ConstructL();
    55     CleanupStack::Pop( satNotifyMoreTime );
    50     CleanupStack::Pop( satNotifyMoreTime );
    56     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMORETIME_NEWL_2, "CSAT: CSatNotifyMoreTime::NewL, end of method");
    51     TFLOGSTRING("CSAT: CSatNotifyMoreTime::NewL, end of method");
    57     return satNotifyMoreTime;
    52     return satNotifyMoreTime;
    58     }
    53     }
    59 
    54 
    60 // -----------------------------------------------------------------------------
    55 // -----------------------------------------------------------------------------
    61 // CSatNotifyMoreTime::~CSatNotifyMoreTime
    56 // CSatNotifyMoreTime::~CSatNotifyMoreTime
    65 CSatNotifyMoreTime::~CSatNotifyMoreTime
    60 CSatNotifyMoreTime::~CSatNotifyMoreTime
    66         ( 
    61         ( 
    67 		// None
    62 		// None
    68         )
    63         )
    69     {
    64     {
    70     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMORETIME_DTOR_1, "CSAT: CSatNotifyMoreTime::~CSatNotifyMoreTime");
    65     TFLOGSTRING("CSAT: CSatNotifyMoreTime::~CSatNotifyMoreTime");
    71     }
    66     }
    72     
    67     
    73 // -----------------------------------------------------------------------------
    68 // -----------------------------------------------------------------------------
    74 // CSatNotifyMoreTime::CSatNotifyMoreTime
    69 // CSatNotifyMoreTime::CSatNotifyMoreTime
    75 // Default C++ constructor
    70 // Default C++ constructor
    91 void CSatNotifyMoreTime::ConstructL
    86 void CSatNotifyMoreTime::ConstructL
    92         (
    87         (
    93         // None
    88         // None
    94         )
    89         )
    95     {
    90     {
    96     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMORETIME_CONSTRUCTL_1, "CSAT: CSatNotifyMoreTime::ConstructL, does nothing");
    91     TFLOGSTRING("CSAT: CSatNotifyMoreTime::ConstructL, does nothing");
    97     }
    92     }
    98 
    93 
    99 // -----------------------------------------------------------------------------
    94 // -----------------------------------------------------------------------------
   100 // CSatNotifyMoreTime::CompleteNotifyL
    95 // CSatNotifyMoreTime::CompleteNotifyL
   101 // This method completes an outstanding asynchronous NotifyMoreTime request. 
    96 // This method completes an outstanding asynchronous NotifyMoreTime request. 
   105         (
   100         (
   106         CSatDataPackage* aDataPackage,
   101         CSatDataPackage* aDataPackage,
   107         TInt /*aErrorCode*/              
   102         TInt /*aErrorCode*/              
   108         )
   103         )
   109     {
   104     {
   110     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMORETIME_COMPLETENOTIFYL_1, "CSAT: CSatNotifyMoreTime::CompleteNotifyL");
   105     TFLOGSTRING("CSAT: CSatNotifyMoreTime::CompleteNotifyL");
   111     TInt ret( KErrNone );
   106     TInt ret( KErrNone );
   112     // Unpack parameters
   107     // Unpack parameters
   113     TPtrC8* data;
   108     TPtrC8* data;
   114     aDataPackage->UnPackData( &data );    
   109     aDataPackage->UnPackData( &data );    
   115     // Get ber tlv 
   110     // Get ber tlv 
   139         ( 
   134         ( 
   140         TUint8 aPCmdNumber,         
   135         TUint8 aPCmdNumber,         
   141         TUint8 aGeneralResult			 
   136         TUint8 aGeneralResult			 
   142 		)
   137 		)
   143     {
   138     {
   144     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYMORETIME_CREATETERMINALRESPL_1, "CSAT: CSatNotifyMoreTime::CreateTerminalRespL");
   139     TFLOGSTRING("CSAT: CSatNotifyMoreTime::CreateTerminalRespL");
   145     // Create and append response data
   140     // Create and append response data
   146     TTlv tlvSpecificData;
   141     TTlv tlvSpecificData;
   147 	// General result
   142 	// General result
   148     tlvSpecificData.AddTag( KTlvResultTag );   
   143     tlvSpecificData.AddTag( KTlvResultTag );   
   149     tlvSpecificData.AddByte( aGeneralResult );	
   144     tlvSpecificData.AddByte( aGeneralResult );