equal
deleted
inserted
replaced
550 __LOGLB( ELogServer, "-> Find Sync" ); |
550 __LOGLB( ELogServer, "-> Find Sync" ); |
551 |
551 |
552 // check that all queries are complete |
552 // check that all queries are complete |
553 QueriesCompleteL(); |
553 QueriesCompleteL(); |
554 |
554 |
555 TInt serializedCriteriaLength = aMsg.GetDesLength( EFindArgConditions ); |
555 const TInt serializedCriteriaLength = aMsg.GetDesLength( EFindArgConditions ); |
556 CMdCSerializationBuffer* serializedCriteriaBuffer = CMdCSerializationBuffer::NewLC( serializedCriteriaLength ); |
556 CMdCSerializationBuffer* serializedCriteriaBuffer = CMdCSerializationBuffer::NewLC( serializedCriteriaLength ); |
557 TPtr8 serializedCriteriaBufferPtr(serializedCriteriaBuffer->Buffer()); |
557 TPtr8 serializedCriteriaBufferPtr(serializedCriteriaBuffer->Buffer()); |
558 aMsg.ReadL( EFindArgConditions, serializedCriteriaBufferPtr ); |
558 aMsg.ReadL( EFindArgConditions, serializedCriteriaBufferPtr ); |
559 |
559 |
560 const TUint32 queryId = (TUint32)aMsg.Int0(); |
560 const TUint32 queryId = (TUint32)aMsg.Int0(); |
590 __LOGLB( ELogServer, "-> Find Async" ); |
590 __LOGLB( ELogServer, "-> Find Async" ); |
591 |
591 |
592 // check that all queries are complete |
592 // check that all queries are complete |
593 QueriesCompleteL(); |
593 QueriesCompleteL(); |
594 |
594 |
595 TInt serializedCriteriaLength = aMsg.GetDesLength( EFindArgConditions ); |
595 const TInt serializedCriteriaLength = aMsg.GetDesLength( EFindArgConditions ); |
596 CMdCSerializationBuffer* serializedCriteriaBuffer = CMdCSerializationBuffer::NewLC( serializedCriteriaLength ); |
596 CMdCSerializationBuffer* serializedCriteriaBuffer = CMdCSerializationBuffer::NewLC( serializedCriteriaLength ); |
597 TPtr8 serializedCriteriaBufferPtr(serializedCriteriaBuffer->Buffer()); |
597 TPtr8 serializedCriteriaBufferPtr(serializedCriteriaBuffer->Buffer()); |
598 aMsg.ReadL( EFindArgConditions, serializedCriteriaBufferPtr ); |
598 aMsg.ReadL( EFindArgConditions, serializedCriteriaBufferPtr ); |
599 |
599 |
600 const TUint32 queryId = (TUint32)aMsg.Int0(); |
600 const TUint32 queryId = (TUint32)aMsg.Int0(); |
905 // UpdateL |
905 // UpdateL |
906 // --------------------------------------------------------------------------- |
906 // --------------------------------------------------------------------------- |
907 // |
907 // |
908 void CMdSServerSession::UpdateL( const RMessage2& aMsg ) |
908 void CMdSServerSession::UpdateL( const RMessage2& aMsg ) |
909 { |
909 { |
910 TInt successfulLength = aMsg.GetDesLengthL( 1 ); |
910 const TInt successfulLength = aMsg.GetDesLengthL( 1 ); |
911 |
911 |
912 CMdCSerializationBuffer* buffer = CMdCSerializationBuffer::NewLC( aMsg, 0 ); |
912 CMdCSerializationBuffer* buffer = CMdCSerializationBuffer::NewLC( aMsg, 0 ); |
913 CMdCSerializationBuffer* successfullBuffer = CMdCSerializationBuffer::NewLC( successfulLength ); |
913 CMdCSerializationBuffer* successfullBuffer = CMdCSerializationBuffer::NewLC( successfulLength ); |
914 |
914 |
915 iServer.Manipulate().UpdateL( *buffer, *successfullBuffer ); |
915 iServer.Manipulate().UpdateL( *buffer, *successfullBuffer ); |
924 void CMdSServerSession::RegisterL( const RMessage2& aMsg ) |
924 void CMdSServerSession::RegisterL( const RMessage2& aMsg ) |
925 { |
925 { |
926 __LOG3( ELogServer, "-> Register %u for NS: %u Type: %d", |
926 __LOG3( ELogServer, "-> Register %u for NS: %u Type: %d", |
927 (TUint32)aMsg.Int0(), (TDefId)aMsg.Int3(), aMsg.Int1() ); |
927 (TUint32)aMsg.Int0(), (TDefId)aMsg.Int3(), aMsg.Int1() ); |
928 |
928 |
929 TInt length = aMsg.GetDesLength( 2 ); |
929 const TInt length = aMsg.GetDesLength( 2 ); |
930 CMdCSerializationBuffer* buffer = CMdCSerializationBuffer::NewLC( length ); |
930 CMdCSerializationBuffer* buffer = CMdCSerializationBuffer::NewLC( length ); |
931 TPtr8 bufferPtr( buffer->Buffer() ); |
931 TPtr8 bufferPtr( buffer->Buffer() ); |
932 aMsg.ReadL( 2, bufferPtr ); |
932 aMsg.ReadL( 2, bufferPtr ); |
933 |
933 |
934 iServer.Notifier().CreateEntryL( aMsg.Int0(), |
934 iServer.Notifier().CreateEntryL( aMsg.Int0(), |
980 // --------------------------------------------------------------------------- |
980 // --------------------------------------------------------------------------- |
981 // |
981 // |
982 void CMdSServerSession::UnregisterL( const RMessage2& aMsg ) |
982 void CMdSServerSession::UnregisterL( const RMessage2& aMsg ) |
983 { |
983 { |
984 __LOG1( ELogServer, "-> Unregister %d", aMsg.Int0() ); |
984 __LOG1( ELogServer, "-> Unregister %d", aMsg.Int0() ); |
985 TInt id = aMsg.Int0(); |
985 const TInt id = aMsg.Int0(); |
986 iServer.Notifier().RemoveEntryL(id); |
986 iServer.Notifier().RemoveEntryL(id); |
987 TInt count = iNotificationCache.Count(); |
987 TInt count = iNotificationCache.Count(); |
988 for(TInt i(count - 1); i >= 0; --i) |
988 for(TInt i(count - 1); i >= 0; --i) |
989 { |
989 { |
990 if(iNotificationCache[i]->iId == id) |
990 if(iNotificationCache[i]->iId == id) |