cmmanager/cmmgr/cmmserver/src/cmmconnmethodstruct.cpp
changeset 40 c5b848e6c7d1
parent 30 8dde790cab74
child 44 a0c4ceac30d0
equal deleted inserted replaced
34:3b0cec605979 40:c5b848e6c7d1
    32 // ---------------------------------------------------------------------------
    32 // ---------------------------------------------------------------------------
    33 // Two phased construction.
    33 // Two phased construction.
    34 // ---------------------------------------------------------------------------
    34 // ---------------------------------------------------------------------------
    35 //
    35 //
    36 CCmmConnMethodStruct* CCmmConnMethodStruct::NewL(
    36 CCmmConnMethodStruct* CCmmConnMethodStruct::NewL(
    37         const TUint32& aConnMethodId )
    37         const TUint32 aConnMethodId )
    38     {
    38     {
    39     OstTraceFunctionEntry0( CCMMCONNMETHODSTRUCT_NEWL_ENTRY );
    39     OstTraceFunctionEntry0( CCMMCONNMETHODSTRUCT_NEWL_ENTRY );
    40 
    40 
    41     CCmmConnMethodStruct* self = CCmmConnMethodStruct::NewLC( aConnMethodId );
    41     CCmmConnMethodStruct* self = CCmmConnMethodStruct::NewLC( aConnMethodId );
    42     CleanupStack::Pop( self );
    42     CleanupStack::Pop( self );
    48 // ---------------------------------------------------------------------------
    48 // ---------------------------------------------------------------------------
    49 // Two phased construction.
    49 // Two phased construction.
    50 // ---------------------------------------------------------------------------
    50 // ---------------------------------------------------------------------------
    51 //
    51 //
    52 CCmmConnMethodStruct* CCmmConnMethodStruct::NewLC(
    52 CCmmConnMethodStruct* CCmmConnMethodStruct::NewLC(
    53         const TUint32& aConnMethodId )
    53         const TUint32 aConnMethodId )
    54     {
    54     {
    55     OstTraceFunctionEntry0( CCMMCONNMETHODSTRUCT_NEWLC_ENTRY );
    55     OstTraceFunctionEntry0( CCMMCONNMETHODSTRUCT_NEWLC_ENTRY );
    56 
    56 
    57     CCmmConnMethodStruct* self = new( ELeave ) CCmmConnMethodStruct( aConnMethodId );
    57     CCmmConnMethodStruct* self = new( ELeave ) CCmmConnMethodStruct( aConnMethodId );
    58     CleanupStack::PushL( self );
    58     CleanupStack::PushL( self );
   136 
   136 
   137 // ---------------------------------------------------------------------------
   137 // ---------------------------------------------------------------------------
   138 // Set the connection method ID.
   138 // Set the connection method ID.
   139 // ---------------------------------------------------------------------------
   139 // ---------------------------------------------------------------------------
   140 //
   140 //
   141 void CCmmConnMethodStruct::SetId( const TUint32& aConnMethodId )
   141 void CCmmConnMethodStruct::SetId( const TUint32 aConnMethodId )
   142     {
   142     {
   143     iConnMethodId = aConnMethodId;
   143     iConnMethodId = aConnMethodId;
   144     }
   144     }
   145 
   145 
   146 // ---------------------------------------------------------------------------
   146 // ---------------------------------------------------------------------------
   216 // ---------------------------------------------------------------------------
   216 // ---------------------------------------------------------------------------
   217 // Decrease the reference counter by one. Return the remaining number of
   217 // Decrease the reference counter by one. Return the remaining number of
   218 // references.
   218 // references.
   219 // ---------------------------------------------------------------------------
   219 // ---------------------------------------------------------------------------
   220 //
   220 //
   221 TInt CCmmConnMethodStruct::SessionInstanceClosed()
   221 TInt CCmmConnMethodStruct::ConnMethodInstanceClosed()
   222     {
   222     {
   223     OstTraceFunctionEntry0( CCMMCONNMETHODSTRUCT_SESSIONINSTANCECLOSED_ENTRY );
   223     OstTraceFunctionEntry0( CCMMCONNMETHODSTRUCT_SESSIONINSTANCECLOSED_ENTRY );
   224 
   224 
   225     iReferenceCounter--;
   225     iReferenceCounter--;
   226     if ( iReferenceCounter < 0 )
   226     if ( iReferenceCounter < 0 )
   285 // Called after this connection method has been deleted and database
   285 // Called after this connection method has been deleted and database
   286 // transaction has completed successfully. Sets the internal state of this
   286 // transaction has completed successfully. Sets the internal state of this
   287 // connection method structure to reflect the new deleted state.
   287 // connection method structure to reflect the new deleted state.
   288 // ---------------------------------------------------------------------------
   288 // ---------------------------------------------------------------------------
   289 //
   289 //
   290 void CCmmConnMethodStruct::DeleteSuccessful( const TUint32& aNewSecondaryId )
   290 void CCmmConnMethodStruct::DeleteSuccessful( const TUint32 aNewSecondaryId )
   291     {
   291     {
   292     OstTraceFunctionEntry0( CCMMCONNMETHODSTRUCT_DELETESUCCESSFUL_ENTRY );
   292     OstTraceFunctionEntry0( CCMMCONNMETHODSTRUCT_DELETESUCCESSFUL_ENTRY );
   293 
   293 
   294     iConnMethodId = aNewSecondaryId;
   294     iConnMethodId = aNewSecondaryId;
   295     iStatus = ( ECmmConnMethodStatusNotSaved );
   295     iStatus = ( ECmmConnMethodStatusNotSaved );