TBool CT_DataRGavdp::ConvertSEIDs(TDesC &aSEIDsStr, RArray<TUint>& aSEIDs) { TBool ret = ETrue; TLex lex(aSEIDsStr); TInt tempSEID; if (lex.Val(tempSEID) == KErrNone) { aSEIDs.Append(tempSEID); } else { TInt location = aSEIDsStr.Match(_L("*,*")); if( location != KErrNotFound ) { //Converting Left part of the data TPtrC tempStr = aSEIDsStr.Left(location); ret = ConvertSEIDs(tempStr, aSEIDs); if(ret) { //Converting right data can be with another "," tempStr.Set(aSEIDsStr.Mid(location + 1)); ret = ConvertSEIDs(tempStr, aSEIDs); } } else { ret = EFalse; } } return ret; }
TBool CT_DataRGavdp::ConvertEvents(TDesC &aEventStr, RArray<TUint>& aEvent) { TBool ret = ETrue; if (aEventStr == KEGAVDP_NoneEvent) { aEvent.Append(EGAVDP_NoneEvent); } else if (aEventStr == KEGAVDP_ConnectConfirm) { aEvent.Append(EGAVDP_ConnectConfirm); } else if (aEventStr == KEGAVDP_SEPDiscovered) { aEvent.Append(EGAVDP_SEPDiscovered); } else if (aEventStr == KEGAVDP_SEPDiscoveryComplete) { aEvent.Append(EGAVDP_SEPDiscoveryComplete); } else if (aEventStr == KEGAVDP_SEPCapability) { aEvent.Append(EGAVDP_SEPCapability); } else if (aEventStr == KEGAVDP_SEPCapabilityComplete) { aEvent.Append(EGAVDP_SEPCapabilityComplete); } else if (aEventStr == KEGAVDP_AbortStreamConfirm) { aEvent.Append(EGAVDP_AbortStreamConfirm); } else if (aEventStr == KEGAVDP_StartStreamsConfirm) { aEvent.Append(EGAVDP_StartStreamsConfirm); } else if (aEventStr == KEGAVDP_SuspendStreamsConfirm) { aEvent.Append(EGAVDP_SuspendStreamsConfirm); } else if (aEventStr == KEGAVDP_SecurityControlConfirm) { aEvent.Append(EGAVDP_SecurityControlConfirm); } else if (aEventStr == KEGAVDP_ConfigurationConfirm) { aEvent.Append(EGAVDP_ConfigurationConfirm); } else if (aEventStr == KEGAVDP_ConfigurationStartIndication) { aEvent.Append(EGAVDP_ConfigurationStartIndication); } else if (aEventStr == KEGAVDP_ConfigurationIndication) { aEvent.Append(EGAVDP_ConfigurationIndication); } else if (aEventStr == KEGAVDP_ConfigurationEndIndication) { aEvent.Append(EGAVDP_ConfigurationEndIndication); } else if (aEventStr == KEGAVDP_StartIndication) { aEvent.Append(EGAVDP_StartIndication); } else if (aEventStr == KEGAVDP_SuspendIndication) { aEvent.Append(EGAVDP_SuspendIndication); } else if (aEventStr == KEGAVDP_SecurityControlIndication) { aEvent.Append(EGAVDP_SecurityControlIndication); } else if (aEventStr == KEGAVDP_AbortIndication) { aEvent.Append(EGAVDP_AbortIndication); } else if (aEventStr == KEGAVDP_ReleaseIndication) { aEvent.Append(EGAVDP_ReleaseIndication); } else if (aEventStr == KEGAVDP_BearerReady) { aEvent.Append(EGAVDP_BearerReady); } else if (aEventStr == KEGAVDP_Error) { aEvent.Append(EGAVDP_Error); } else { TInt location = aEventStr.Match(_L("*|*")); if( location != KErrNotFound ) { //Converting Left part of the data TPtrC tempStr = aEventStr.Left(location); ret = ConvertEvents(tempStr, aEvent); if(ret) { //Converting right data can be with another "|" tempStr.Set(aEventStr.Mid(location + 1)); ret = ConvertEvents(tempStr, aEvent); } } else { ret = EFalse; } } return ret; }