traceservices/tracefw/ulogger/src/uloggerserver/uloggersrvsession.cpp
branchRCL_3
changeset 24 cc28652e0254
parent 23 26645d81f48d
equal deleted inserted replaced
23:26645d81f48d 24:cc28652e0254
   139 				for(TInt i=0;i<array->Count();++i)
   139 				for(TInt i=0;i<array->Count();++i)
   140 					{
   140 					{
   141 					filterArray.Append((TUint32)array->At(i));
   141 					filterArray.Append((TUint32)array->At(i));
   142 					}
   142 					}
   143 			
   143 			
   144 				error = iServer.SetActiveFilterL(filterArray, EPrimaryFilter);
   144 				error = iServer.SetActiveFilter(filterArray, EPrimaryFilter);
   145 
   145 
   146 				CleanupStack::PopAndDestroy(2,desData); //array, desData
   146 				CleanupStack::PopAndDestroy(2,desData); //array, desData
   147 				filterArray.Close();
   147 				filterArray.Close();
   148 				}
   148 				}
   149 			else
   149 			else
   216 			
   216 			
   217 				RArray<TUint32> filterArray;
   217 				RArray<TUint32> filterArray;
   218 				TUint32 tmp=1;
   218 				TUint32 tmp=1;
   219 				InternalizeFromBufL(readPtr, filterArray, tmp);
   219 				InternalizeFromBufL(readPtr, filterArray, tmp);
   220 					
   220 					
   221 				error = iServer.SetActiveFilterL(filterArray,ESecondaryFilter);
   221 				error = iServer.SetActiveFilter(filterArray,ESecondaryFilter);
   222 
   222 
   223 				CleanupStack::PopAndDestroy(); //desData
   223 				CleanupStack::PopAndDestroy(); //desData
   224 				filterArray.Close();
   224 				filterArray.Close();
   225 				}
   225 				}
   226 			else
   226 			else
   283 
   283 
   284 		case EGetSecondaryFiltering:
   284 		case EGetSecondaryFiltering:
   285 			{
   285 			{
   286 			TBool enabled = EFalse;
   286 			TBool enabled = EFalse;
   287 			iServer.GetSecondaryFiltering(enabled);
   287 			iServer.GetSecondaryFiltering(enabled);
   288 			SendIntegerL(aMessage, (TInt)enabled);
   288 			SendInteger(aMessage, (TInt)enabled);
   289 			}
   289 			}
   290 			break;
   290 			break;
   291 
   291 
   292 		case ESetActivePlugin:
   292 		case ESetActivePlugin:
   293 			{
   293 			{
   450 
   450 
   451 		case EGetInputPlugins:
   451 		case EGetInputPlugins:
   452 			{
   452 			{
   453 			//Get the installed plugins	
   453 			//Get the installed plugins	
   454 			RArray<TPtrC8> tmpArray;
   454 			RArray<TPtrC8> tmpArray;
   455 			error = iServer.GetInstalledInputPluginsL(tmpArray);
   455 			error = iServer.GetInstalledInputPlugins(tmpArray);
   456 			if(!error)
   456 			if(!error)
   457 				{
   457 				{
   458 			//<rewrite array and add separator to each record>
   458 			//<rewrite array and add separator to each record>
   459 			_LIT8(KFormatString,"%S;");//';' is a separator
   459 			_LIT8(KFormatString,"%S;");//';' is a separator
   460 			//count total_length + separators
   460 			//count total_length + separators
   545 			break;
   545 			break;
   546 		case EResizeTraceBuffer:
   546 		case EResizeTraceBuffer:
   547 			{
   547 			{
   548 			//Resize buffer size
   548 			//Resize buffer size
   549 			TInt bufferSize = aMessage.Int0();
   549 			TInt bufferSize = aMessage.Int0();
   550 			error = iServer.SetBufferSizeL(bufferSize);
   550 			error = iServer.SetBufferSize(bufferSize);
   551 			}
   551 			}
   552 			break;
   552 			break;
   553 
   553 
   554 		case EGetTraceBufferSize:
   554 		case EGetTraceBufferSize:
   555 			{
   555 			{
   556 			//Get buffer size
   556 			//Get buffer size
   557 			TInt bufferSize = 0;
   557 			TInt bufferSize = 0;
   558 			error = iServer.GetBufandDataNotifyValuesL(KBuffer,bufferSize);
   558 			error = iServer.GetBufandDataNotifyValuesL(KBuffer,bufferSize);
   559 			SendIntegerL(aMessage, bufferSize);
   559 			SendInteger(aMessage, bufferSize);
   560 			}
   560 			}
   561 			break;
   561 			break;
   562 
   562 
   563 		case ESetBufferMode:
   563 		case ESetBufferMode:
   564 			{
   564 			{
   575 		case EGetBufferMode:
   575 		case EGetBufferMode:
   576 			{
   576 			{
   577 			//Get buffer size
   577 			//Get buffer size
   578 			TInt bufferMode = 3;
   578 			TInt bufferMode = 3;
   579 			error = iServer.GetBufandDataNotifyValuesL(KBufferMode,bufferMode);
   579 			error = iServer.GetBufandDataNotifyValuesL(KBufferMode,bufferMode);
   580 			SendIntegerL(aMessage, bufferMode);
   580 			SendInteger(aMessage, bufferMode);
   581 			}
   581 			}
   582 			break;
   582 			break;
   583 
   583 
   584 		case ESetDataNotificationSize:
   584 		case ESetDataNotificationSize:
   585 			{
   585 			{
   586 			//Set data notification size
   586 			//Set data notification size
   587 			TInt dataNotification = aMessage.Int0();
   587 			TInt dataNotification = aMessage.Int0();
   588 			error = iServer.SetDataNotificationSizeL(dataNotification);
   588 			error = iServer.SetDataNotificationSize(dataNotification);
   589 			}
   589 			}
   590 			break;
   590 			break;
   591 
   591 
   592 		case EGetDataNotificationSize:
   592 		case EGetDataNotificationSize:
   593 			{
   593 			{
   594 			//Get Data Notification size
   594 			//Get Data Notification size
   595 			TInt dataNotification = 0;
   595 			TInt dataNotification = 0;
   596 			error = iServer.GetBufandDataNotifyValuesL(KDataNotification,dataNotification);
   596 			error = iServer.GetBufandDataNotifyValuesL(KDataNotification,dataNotification);
   597 			SendIntegerL(aMessage, dataNotification);
   597 			SendInteger(aMessage, dataNotification);
   598 			}
   598 			}
   599 			break;
   599 			break;
   600 
   600 
   601 		default:
   601 		default:
   602 			{
   602 			{
   605 			break;
   605 			break;
   606 		}
   606 		}
   607     aMessage.Complete(error);
   607     aMessage.Complete(error);
   608 	}
   608 	}
   609 
   609 
   610 void CULoggerSession::SendIntegerL(const RMessage2& aMessage, TUint32 aInt)
   610 void CULoggerSession::SendInteger(const RMessage2& aMessage, TUint32 aInt)
   611 	{
   611 	{
   612 	HBufC8* size = HBufC8::NewLC(32);
   612 	HBufC8* size = HBufC8::NewLC(32);
   613 	size->Des().Num(aInt);
   613 	size->Des().Num(aInt);
   614 	TPtr8 ptr(size->Des());
   614 	TPtr8 ptr(size->Des());
   615 	aMessage.Write(0,ptr);
   615 	aMessage.Write(0,ptr);