telephonyserverplugins/simatktsy/src/CSatNotifyPollInterval.cpp
branchRCL_3
changeset 65 630d2f34d719
parent 0 3553901f7fa8
child 66 07a122eea281
equal deleted inserted replaced
61:17af172ffa5f 65:630d2f34d719
     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 "CSatNotifyPollIntervalTraces.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 "CSatNotifyPollInterval.h" // Tsy class header
    31 #include "CSatNotifyPollInterval.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 
    42 CSatNotifyPollInterval* CSatNotifyPollInterval::NewL
    47 CSatNotifyPollInterval* CSatNotifyPollInterval::NewL
    43         ( 
    48         ( 
    44         CSatNotificationsTsy* aNotificationsTsy 
    49         CSatNotificationsTsy* aNotificationsTsy 
    45         )
    50         )
    46     {
    51     {
    47     TFLOGSTRING("CSAT: CSatNotifyPollInterval::NewL");
    52     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYPOLLINTERVAL_NEWL_1, "CSAT: CSatNotifyPollInterval::NewL");
    48    	CSatNotifyPollInterval* const satNotifyPollInterval = 
    53    	CSatNotifyPollInterval* const satNotifyPollInterval = 
    49         new ( ELeave ) CSatNotifyPollInterval( aNotificationsTsy );
    54         new ( ELeave ) CSatNotifyPollInterval( aNotificationsTsy );
    50     CleanupStack::PushL( satNotifyPollInterval );
    55     CleanupStack::PushL( satNotifyPollInterval );
    51     satNotifyPollInterval->ConstructL();
    56     satNotifyPollInterval->ConstructL();
    52     CleanupStack::Pop( satNotifyPollInterval );
    57     CleanupStack::Pop( satNotifyPollInterval );
    53     TFLOGSTRING("CSAT: CSatNotifyPollInterval::NewL, end of method");
    58     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYPOLLINTERVAL_NEWL_2, "CSAT: CSatNotifyPollInterval::NewL, end of method");
    54     return satNotifyPollInterval;
    59     return satNotifyPollInterval;
    55     }
    60     }
    56 
    61 
    57 // -----------------------------------------------------------------------------
    62 // -----------------------------------------------------------------------------
    58 // CSatNotifyPollInterval::~CSatNotifyPollInterval
    63 // CSatNotifyPollInterval::~CSatNotifyPollInterval
    62 CSatNotifyPollInterval::~CSatNotifyPollInterval
    67 CSatNotifyPollInterval::~CSatNotifyPollInterval
    63         ( 
    68         ( 
    64 		// None
    69 		// None
    65         )
    70         )
    66     {
    71     {
    67     TFLOGSTRING("CSAT: CSatNotifyPollInterval::~CSatNotifyPollInterval");
    72     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYPOLLINTERVAL_DTOR_1, "CSAT: CSatNotifyPollInterval::~CSatNotifyPollInterval");
    68     }
    73     }
    69     
    74     
    70 // -----------------------------------------------------------------------------
    75 // -----------------------------------------------------------------------------
    71 // CSatNotifyPollInterval::CSatNotifyPollInterval
    76 // CSatNotifyPollInterval::CSatNotifyPollInterval
    72 // Default C++ constructor
    77 // Default C++ constructor
    88 void CSatNotifyPollInterval::ConstructL
    93 void CSatNotifyPollInterval::ConstructL
    89         (
    94         (
    90         // None
    95         // None
    91         )
    96         )
    92     {
    97     {
    93     TFLOGSTRING("CSAT: CSatNotifyPollInterval::ConstructL");
    98     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYPOLLINTERVAL_CONSTRUCTL_1, "CSAT: CSatNotifyPollInterval::ConstructL");
    94     }
    99     }
    95     
   100     
    96 // -----------------------------------------------------------------------------
   101 // -----------------------------------------------------------------------------
    97 // CSatNotifyPollInterval::CompleteNotifyL
   102 // CSatNotifyPollInterval::CompleteNotifyL
    98 // This method completes an outstanding asynchronous 
   103 // This method completes an outstanding asynchronous 
   103         ( 
   108         ( 
   104         CSatDataPackage* aDataPackage,
   109         CSatDataPackage* aDataPackage,
   105         TInt /*aErrorCode*/  
   110         TInt /*aErrorCode*/  
   106         ) 
   111         ) 
   107     {
   112     {
   108     TFLOGSTRING("CSAT: CSatNotifyPollInterval::CompleteNotifyL");
   113     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYPOLLINTERVAL_COMPLETENOTIFYL_1, "CSAT: CSatNotifyPollInterval::CompleteNotifyL");
   109     TInt returnValue( KErrNone );
   114     TInt returnValue( KErrNone );
   110     TPtrC8* data;
   115     TPtrC8* data;
   111     aDataPackage->UnPackData( &data );
   116     aDataPackage->UnPackData( &data );
   112     // Get ber tlv 
   117     // Get ber tlv 
   113     CBerTlv berTlv;
   118     CBerTlv berTlv;
   165 	                    }
   170 	                    }
   166                     break;
   171                     break;
   167                     }
   172                     }
   168                 default:
   173                 default:
   169                 	{
   174                 	{
   170                  	TFLOGSTRING("CSAT: CSatNotifyPollInterval::\
   175                  	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYPOLLINTERVAL_COMPLETENOTIFYL_2, "CSAT: CSatNotifyPollInterval::CompleteNotifyL, Time unit unknown.");
   171                  	    CompleteNotifyL, Time unit unknown.");
       
   172 	        		returnValue = KErrNotFound;
   176 	        		returnValue = KErrNotFound;
   173                  	// Command data not understood
   177                  	// Command data not understood
   174                  	CreateTerminalRespL( pCmdNumber, 
   178                  	CreateTerminalRespL( pCmdNumber, 
   175                  	    RSat::KCmdDataNotUnderstood, 
   179                  	    RSat::KCmdDataNotUnderstood, 
   176                  	    RSat::KNoSpecificMeProblem, 0 );
   180                  	    RSat::KNoSpecificMeProblem, 0 );
   220         TUint8 aGeneralResult,     
   224         TUint8 aGeneralResult,     
   221         TUint8 aAdditionalInfo,   
   225         TUint8 aAdditionalInfo,   
   222         TUint8 aDcs               	
   226         TUint8 aDcs               	
   223 		)
   227 		)
   224     {
   228     {
   225     TFLOGSTRING("CSAT: CSatNotifyPollInterval::CreateTerminalRespL");   
   229     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYPOLLINTERVAL_CREATETERMINALRESPL_1, "CSAT: CSatNotifyPollInterval::CreateTerminalRespL");
   226     TTlv tlvSpecificData;
   230     TTlv tlvSpecificData;
   227     tlvSpecificData.AddTag( KTlvResultTag );     
   231     tlvSpecificData.AddTag( KTlvResultTag );     
   228     tlvSpecificData.AddByte( aGeneralResult );
   232     tlvSpecificData.AddByte( aGeneralResult );
   229     
   233     
   230     if ( !(iNotificationsTsy->CommandPerformedSuccessfully( 
   234     if ( !(iNotificationsTsy->CommandPerformedSuccessfully( 
   241                 {
   245                 {
   242                 break;
   246                 break;
   243                 }
   247                 }
   244             default:
   248             default:
   245                 {
   249                 {
   246                 TFLOGSTRING2("CSAT: CSatNotifyPollInterval::\
   250                 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYPOLLINTERVAL_CREATETERMINALRESPL_2, "CSAT: CSatNotifyPollInterval::CreateTerminalRespL, Additional Info: %d", aAdditionalInfo);
   247                     CreateTerminalRespL, Additional Info: %d", 
       
   248                     aAdditionalInfo);  
       
   249                 tlvSpecificData.AddByte( aAdditionalInfo );
   251                 tlvSpecificData.AddByte( aAdditionalInfo );
   250                 break;
   252                 break;
   251                 }
   253                 }
   252             }
   254             }
   253         }
   255         }