adaptationlayer/tsy/licenseetsy_dll/src/licenseetsy.cpp
changeset 9 8486d82aef45
parent 5 8ccc39f9d787
equal deleted inserted replaced
8:6295dc2169f3 9:8486d82aef45
     1 /*
     1 /*
     2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    17 
    17 
    18 
    18 
    19 
    19 
    20 //  INCLUDE FILES
    20 //  INCLUDE FILES
    21 #include "cmmmessagerouter.h"
    21 #include "cmmmessagerouter.h"
    22 // Temporarily removed for Bridge camp!
    22 #include "satmessaging.h"
    23 //#include "satmessaging.h"
       
    24 #include "licenseetsy.h"
    23 #include "licenseetsy.h"
    25 
    24 
    26 #include "tsylogger.h"
    25 #include "tsylogger.h"
    27 #include "OstTraceDefinitions.h"
    26 #include "OstTraceDefinitions.h"
    28 #ifdef OST_TRACE_COMPILER_IN_USE
    27 #ifdef OST_TRACE_COMPILER_IN_USE
    68         // none
    67         // none
    69         )
    68         )
    70     {
    69     {
    71     // none
    70     // none
    72 TFLOGSTRING("tsyfactory: CNokiaTSYFactory::CNokiaTSYFactory");
    71 TFLOGSTRING("tsyfactory: CNokiaTSYFactory::CNokiaTSYFactory");
    73 OstTrace0( TRACE_NORMAL, CNOKIATSYFACTORY_CNOKIATSYFACTORY, "CNokiaTSYFactory::CNokiaTSYFactory" );
    72 OstTrace0( TRACE_NORMAL,  CNOKIATSYFACTORY_CNOKIATSYFACTORY_TD, "CNokiaTSYFactory::CNokiaTSYFactory" );
    74 
    73 
    75     iSatMessaging = NULL;
    74     iSatMessaging = NULL;
    76     iMMessageRouter = NULL;
    75     iMMessageRouter = NULL;
    77     }
    76     }
    78 
    77 
    83 //
    82 //
    84 CNokiaTSYFactory::~CNokiaTSYFactory()
    83 CNokiaTSYFactory::~CNokiaTSYFactory()
    85     {
    84     {
    86         
    85         
    87 TFLOGSTRING("tsyfactory: CNokiaTSYFactory::~CNokiaTSYFactory");
    86 TFLOGSTRING("tsyfactory: CNokiaTSYFactory::~CNokiaTSYFactory");
    88 OstTrace0( TRACE_NORMAL, DUP1_CNOKIATSYFACTORY_CNOKIATSYFACTORY, "CNokiaTSYFactory::~CNokiaTSYFactory" );
    87 OstTrace0( TRACE_NORMAL,  DUP1_CNOKIATSYFACTORY_CNOKIATSYFACTORY_TD, "CNokiaTSYFactory::~CNokiaTSYFactory" );
    89 
    88 
    90     delete iMMessageRouter;
    89     delete iMMessageRouter;
    91     iMMessageRouter = NULL;
    90     iMMessageRouter = NULL;
    92 
    91 
    93     }
    92     }
    99 //
    98 //
   100 MLtsyFactoryBase::TCtsyInterfaceVersion CNokiaTSYFactory::Version()
    99 MLtsyFactoryBase::TCtsyInterfaceVersion CNokiaTSYFactory::Version()
   101     {
   100     {
   102         
   101         
   103 TFLOGSTRING("tsyfactory: MLtsyFactoryBase::TCtsyInterfaceVersion");
   102 TFLOGSTRING("tsyfactory: MLtsyFactoryBase::TCtsyInterfaceVersion");
   104 OstTrace0( TRACE_NORMAL, CNOKIATSYFACTORY_VERSION, "CNokiaTSYFactory::Version" );
   103 OstTrace0( TRACE_NORMAL,  CNOKIATSYFACTORY_VERSION_TD, "CNokiaTSYFactory::Version" );
   105     
   104     
   106     return EIfVersion1;
   105     return EIfVersion1;
   107     }
   106     }
   108 
   107 
   109 // -----------------------------------------------------------------------------
   108 // -----------------------------------------------------------------------------
   114 
   113 
   115 void CNokiaTSYFactory::Release()
   114 void CNokiaTSYFactory::Release()
   116     {
   115     {
   117         
   116         
   118 TFLOGSTRING("tsyfactory: CNokiaTSYFactory::Release");
   117 TFLOGSTRING("tsyfactory: CNokiaTSYFactory::Release");
   119 OstTrace0( TRACE_NORMAL, CNOKIATSYFACTORY_RELEASE, "CNokiaTSYFactory::Release" );
   118 OstTrace0( TRACE_NORMAL,  CNOKIATSYFACTORY_RELEASE_TD, "CNokiaTSYFactory::Release" );
   120 
   119 
   121     // Call destructor
   120     // Call destructor
   122     delete ( this );
   121     delete ( this );
   123     }
   122     }
   124 
   123 
   133     MmMessageManagerCallback& aMessageManager
   132     MmMessageManagerCallback& aMessageManager
   134     )
   133     )
   135     {
   134     {
   136         
   135         
   137 TFLOGSTRING("tsyfactory: CNokiaTSYFactory::GetMessageRouter");
   136 TFLOGSTRING("tsyfactory: CNokiaTSYFactory::GetMessageRouter");
   138 OstTrace0( TRACE_NORMAL, CNOKIATSYFACTORY_GETMESSAGEROUTER, "CNokiaTSYFactory::GetMessageRouter" );
   137 OstTrace0( TRACE_NORMAL,  CNOKIATSYFACTORY_GETMESSAGEROUTER_TD, "CNokiaTSYFactory::GetMessageRouter" );
   139 
   138 
   140     if ( NULL == iMMessageRouter )
   139     if ( NULL == iMMessageRouter )
   141         {
   140         {
   142         iMMessageRouter = CMmMessageRouter::NewL( &aMessageManager );
   141         iMMessageRouter = CMmMessageRouter::NewL( &aMessageManager );
   143         }
   142         }
   153 
   152 
   154 CTsySatMessagingBase* CNokiaTSYFactory::GetSatMessagingService( )
   153 CTsySatMessagingBase* CNokiaTSYFactory::GetSatMessagingService( )
   155     {
   154     {
   156         
   155         
   157 TFLOGSTRING("tsyfactory: CNokiaTSYFactory::GetSatMessagingService");
   156 TFLOGSTRING("tsyfactory: CNokiaTSYFactory::GetSatMessagingService");
   158 OstTrace0( TRACE_NORMAL, CNOKIATSYFACTORY_GETSATMESSAGINGSERVICE, "CNokiaTSYFactory::GetSatMessagingService" );
   157 OstTrace0( TRACE_NORMAL,  CNOKIATSYFACTORY_GETSATMESSAGINGSERVICE_TD, "CNokiaTSYFactory::GetSatMessagingService" );
   159 
   158 
   160     if ( NULL == iSatMessaging )
   159     if ( NULL == iSatMessaging )
   161         {
   160         {
   162 		// Temporarily removed for Bridge camp!
   161         iSatMessaging = CTsySatMessaging::NewL( iMMessageRouter );
   163         //iSatMessaging = CTsySatMessaging::NewL( iMMessageRouter );
   162         iMMessageRouter->iSatMessaging = iSatMessaging;
   164         //iMMessageRouter->iSatMessaging = iSatMessaging;
       
   165         }
   163         }
   166 
   164 
   167 
   165 
   168     return iSatMessaging;
   166     return iSatMessaging;
   169     }
   167     }
   179     MCtsySatService& /* aSatMessagingService */
   177     MCtsySatService& /* aSatMessagingService */
   180     )
   178     )
   181     {
   179     {
   182         
   180         
   183 TFLOGSTRING("tsyfactory: CNokiaTSYFactory::GetSatMessagingService");
   181 TFLOGSTRING("tsyfactory: CNokiaTSYFactory::GetSatMessagingService");
   184 OstTrace0( TRACE_NORMAL, DUP1_CNOKIATSYFACTORY_GETSATMESSAGINGSERVICE, "CNokiaTSYFactory::GetSatMessagingService" );
   182 OstTrace0( TRACE_NORMAL,  DUP1_CNOKIATSYFACTORY_GETSATMESSAGINGSERVICE_TD, "CNokiaTSYFactory::GetSatMessagingService" );
   185 
   183 
   186 
   184 
   187     if ( NULL == iSatMessaging )
   185     if ( NULL == iSatMessaging )
   188         {
   186         {
   189 		// Temporarily removed for Bridge camp!
   187         iSatMessaging = CTsySatMessaging::NewL( iMMessageRouter );
   190         // iSatMessaging = CTsySatMessaging::NewL( iMMessageRouter );
   188         iMMessageRouter->iSatMessaging = iSatMessaging;
   191         // iMMessageRouter->iSatMessaging = iSatMessaging;
       
   192         }
   189         }
   193 
   190 
   194 
   191 
   195     return iSatMessaging;
   192     return iSatMessaging;
   196     }
   193     }
   207         (
   204         (
   208         )
   205         )
   209     {
   206     {
   210     
   207     
   211 TFLOGSTRING("tsyfactory: LtsyFactoryL / Created new CNokiaTSYFactory object");
   208 TFLOGSTRING("tsyfactory: LtsyFactoryL / Created new CNokiaTSYFactory object");
   212 OstTrace0( TRACE_NORMAL, _LTSYFACTORYL, "::LtsyFactoryL" );
   209 OstTrace0( TRACE_NORMAL,  _LTSYFACTORYL_TD, "::LtsyFactoryL" );
   213 
   210 
   214     MLtsyFactoryBase* ltsyFactory = NULL;
   211     MLtsyFactoryBase* ltsyFactory = NULL;
   215 
   212 
   216     ltsyFactory = new ( ELeave ) CNokiaTSYFactory();
   213     ltsyFactory = new ( ELeave ) CNokiaTSYFactory();
   217 
   214