telephonyserverplugins/simatktsy/src/CSatNotifyPollingOff.cpp
branchRCL_3
changeset 20 07a122eea281
parent 19 630d2f34d719
equal deleted inserted replaced
19:630d2f34d719 20: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 "CSatNotifyPollingOffTraces.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 "CSatNotifyPollingOff.h"   // Tsy class header
    25 #include "CSatNotifyPollingOff.h"   // Tsy class header
    32 #include "CSatNotificationsTsy.h"   // Class header
    26 #include "CSatNotificationsTsy.h"   // 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 #include "MSatTsy_IPCDefs.h"        // Sat Tsy internal request types
    34 #include "MSatTsy_IPCDefs.h"        // Sat Tsy internal request types
    40 
    35 
    46 CSatNotifyPollingOff* CSatNotifyPollingOff::NewL
    41 CSatNotifyPollingOff* CSatNotifyPollingOff::NewL
    47         ( 
    42         ( 
    48         CSatNotificationsTsy* aNotificationsTsy 
    43         CSatNotificationsTsy* aNotificationsTsy 
    49         )
    44         )
    50     {
    45     {
    51     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYPOLLINGOFF_NEWL_1, "CSAT: CSatNotifyPollingOff::NewL");
    46     TFLOGSTRING("CSAT: CSatNotifyPollingOff::NewL");
    52    	CSatNotifyPollingOff* const satNotifyPollingOff = 
    47    	CSatNotifyPollingOff* const satNotifyPollingOff = 
    53         new ( ELeave ) CSatNotifyPollingOff( aNotificationsTsy );
    48         new ( ELeave ) CSatNotifyPollingOff( aNotificationsTsy );
    54     CleanupStack::PushL( satNotifyPollingOff );
    49     CleanupStack::PushL( satNotifyPollingOff );
    55     satNotifyPollingOff->ConstructL();
    50     satNotifyPollingOff->ConstructL();
    56     CleanupStack::Pop( satNotifyPollingOff );
    51     CleanupStack::Pop( satNotifyPollingOff );
    57     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYPOLLINGOFF_NEWL_2, "CSAT: CSatNotifyPollingOff::NewL, end of method");
    52     TFLOGSTRING("CSAT: CSatNotifyPollingOff::NewL, end of method");
    58     return satNotifyPollingOff;
    53     return satNotifyPollingOff;
    59     }
    54     }
    60 
    55 
    61 // -----------------------------------------------------------------------------
    56 // -----------------------------------------------------------------------------
    62 // CSatNotifyPollingOff::~CSatNotifyPollingOff
    57 // CSatNotifyPollingOff::~CSatNotifyPollingOff
    66 CSatNotifyPollingOff::~CSatNotifyPollingOff
    61 CSatNotifyPollingOff::~CSatNotifyPollingOff
    67         ( 
    62         ( 
    68 		// None
    63 		// None
    69         )
    64         )
    70     {
    65     {
    71     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYPOLLINGOFF_DTOR_1, "CSAT: CSatNotifyPollingOff::~CSatNotifyPollingOff");
    66     TFLOGSTRING("CSAT: CSatNotifyPollingOff::~CSatNotifyPollingOff");
    72     }
    67     }
    73     
    68     
    74 // -----------------------------------------------------------------------------
    69 // -----------------------------------------------------------------------------
    75 // CSatNotifyPollingOff::CSatNotifyPollingOff
    70 // CSatNotifyPollingOff::CSatNotifyPollingOff
    76 // Default C++ constructor
    71 // Default C++ constructor
    92 void CSatNotifyPollingOff::ConstructL
    87 void CSatNotifyPollingOff::ConstructL
    93         (
    88         (
    94         // None
    89         // None
    95         )
    90         )
    96     {
    91     {
    97     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYPOLLINGOFF_CONSTRUCTL_1, "CSAT: CSatNotifyPollingOff::ConstructL");
    92     TFLOGSTRING("CSAT: CSatNotifyPollingOff::ConstructL");
    98     }
    93     }
    99 
    94 
   100 // -----------------------------------------------------------------------------
    95 // -----------------------------------------------------------------------------
   101 // CSatNotifyPollingOff::CompleteNotifyL
    96 // CSatNotifyPollingOff::CompleteNotifyL
   102 // This method completes an outstanding asynchronous 
    97 // This method completes an outstanding asynchronous 
   107         ( 
   102         ( 
   108         CSatDataPackage* aDataPackage,
   103         CSatDataPackage* aDataPackage,
   109         TInt /*aErrorCode*/  
   104         TInt /*aErrorCode*/  
   110         ) 
   105         ) 
   111     {
   106     {
   112     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYPOLLINGOFF_COMPLETENOTIFYL_1, "CSAT: CSatNotifyPollingOff::CompleteNotifyL");
   107     TFLOGSTRING("CSAT: CSatNotifyPollingOff::CompleteNotifyL");
   113     TPtrC8* data;
   108     TPtrC8* data;
   114     TBuf<1> additionalInfo;
   109     TBuf<1> additionalInfo;
   115     aDataPackage->UnPackData( &data );
   110     aDataPackage->UnPackData( &data );
   116     // Get ber tlv 
   111     // Get ber tlv 
   117     CBerTlv berTlv;
   112     CBerTlv berTlv;
   154         TUint8  aPCmdNumber,          
   149         TUint8  aPCmdNumber,          
   155         TUint8  aGeneralResult,      
   150         TUint8  aGeneralResult,      
   156         TDesC16& aAdditionalInfo            
   151         TDesC16& aAdditionalInfo            
   157 		)
   152 		)
   158     {
   153     {
   159     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYPOLLINGOFF_CREATETERMINALRESPL_1, "CSAT: CSatNotifyPollingOff::CreateTerminalRespL");
   154     TFLOGSTRING("CSAT: CSatNotifyPollingOff::CreateTerminalRespL");    
   160     
   155     
   161     TTlv tlvSpecificData;
   156     TTlv tlvSpecificData;
   162     tlvSpecificData.AddTag( KTlvResultTag );
   157     tlvSpecificData.AddTag( KTlvResultTag );
   163     tlvSpecificData.AddByte( aGeneralResult );
   158     tlvSpecificData.AddByte( aGeneralResult );
   164 
   159 
   176                 {
   171                 {
   177                 break;
   172                 break;
   178                 }
   173                 }
   179             default:
   174             default:
   180                 {
   175                 {
   181                 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYPOLLINGOFF_CREATETERMINALRESPL_2, "CSAT: CSatNotifyPollingOff::CreateTerminalRespL, Additional Info: %d", aAdditionalInfo[0]);
   176                 TFLOGSTRING2("CSAT: CSatNotifyPollingOff::\
       
   177                     CreateTerminalRespL, Additional Info: %d", 
       
   178                     aAdditionalInfo[0]);
   182                 tlvSpecificData.AddByte( static_cast<TUint8>( 
   179                 tlvSpecificData.AddByte( static_cast<TUint8>( 
   183                 	aAdditionalInfo[0] ) );
   180                 	aAdditionalInfo[0] ) );
   184                 break;
   181                 break;
   185                 }
   182                 }
   186             }
   183             }