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