Ejemplo n.º 1
0
// STRING WITH INDICES
void ConfigManager::SetStringI(const char *name, BString *value, int32 index) {
	if (index+1>CountStrings(name))
		configMsg->AddString(name, *value);
	else
		configMsg->ReplaceString(name, index, *value);
	
}
Ejemplo n.º 2
0
HX_RESULT Parse(IUnknown* pContext, ULONG32 ulVersion, IHXBuffer* pSDP)
{
    SDPMediaDescParser parser(ulVersion);

    HX_RESULT res = parser.Init(pContext);

    if (HXR_OK == res)
    {
	UINT16 nValues = 0;
	IHXValues** ppValues = 0;

	res = parser.Parse(pSDP, nValues, ppValues);

	
	printf("Init %lu\n", ulVersion);
	
	printf("Parse 0x%08x %lu \"", res, nValues);

	PrintString(pSDP);

	printf ("\"\n");

	for (UINT16 i = 0; i < nValues; i++)
	{
	    IHXValues* pHdr = ppValues[i];

	    printf ("IntCount %u %lu\n", i, CountULONG32(pHdr));
	    OutputULONG32Tests(i, pHdr);

	    printf ("StringCount %u %lu\n", i, CountStrings(pHdr));
	    OutputStrings(i, pHdr);

	    printf ("BufferCount %u %lu\n", i, CountBuffers(pHdr));
	    OutputBuffers(i, pHdr);
	}
    }

    return res;
}