cmmanager/cmmgr/cmmserver/src/cmmconnmethodstruct.cpp
changeset 27 489cf6208544
parent 20 9c97ad6591ae
child 40 c5b848e6c7d1
equal deleted inserted replaced
23:7ec726f93df1 27:489cf6208544
   170     {
   170     {
   171     iStatus = aStatus;
   171     iStatus = aStatus;
   172     }
   172     }
   173 
   173 
   174 // ---------------------------------------------------------------------------
   174 // ---------------------------------------------------------------------------
   175 // TODO
   175 // Refresh the connection method data in this cache side object to be in synch
   176 //
   176 // with the database and copy that data back to the session side connection
   177 // Refresh the relevant connection method data in cache side object to be in
   177 // method instance given as parameter.
   178 // synch with database and copy that data back to this session side connection
       
   179 // method object.
       
   180 // ---------------------------------------------------------------------------
   178 // ---------------------------------------------------------------------------
   181 //
   179 //
   182 void CCmmConnMethodStruct::RefreshConnMethodInstanceL(
   180 void CCmmConnMethodStruct::RefreshConnMethodInstanceL(
   183         CCmmConnMethodInstance& aConnMethodInstance )
   181         CCmmConnMethodInstance& aConnMethodInstance )
   184     {
   182     {
   234     OstTraceFunctionExit0( CCMMCONNMETHODSTRUCT_SESSIONINSTANCECLOSED_EXIT );
   232     OstTraceFunctionExit0( CCMMCONNMETHODSTRUCT_SESSIONINSTANCECLOSED_EXIT );
   235     return iReferenceCounter;
   233     return iReferenceCounter;
   236     }
   234     }
   237 
   235 
   238 // ---------------------------------------------------------------------------
   236 // ---------------------------------------------------------------------------
   239 // Set the connection method plugin. Updates status and sets reference
   237 // Set the connection method plugin pointer, bearer type and status.
   240 // counter to 1.
       
   241 // ---------------------------------------------------------------------------
   238 // ---------------------------------------------------------------------------
   242 //
   239 //
   243 void CCmmConnMethodStruct::SetPlugin(
   240 void CCmmConnMethodStruct::SetPlugin(
   244         CCmPluginBaseEng* aPlugin,
   241         CCmPluginBaseEng* aPlugin,
   245         TUint32 aBearerType,
   242         TUint32 aBearerType,
   249 
   246 
   250     // Only check reference counter, it is incremented by session side instance
   247     // Only check reference counter, it is incremented by session side instance
   251     // when data is copied into it.
   248     // when data is copied into it.
   252     if ( iReferenceCounter != 0 )
   249     if ( iReferenceCounter != 0 )
   253         {
   250         {
   254         ASSERT( 0 ); // Error.
   251         ASSERT( 0 ); // Error, wrong internal status.
   255         }
   252         }
   256 
   253 
   257     iConnMethodPlugin = aPlugin;
   254     iConnMethodPlugin = aPlugin;
   258     iBearerType = aBearerType;
   255     iBearerType = aBearerType;
   259 
   256 
   260     switch ( aStatus ) //TODO, add missing status
   257     switch ( aStatus )
   261         {
   258         {
   262         // Fallthrough intended
   259         // Fallthrough intended
   263         case ECmmConnMethodStatusNotSaved:
   260         case ECmmConnMethodStatusNotSaved:
   264         case ECmmConnMethodStatusValid:
   261         case ECmmConnMethodStatusValid:
   265             iStatus = aStatus;
   262             iStatus = aStatus;
   266             break;
   263             break;
   267         case ECmmConnMethodStatusChanged:
   264         case ECmmConnMethodStatusChanged:
       
   265         case ECmmConnMethodStatusToBeDeleted:
   268         default:
   266         default:
   269             iStatus = ECmmConnMethodStatusChanged;
   267             iStatus = ECmmConnMethodStatusChanged;
   270             ASSERT( 0 ); // Error, invalid status.
   268             ASSERT( 0 ); // Error, invalid status as argument.
   271             break;
   269             break;
   272         }
   270         }
   273 
   271 
   274     OstTraceFunctionExit0( CCMMCONNMETHODSTRUCT_SETPLUGIN_EXIT );
   272     OstTraceFunctionExit0( CCMMCONNMETHODSTRUCT_SETPLUGIN_EXIT );
   275     }
   273     }