static void DumpConstants(const Proto* f, DumpState* D)
{
 int i,n;
 DumpInt(n=f->sizek,D);
 for (i=0; i<n; i++)
 {
  const TObject* o=&f->k[i];
  DumpByte(ttype(o),D);
  switch (ttype(o))
  {
   case LUA_TNUMBER:
	DumpNumber(nvalue(o),D);
	break;
   case LUA_TSTRING:
	DumpString(tsvalue(o),D);
	break;
   case LUA_TNIL:
	break;
   default:
	lua_assert(0);			/* cannot happen */
	break;
  }
 }
 DumpInt(n=f->sizep,D);
 for (i=0; i<n; i++) DumpFunction(f->p[i],f->source,D);
}
Beispiel #2
0
GF_Err gf_ipmpx_dump_KeyData(GF_IPMPX_Data *_p, FILE *trace, u32 indent, Bool XMTDump)
{
	GF_IPMPX_KeyData*p = (GF_IPMPX_KeyData*)_p;

	StartElement(trace, "IPMP_KeyData", indent, XMTDump);
	indent++;

	DumpBool(trace, "hasStartDTS", (p->flags & 1) ? 1 : 0, indent, XMTDump);
	DumpBool(trace, "hasStartPacketID", (p->flags & 2) ? 1 : 0, indent, XMTDump);
	DumpBool(trace, "hasEndDTS", (p->flags & 4) ? 1 : 0, indent, XMTDump);
	DumpBool(trace, "hasEndPacketID", (p->flags & 8) ? 1 : 0, indent, XMTDump);

	if (p->flags & 1) DumpLargeInt(trace, "startDTS", p->startDTS, indent, XMTDump);
	if (p->flags & 2) DumpInt(trace, "startPacketID", p->startPacketID, indent, XMTDump);
	if (p->flags & 4) DumpLargeInt(trace, "expireDTS", p->expireDTS, indent, XMTDump);
	if (p->flags & 8) DumpInt(trace, "expirePacketID", p->expirePacketID, indent, XMTDump);

	EndAttributes(trace, XMTDump, GF_TRUE);
	gf_ipmpx_dump_BaseData(_p, trace, indent, XMTDump);
	gf_ipmpx_dump_ByteArray(p->keyBody, "keyBody", trace, indent, XMTDump);
	gf_ipmpx_dump_ByteArray(p->OpaqueData, "OpaqueData", trace, indent, XMTDump);

	indent--;
	EndElement(trace, "IPMP_KeyData", indent, XMTDump);
	return GF_OK;
}
Beispiel #3
0
static void DumpConstants(const Proto* f, DumpState* D)
{
    int i,n=f->sizek;
    DumpInt(n,D);
    for (i=0; i<n; i++)
    {
        const TValue* o=&f->k[i];
        DumpChar(ttype(o),D);
        switch (ttype(o))
        {
        case LUA_TNIL:
            break;
        case LUA_TBOOLEAN:
            DumpChar(bvalue(o),D);
            break;
        case LUA_TNUMBER:
            DumpNumber(nvalue(o),D);
            break;
        case LUA_TSTRING:
            DumpString(rawtsvalue(o),D);
            break;
        default:
            lua_assert(0);			/* cannot happen */
            break;
        }
    }
    n=f->sizep;
    DumpInt(n,D);
    for (i=0; i<n; i++) DumpFunction(f->p[i],f->source,D);
}
Beispiel #4
0
static void DumpCSymbols(DumpState *D)
{
	int i, cs_nr;
	cp_csymbol_state *cs_state;
	csymbol *cs, *cs_arr;

	cs_state = ctype_get_csym_state();
	cs_arr = cs_state->cs_arr;
	cs_nr = cs_state->cs_nr;

	if (!cs_arr || cs_nr == 0) {
		DumpInt(0, D);
		return;
	}

	/* dump number of csymbols */
	DumpInt(cs_nr, D);
	/* dump size of csymbol, for safty check in vm */
	DumpInt(sizeof(csymbol), D);
	for (i = 0; i < cs_nr; i++) {
		cs = &cs_arr[i];
		switch (cs->type) {
		case FFI_FUNC:
			DumpCSymbolFunc(cs, D);
			break;
		case FFI_STRUCT:
			DumpCSymbolStruct(cs, D);
			break;
		default:
			DumpBlock(cs, sizeof(csymbol), D);
			break;
		}
	}
}
Beispiel #5
0
static void DumpConstants(const ktap_proto *f, DumpState *D)
{
	int i, n = f->sizek;

	DumpInt(n, D);
	for (i = 0; i < n; i++) {
		const ktap_value* o=&f->k[i];
		DumpChar(ttypenv(o), D);
		switch (ttypenv(o)) {
		case KTAP_TNIL:
			break;
		case KTAP_TBOOLEAN:
			DumpChar(bvalue(o), D);
			break;
		case KTAP_TNUMBER:
			DumpNumber(nvalue(o), D);
			break;
		case KTAP_TSTRING:
			DumpString(rawtsvalue(o), D);
			break;
		default:
			printf("ktap: DumpConstants with unknown vaule type %d\n", ttypenv(o));
			ktap_assert(0);
		}
	}
	n = f->sizep;
	DumpInt(n, D);
	for (i = 0; i < n; i++)
		DumpFunction(f->p[i], D);
}
Beispiel #6
0
GF_Err gf_ipmpx_dump_ParametricDescription(GF_IPMPX_Data *_p, FILE *trace, u32 indent, Bool XMTDump)
{
	u32 i;
	GF_IPMPX_ParametricDescription*p = (GF_IPMPX_ParametricDescription*)_p;
	StartElement(trace, "IPMP_ParametricDescription", indent, XMTDump);
	indent++;
	DumpInt(trace, "majorVersion", p->majorVersion, indent, XMTDump);
	DumpInt(trace, "minorVersion", p->minorVersion, indent, XMTDump);
	EndAttributes(trace, XMTDump, GF_TRUE);
	gf_ipmpx_dump_BaseData(_p, trace, indent, XMTDump);
	gf_ipmpx_dump_ByteArray(p->descriptionComment, "descriptionComment", trace, indent, XMTDump);

	StartList(trace, "descriptions", indent, XMTDump);
	indent++;
	for (i=0; i<gf_list_count(p->descriptions); i++) {
		GF_IPMPX_ParametricDescriptionItem *it = (GF_IPMPX_ParametricDescriptionItem *)gf_list_get(p->descriptions, i);
		StartElement(trace, "IPMP_ParametricDescriptionItem", indent, XMTDump);
		indent++;
		EndAttributes(trace, XMTDump, GF_TRUE);
		gf_ipmpx_dump_ByteArray(it->main_class, "class", trace, indent, XMTDump);
		gf_ipmpx_dump_ByteArray(it->subClass, "subClass", trace, indent, XMTDump);
		gf_ipmpx_dump_ByteArray(it->typeData, "typeData", trace, indent, XMTDump);
		gf_ipmpx_dump_ByteArray(it->type, "type", trace, indent, XMTDump);
		gf_ipmpx_dump_ByteArray(it->addedData, "addedData", trace, indent, XMTDump);
		indent--;
		EndElement(trace, "IPMP_ParametricDescriptionItem", indent, XMTDump);
	}
	indent--;
	EndList(trace, "descriptions", indent, XMTDump);

	indent--;
	EndElement(trace, "IPMP_ParametricDescription", indent, XMTDump);
	return GF_OK;
}
Beispiel #7
0
static void DumpConstants(const killa_Proto* f, DumpState* D)
{
 int i,n=f->sizek;
 DumpInt(n,D);
 for (i=0; i<n; i++)
 {
  const killa_TValue* o=&f->k[i];
  DumpChar(killa_ttype(o),D);
  switch (killa_ttype(o))
  {
   case KILLA_TNULL:
	break;
   case KILLA_TBOOLEAN:
	DumpChar(killa_bvalue(o),D);
	break;
   case KILLA_TNUMBER:
	DumpNumber(killa_nvalue(o),D);
	break;
   case KILLA_TSTRING:
	DumpString(killa_rawtsvalue(o),D);
	break;
  }
 }
 n=f->sizep;
 DumpInt(n,D);
 for (i=0; i<n; i++) DumpFunction(f->p[i],D);
}
static void DumpLocals(const Proto* f, DumpState* D)
{
 int i,n=f->sizelocvars;
 DumpInt(n,D);
 for (i=0; i<n; i++)
 {
  DumpString(f->locvars[i].varname,D);
  DumpInt(f->locvars[i].startpc,D);
  DumpInt(f->locvars[i].endpc,D);
 }
}
Beispiel #9
0
static void DumpLocals(const Proto* tf, void* D)
{
	int i,n=tf->nlocvars;
	DumpInt(n,D);
	for (i=0; i<n; i++)
	{
		DumpString(tf->locvars[i].varname,D);
		DumpInt(tf->locvars[i].startpc,D);
		DumpInt(tf->locvars[i].endpc,D);
	}
}
Beispiel #10
0
static void DumpConstants(const Proto* tf, void* D)
{
	int i,n;
	DumpInt(n=tf->nkstr,D);
	for (i=0; i<n; i++)
		DumpString(tf->kstr[i],D);
	DumpInt(tf->nknum,D);
	DumpVector(tf->knum,tf->nknum,sizeof(*tf->knum),D);
	DumpInt(n=tf->nkproto,D);
	for (i=0; i<n; i++)
		DumpFunction(tf->kproto[i],D);
}
Beispiel #11
0
static void DumpFunction(const Proto* tf, void* D)
{
	DumpString(tf->source,D);
	DumpInt(tf->lineDefined,D);
	DumpInt(tf->numparams,D);
	DumpByte(tf->is_vararg,D);
	DumpInt(tf->maxstacksize,D);
	DumpLocals(tf,D);
	DumpLines(tf,D);
	DumpConstants(tf,D);
	DumpCode(tf,D);
}
Beispiel #12
0
static void DumpFunction(const ktap_proto *f, DumpState *D)
{
	DumpInt(f->linedefined, D);
	DumpInt(f->lastlinedefined, D);
	DumpChar(f->numparams, D);
	DumpChar(f->is_vararg, D);
	DumpChar(f->maxstacksize, D);
	DumpCode(f, D);
	DumpConstants(f, D);
	DumpUpvalues(f, D);
	DumpDebug(f, D);
}
Beispiel #13
0
static  void    DumpInsRange( conflict_node *conf ) {
/***************************************************/

    if( conf->ins_range.first != NULL ) {
        DumpLiteral( " Instruction " );
        DumpInt( conf->ins_range.first->id );
        if( conf->ins_range.first != conf->ins_range.last
         && conf->ins_range.last != NULL ) {
            DumpLiteral( " to Instruction " );
            DumpInt( conf->ins_range.last->id );
        }
    }
}
Beispiel #14
0
static void DumpFunction(const Proto* f, const TString* p, DumpState* D)
{
    DumpString((f->source==p || D->strip) ? NULL : f->source,D);
    DumpInt(f->linedefined,D);
    DumpInt(f->lastlinedefined,D);
    DumpChar(f->nups,D);
    DumpChar(f->numparams,D);
    DumpChar(f->is_vararg,D);
    DumpChar(f->maxstacksize,D);
    DumpCode(f,D);
    DumpConstants(f,D);
    DumpDebug(f,D);
}
Beispiel #15
0
GF_Err gf_ipmpx_dump_GetToolContext(GF_IPMPX_Data *_p, FILE *trace, u32 indent, Bool XMTDump)
{
	GF_IPMPX_GetToolContext*p = (GF_IPMPX_GetToolContext*)_p;
	StartElement(trace, "IPMP_GetToolContext", indent, XMTDump);
	indent++;
	DumpInt(trace, "scope", p->scope, indent, XMTDump);
	DumpInt(trace, "IPMP_DescriptorIDEx", p->IPMP_DescriptorIDEx, indent, XMTDump);
	EndAttributes(trace, XMTDump, GF_TRUE);
	gf_ipmpx_dump_BaseData(_p, trace, indent, XMTDump);
	indent--;
	EndElement(trace, "IPMP_GetToolContext", indent, XMTDump);
	return GF_OK;
}
Beispiel #16
0
GF_Err gf_ipmpx_dump_InitAuthentication(GF_IPMPX_Data *_p, FILE *trace, u32 indent, Bool XMTDump)
{
	GF_IPMPX_InitAuthentication*p = (GF_IPMPX_InitAuthentication*)_p;
	StartElement(trace, "IPMP_InitAuthentication", indent, XMTDump);
	indent++;
	DumpInt(trace, "Context", p->Context, indent, XMTDump);
	DumpInt(trace, "AuthType", p->AuthType, indent, XMTDump);
	EndAttributes(trace, XMTDump, GF_TRUE);
	gf_ipmpx_dump_BaseData(_p, trace, indent, XMTDump);
	indent--;
	EndElement(trace, "IPMP_InitAuthentication", indent, XMTDump);
	return GF_OK;
}
Beispiel #17
0
static  void    DumpScList( score_list *curr )
/********************************************/
{
    DumpLiteral( "    " );
    switch( curr->info.class ) {
    case SC_N_CONSTANT:
        DumpChar( '&' );
        DumpLong( curr->info.offset );
        break;
    case SC_N_TEMP:
        DumpChar( 't' );
        DumpInt( curr->info.symbol.t->v.id );
        DumpLiteral( " offset " );
        DumpLong( curr->info.offset );
        break;
    case SC_N_MEMORY:
        DumpXString( FEName( curr->info.symbol.p ) );
        DumpLiteral( " offset " );
        DumpLong( curr->info.offset );
        break;
    case SC_N_INDEXED:
        if( curr->info.base == NULL ) {
            ;
        } else if( curr->info.base->n.class == N_TEMP ) {
            DumpChar( 't' );
            DumpInt( curr->info.base->t.v.id );
            DumpChar( '+' );
        } else {
            DumpXString( FEName( curr->info.base->v.symbol ) );
            DumpChar( '+' );
        }
        DumpLong( curr->info.offset );
        DumpChar( '[' );
        DumpRegName( ScoreList[curr->info.index_reg]->reg );
        DumpChar( ']' );
        break;
    case SC_N_INITIAL:
        DumpLiteral( "INITIAL(" );
        DumpLong( curr->info.offset );
        DumpChar( ')' );
        break;
    case SC_N_VOLATILE:
        DumpLiteral( "VOLATILE - Oh No!" );
        break;
    case SC_N_ADDRESS:
        DumpLiteral( "ADDRESS(" );
        DumpOperand(curr->info.symbol.p);
        DumpChar( ')' );
        break;
    }
Beispiel #18
0
static void DumpFunction(const Proto* f, DumpState* D)
{
 int i;
 DumpInt(f->linedefined,D);
 DumpInt(f->lastlinedefined,D);
 DumpChar(f->numparams,D);
 DumpChar(f->is_vararg,D);
 DumpChar(f->maxstacksize,D);
 DumpInt(f->sizecode,D);
 for (i=0; i<f->sizecode; i++) DumpUInt(f->code[i],D);
 DumpConstants(f,D);
 DumpUpvalues(f,D);
 DumpDebug(f,D);
}
Beispiel #19
0
GF_Err gf_ipmpx_dump_ToolAPI_Config(GF_IPMPX_Data *_p, FILE *trace, u32 indent, Bool XMTDump)
{
	GF_IPMPX_ToolAPI_Config*p = (GF_IPMPX_ToolAPI_Config*)_p;
	StartElement(trace, "IPMP_ToolAPI_Config", indent, XMTDump);
	indent++;
	DumpInt(trace, "Instantiation_API_ID", p->Instantiation_API_ID, indent, XMTDump);
	DumpInt(trace, "Messaging_API_ID", p->Messaging_API_ID, indent, XMTDump);
	EndAttributes(trace, XMTDump, GF_TRUE);
	gf_ipmpx_dump_BaseData(_p, trace, indent, XMTDump);
	gf_ipmpx_dump_ByteArray(p->opaqueData, "opaqueData", trace, indent, XMTDump);
	indent--;
	EndElement(trace, "IPMP_ToolAPI_Config", indent, XMTDump);
	return GF_OK;
}
Beispiel #20
0
void gf_ipmpx_dump_BaseData(GF_IPMPX_Data *_p, FILE *trace, u32 indent, Bool XMTDump)
{
#if 0
	if (XMTDump) {
		StartElement(trace, "IPMP_BaseData", indent, XMTDump);
		DumpInt(trace, "dataID", _p->dataID, indent, 1);
		DumpInt(trace, "Version", _p->Version, indent, 1);
		EndLeafAttribute(trace, indent, XMTDump);
	} else {
		DumpInt(trace, "dataID", _p->dataID, indent, 0);
		DumpInt(trace, "Version", _p->Version, indent, 0);
	}
#endif
}
Beispiel #21
0
GF_Err gf_ipmpx_dump_GetToolContextResponse(GF_IPMPX_Data *_p, FILE *trace, u32 indent, Bool XMTDump)
{
	GF_IPMPX_GetToolContextResponse*p = (GF_IPMPX_GetToolContextResponse*)_p;
	StartElement(trace, "IPMP_GetToolContextResponse", indent, XMTDump);
	indent++;
	DumpInt(trace, "OD_ID", p->OD_ID, indent, XMTDump);
	DumpInt(trace, "ESD_ID", p->ESD_ID, indent, XMTDump);
	DumpInt(trace, "IPMP_ToolContextID", p->IPMP_ToolContextID, indent, XMTDump);
	EndAttributes(trace, XMTDump, GF_TRUE);
	gf_ipmpx_dump_BaseData(_p, trace, indent, XMTDump);
	indent--;
	EndElement(trace, "IPMP_GetToolContextResponse", indent, XMTDump);
	return GF_OK;
}
Beispiel #22
0
GF_Err gf_ipmpx_dump_NotifyToolEvent(GF_IPMPX_Data *_p, FILE *trace, u32 indent, Bool XMTDump)
{
	GF_IPMPX_NotifyToolEvent*p = (GF_IPMPX_NotifyToolEvent*)_p;
	StartElement(trace, "IPMP_NotifyToolEvent", indent, XMTDump);
	indent++;
	DumpInt(trace, "OD_ID", p->OD_ID, indent, XMTDump);
	DumpInt(trace, "ESD_ID", p->ESD_ID, indent, XMTDump);
	DumpInt(trace, "IPMP_ToolContextID", p->IPMP_ToolContextID, indent, XMTDump);
	DumpInt(trace, "eventType", p->eventType, indent, XMTDump);
	EndAttributes(trace, XMTDump, GF_TRUE);
	gf_ipmpx_dump_BaseData(_p, trace, indent, XMTDump);
	indent--;
	EndElement(trace, "IPMP_NotifyToolEvent", indent, XMTDump);
	return GF_OK;
}
Beispiel #23
0
static void DumpFunction(const Proto* f, const TString* p, DumpState* D)
{
 DumpString((f->source==p) ? NULL : f->source,D);
 DumpInt(f->linedefined,D);
 DumpInt(f->lastlinedefined,D);
 DumpChar(f->nups,D);
 DumpChar(f->numparams,D);
 DumpChar(f->is_vararg,D);
 DumpChar(f->maxstacksize,D);
 if (D->strip) DumpInt(0,D); else DumpLines(f,D);
 if (D->strip) DumpInt(0,D); else DumpLocals(f,D);
 if (D->strip) DumpInt(0,D); else DumpUpvalues(f,D);
 DumpConstants(f,D);
 DumpCode(f,D);
}
Beispiel #24
0
GF_Err gf_ipmpx_dump_SendWatermark(GF_IPMPX_Data *_p, FILE *trace, u32 indent, Bool XMTDump)
{
	GF_IPMPX_SendWatermark*p = (GF_IPMPX_SendWatermark*)_p;
	StartElement(trace, (char*) ((_p->tag==GF_IPMPX_AUDIO_WM_SEND_TAG) ? "IPMP_SendAudioWatermark" : "IPMP_SendVideoWatermark"), indent, XMTDump);
	indent++;
	DumpInt(trace, "wmStatus", p->wm_status, indent, XMTDump);
	DumpInt(trace, "compression_status", p->compression_status, indent, XMTDump);
	EndAttributes(trace, XMTDump, GF_TRUE);
	gf_ipmpx_dump_BaseData(_p, trace, indent, XMTDump);
	if (p->wm_status==GF_IPMPX_WM_PAYLOAD) gf_ipmpx_dump_ByteArray(p->payload, "payload", trace, indent, XMTDump);
	if (p->opaqueData) gf_ipmpx_dump_ByteArray(p->opaqueData, "opaqueData", trace, indent, XMTDump);
	indent--;
	EndElement(trace, (char*) ( (_p->tag==GF_IPMPX_AUDIO_WM_SEND_TAG) ? "IPMP_SendAudioWatermark" : "IPMP_SendVideoWatermark"), indent, XMTDump);
	return GF_OK;
}
Beispiel #25
0
GF_Err gf_ipmpx_dump_ISMACryp(GF_IPMPX_Data *_p, FILE *trace, u32 indent, Bool XMTDump)
{
	GF_IPMPX_ISMACryp*p = (GF_IPMPX_ISMACryp*)_p;
	StartElement(trace, "ISMACryp_Data", indent, XMTDump);
	indent++;
	DumpInt(trace, "crypto_suite", p->cryptoSuite, indent, XMTDump);
	DumpInt(trace, "IV_length", p->IV_length, indent, XMTDump);
	DumpBool(trace, "selective_encryption", p->use_selective_encryption, indent, XMTDump);
	DumpInt(trace, "key_indicator_length", p->key_indicator_length, indent, XMTDump);
	EndAttributes(trace, XMTDump, GF_TRUE);
	gf_ipmpx_dump_BaseData(_p, trace, indent, XMTDump);
	indent--;
	EndElement(trace, "ISMACryp_Data", indent, XMTDump);
	return GF_OK;
}
Beispiel #26
0
static void DumpConstants (const Proto *f, DumpState *D) {
  int i;
  int n = f->sizek;
  DumpInt(n, D);
  for (i = 0; i < n; i++) {
    const TValue *o = &f->k[i];
    DumpByte(ttype(o), D);
    switch (ttype(o)) {
    case LUA_TNIL:
      break;
    case LUA_TBOOLEAN:
      DumpByte(bvalue(o), D);
      break;
    case LUA_TNUMFLT:
      DumpNumber(fltvalue(o), D);
      break;
    case LUA_TNUMINT:
      DumpInteger(ivalue(o), D);
      break;
    case LUA_TSHRSTR:
    case LUA_TLNGSTR:
      DumpString(tsvalue(o), D);
      break;
    default:
      lua_assert(0);
    }
  }
}
Beispiel #27
0
static void DumpFunction (const Proto *f, TString *psource, DumpState *D) {
  if (D->strip || f->source == psource)
    DumpString(NULL, D);  /* no debug info or same source as its parent */
  else
    DumpString(f->source, D);
  DumpInt(f->linedefined, D);
  DumpInt(f->lastlinedefined, D);
  DumpByte(f->numparams, D);
  DumpByte(f->is_vararg, D);
  DumpByte(f->maxstacksize, D);
  DumpCode(f, D);
  DumpConstants(f, D);
  DumpUpvalues(f, D);
  DumpProtos(f, D);
  DumpDebug(f, D);
}
Beispiel #28
0
void gf_ipmpx_dump_AUTH(GF_IPMPX_Authentication *ipa, FILE *trace, u32 indent, Bool XMTDump)
{
	switch (ipa->tag) {
	case GF_IPMPX_AUTH_KeyDescr_Tag:
	{
		GF_IPMPX_AUTH_KeyDescriptor *p = (GF_IPMPX_AUTH_KeyDescriptor *)ipa;
		StartElement(trace, "IPMP_KeyDescriptor", indent, XMTDump);
		DumpData(trace, "keyBody", p->keyBody, p->keyBodyLength, indent+1, XMTDump);
		if (XMTDump) EndAttributes(trace, GF_TRUE, GF_FALSE);
		else EndElement(trace, "", indent, GF_FALSE);
	}
	break;
	case GF_IPMPX_AUTH_AlgorithmDescr_Tag:
	{
		GF_IPMPX_AUTH_AlgorithmDescriptor *p = (GF_IPMPX_AUTH_AlgorithmDescriptor *)ipa;
		StartElement(trace, "IPMP_AlgorithmDescriptor", indent, XMTDump);
		if (p->regAlgoID) {
			DumpInt(trace, "regAlgoID", p->regAlgoID, indent+1, XMTDump);
		} else {
			gf_ipmpx_dump_ByteArray(p->specAlgoID, "specAlgoID", trace, indent+1, XMTDump);
		}
		EndAttributes(trace, XMTDump, GF_TRUE);
		if (p->OpaqueData) gf_ipmpx_dump_ByteArray(p->OpaqueData, "OpaqueData", trace, indent+1, XMTDump);

		EndElement(trace, "IPMP_AlgorithmDescriptor", indent, XMTDump);
	}
	break;
	}
}
Beispiel #29
0
static void DumpProtos (const Proto *f, DumpState *D) {
  int i;
  int n = f->sizep;
  DumpInt(n, D);
  for (i = 0; i < n; i++)
    DumpFunction(f->p[i], f->source, D);
}
Beispiel #30
0
GF_Err gf_ipmpx_dump_AddToolNotificationListener(GF_IPMPX_Data *_p, FILE *trace, u32 indent, Bool XMTDump)
{
	u32 i;
	GF_IPMPX_AddToolNotificationListener*p = (GF_IPMPX_AddToolNotificationListener*)_p;
	StartElement(trace, "IPMP_AddToolNotificationListener", indent, XMTDump);
	indent++;
	DumpInt(trace, "scope", p->scope, indent, XMTDump);
	StartAttribute(trace, "eventType", indent, XMTDump);
	if (!XMTDump) fprintf(trace, "\"");
	for (i=0; i<p->eventTypeCount; i++) {
		if (XMTDump) {
			fprintf(trace, "\'%d\'", p->eventType[i]);
			if (i+1<p->eventTypeCount) fprintf(trace, " ");
		} else {
			fprintf(trace, "%d", p->eventType[i]);
			if (i+1<p->eventTypeCount) fprintf(trace, ",");
		}
	}
	if (!XMTDump) fprintf(trace, "\"");
	EndAttribute(trace, indent, XMTDump);
	EndAttributes(trace, XMTDump, GF_TRUE);
	gf_ipmpx_dump_BaseData(_p, trace, indent, XMTDump);
	indent--;
	EndElement(trace, "IPMP_AddToolNotificationListener", indent, XMTDump);
	return GF_OK;
}