telephonyserverplugins/simatktsy/src/CSatNotifyPollingOff.cpp
changeset 42 3adadc800673
parent 0 3553901f7fa8
child 66 07a122eea281
equal deleted inserted replaced
31:8ab6687fb94c 42:3adadc800673
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2005-2010 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 
    23 #include <satcs.h>                  // Etel SAT IPC definitions
    29 #include <satcs.h>                  // Etel SAT IPC definitions
    24 #include "CSatTsy.h"                // Tsy class header
    30 #include "CSatTsy.h"                // Tsy class header
    25 #include "CSatNotifyPollingOff.h"   // Tsy class header
    31 #include "CSatNotifyPollingOff.h"   // Tsy class header
    26 #include "CSatNotificationsTsy.h"   // Class header
    32 #include "CSatNotificationsTsy.h"   // Class header
    27 #include "CBerTlv.h"                // Ber Tlv data handling
    33 #include "CBerTlv.h"                // Ber Tlv data handling
    28 #include "TTlv.h"					// TTlv class
    34 #include "TTlv.h"					// TTlv class
    29 #include "CSatDataPackage.h"        // Parameter packing 
    35 #include "CSatDataPackage.h"        // Parameter packing 
    30 #include "TfLogger.h"               // For TFLOGSTRING
       
    31 #include "TSatUtility.h"            // Utilities
    36 #include "TSatUtility.h"            // Utilities
    32 #include "CSatTsyReqHandleStore.h"  // Request handle class
    37 #include "CSatTsyReqHandleStore.h"  // Request handle class
    33 #include "cmmmessagemanagerbase.h" 	// Message manager class for forwarding req.
    38 #include "cmmmessagemanagerbase.h" 	// Message manager class for forwarding req.
    34 #include "MSatTsy_IPCDefs.h"        // Sat Tsy internal request types
    39 #include "MSatTsy_IPCDefs.h"        // Sat Tsy internal request types
    35 
    40 
    41 CSatNotifyPollingOff* CSatNotifyPollingOff::NewL
    46 CSatNotifyPollingOff* CSatNotifyPollingOff::NewL
    42         ( 
    47         ( 
    43         CSatNotificationsTsy* aNotificationsTsy 
    48         CSatNotificationsTsy* aNotificationsTsy 
    44         )
    49         )
    45     {
    50     {
    46     TFLOGSTRING("CSAT: CSatNotifyPollingOff::NewL");
    51     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYPOLLINGOFF_NEWL_1, "CSAT: CSatNotifyPollingOff::NewL");
    47    	CSatNotifyPollingOff* const satNotifyPollingOff = 
    52    	CSatNotifyPollingOff* const satNotifyPollingOff = 
    48         new ( ELeave ) CSatNotifyPollingOff( aNotificationsTsy );
    53         new ( ELeave ) CSatNotifyPollingOff( aNotificationsTsy );
    49     CleanupStack::PushL( satNotifyPollingOff );
    54     CleanupStack::PushL( satNotifyPollingOff );
    50     satNotifyPollingOff->ConstructL();
    55     satNotifyPollingOff->ConstructL();
    51     CleanupStack::Pop( satNotifyPollingOff );
    56     CleanupStack::Pop( satNotifyPollingOff );
    52     TFLOGSTRING("CSAT: CSatNotifyPollingOff::NewL, end of method");
    57     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYPOLLINGOFF_NEWL_2, "CSAT: CSatNotifyPollingOff::NewL, end of method");
    53     return satNotifyPollingOff;
    58     return satNotifyPollingOff;
    54     }
    59     }
    55 
    60 
    56 // -----------------------------------------------------------------------------
    61 // -----------------------------------------------------------------------------
    57 // CSatNotifyPollingOff::~CSatNotifyPollingOff
    62 // CSatNotifyPollingOff::~CSatNotifyPollingOff
    61 CSatNotifyPollingOff::~CSatNotifyPollingOff
    66 CSatNotifyPollingOff::~CSatNotifyPollingOff
    62         ( 
    67         ( 
    63 		// None
    68 		// None
    64         )
    69         )
    65     {
    70     {
    66     TFLOGSTRING("CSAT: CSatNotifyPollingOff::~CSatNotifyPollingOff");
    71     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYPOLLINGOFF_DTOR_1, "CSAT: CSatNotifyPollingOff::~CSatNotifyPollingOff");
    67     }
    72     }
    68     
    73     
    69 // -----------------------------------------------------------------------------
    74 // -----------------------------------------------------------------------------
    70 // CSatNotifyPollingOff::CSatNotifyPollingOff
    75 // CSatNotifyPollingOff::CSatNotifyPollingOff
    71 // Default C++ constructor
    76 // Default C++ constructor
    87 void CSatNotifyPollingOff::ConstructL
    92 void CSatNotifyPollingOff::ConstructL
    88         (
    93         (
    89         // None
    94         // None
    90         )
    95         )
    91     {
    96     {
    92     TFLOGSTRING("CSAT: CSatNotifyPollingOff::ConstructL");
    97     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYPOLLINGOFF_CONSTRUCTL_1, "CSAT: CSatNotifyPollingOff::ConstructL");
    93     }
    98     }
    94 
    99 
    95 // -----------------------------------------------------------------------------
   100 // -----------------------------------------------------------------------------
    96 // CSatNotifyPollingOff::CompleteNotifyL
   101 // CSatNotifyPollingOff::CompleteNotifyL
    97 // This method completes an outstanding asynchronous 
   102 // This method completes an outstanding asynchronous 
   102         ( 
   107         ( 
   103         CSatDataPackage* aDataPackage,
   108         CSatDataPackage* aDataPackage,
   104         TInt /*aErrorCode*/  
   109         TInt /*aErrorCode*/  
   105         ) 
   110         ) 
   106     {
   111     {
   107     TFLOGSTRING("CSAT: CSatNotifyPollingOff::CompleteNotifyL");
   112     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYPOLLINGOFF_COMPLETENOTIFYL_1, "CSAT: CSatNotifyPollingOff::CompleteNotifyL");
   108     TPtrC8* data;
   113     TPtrC8* data;
   109     TBuf<1> additionalInfo;
   114     TBuf<1> additionalInfo;
   110     aDataPackage->UnPackData( &data );
   115     aDataPackage->UnPackData( &data );
   111     // Get ber tlv 
   116     // Get ber tlv 
   112     CBerTlv berTlv;
   117     CBerTlv berTlv;
   149         TUint8  aPCmdNumber,          
   154         TUint8  aPCmdNumber,          
   150         TUint8  aGeneralResult,      
   155         TUint8  aGeneralResult,      
   151         TDesC16& aAdditionalInfo            
   156         TDesC16& aAdditionalInfo            
   152 		)
   157 		)
   153     {
   158     {
   154     TFLOGSTRING("CSAT: CSatNotifyPollingOff::CreateTerminalRespL");    
   159     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYPOLLINGOFF_CREATETERMINALRESPL_1, "CSAT: CSatNotifyPollingOff::CreateTerminalRespL");
   155     
   160     
   156     TTlv tlvSpecificData;
   161     TTlv tlvSpecificData;
   157     tlvSpecificData.AddTag( KTlvResultTag );
   162     tlvSpecificData.AddTag( KTlvResultTag );
   158     tlvSpecificData.AddByte( aGeneralResult );
   163     tlvSpecificData.AddByte( aGeneralResult );
   159 
   164 
   171                 {
   176                 {
   172                 break;
   177                 break;
   173                 }
   178                 }
   174             default:
   179             default:
   175                 {
   180                 {
   176                 TFLOGSTRING2("CSAT: CSatNotifyPollingOff::\
   181                 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYPOLLINGOFF_CREATETERMINALRESPL_2, "CSAT: CSatNotifyPollingOff::CreateTerminalRespL, Additional Info: %d", aAdditionalInfo[0]);
   177                     CreateTerminalRespL, Additional Info: %d", 
       
   178                     aAdditionalInfo[0]);
       
   179                 tlvSpecificData.AddByte( static_cast<TUint8>( 
   182                 tlvSpecificData.AddByte( static_cast<TUint8>( 
   180                 	aAdditionalInfo[0] ) );
   183                 	aAdditionalInfo[0] ) );
   181                 break;
   184                 break;
   182                 }
   185                 }
   183             }
   186             }