HTTP-Webdav
view release on metacpan or search on metacpan
const char **
=back
=item Callback function: endelm_cb
int = endelm_cb (userdata,s,cdata)
Called when a complete element is parsed
=over 4
=item userdata
void *
=item s
const struct ne_xml_elm *
=item cdata
<string>
=back
=back
=back
=head2 $hip -> push_mixed_handler (elements,validate_cb,startelm_cb,cdata_cb,endelm_cb)
Add a handler which uses a mixed-mode cdata callback
=over 4
=item Arguments
=over 4
=item $hip
ne_xml_parser *
=item atts
const char **
=back
=item Callback function: cdata_cb
cdata_cb (userdata,s,cdata,len)
=over 4
=item userdata
void *
=item s
const struct ne_xml_elm *
=item cdata
<string>
=item len
<integer>
=back
=item Callback function: endelm_cb
int = endelm_cb (userdata,s,cdata)
Called when a complete element is parsed
=over 4
=item userdata
void *
=item s
const struct ne_xml_elm *
=item cdata
<string>
=back
=back
}
PUTBACK ;
FREETMPS ;
LEAVE ;
return retval ;
}
/* *** ne_xml_cdata_cb set by ne_xml_push_mixed_handler *** */
void neon_cb___cb__38 (void *userdata, const struct ne_xml_elm *s,
const char *cdata, int len)
{
int cnt ;
SV * pSV ;
SV ** ppCV ;
dSP ;
ENTER ;
SAVETMPS ;
PUSHMARK(SP) ;
ppCV = hv_fetch ((HV *)SvRV((SV *)userdata), "__cb__38", 8, 0) ;
if (ppCV && *ppCV)
{
pSV = (SV *)userdata;
XPUSHs(pSV);
pSV = sv_newmortal ();
sv_setiv(pSV, (IV)s); XPUSHs(pSV);
pSV = sv_newmortal ();
sv_setpv((SV*)pSV, cdata);
XPUSHs(pSV);
pSV = sv_newmortal ();
sv_setiv(pSV, (IV)len);
XPUSHs(pSV);
PUTBACK ;
cnt = perl_call_sv (*ppCV, G_VOID) ;
}
FREETMPS ;
LEAVE ;
}
/* *** ne_xml_endelm_cb set by ne_xml_push_handler *** */
int neon_cb___cb__35 (void *userdata, const struct ne_xml_elm *s, const char *cdata)
{
int retval ;
int cnt ;
SV * pSV ;
SV ** ppCV ;
dSP ;
ENTER ;
SAVETMPS ;
PUSHMARK(SP) ;
ppCV = hv_fetch ((HV *)SvRV((SV *)userdata), "__cb__35", 8, 0) ;
if (ppCV && *ppCV)
{
pSV = (SV *)userdata;
XPUSHs(pSV);
pSV = sv_newmortal ();
sv_setiv(pSV, (IV)s); XPUSHs(pSV);
pSV = sv_newmortal ();
sv_setpv((SV*)pSV, cdata);
XPUSHs(pSV);
PUTBACK ;
cnt = perl_call_sv (*ppCV, G_SCALAR) ;
}
SPAGAIN ;
if (cnt != 1)
{
retval = 0 ;
FREETMPS ;
LEAVE ;
return retval ;
}
/* *** ne_xml_endelm_cb set by ne_xml_push_mixed_handler *** */
int neon_cb___cb__39 (void *userdata, const struct ne_xml_elm *s, const char *cdata)
{
int retval ;
int cnt ;
SV * pSV ;
SV ** ppCV ;
dSP ;
ENTER ;
SAVETMPS ;
PUSHMARK(SP) ;
ppCV = hv_fetch ((HV *)SvRV((SV *)userdata), "__cb__39", 8, 0) ;
if (ppCV && *ppCV)
{
pSV = (SV *)userdata;
XPUSHs(pSV);
pSV = sv_newmortal ();
sv_setiv(pSV, (IV)s); XPUSHs(pSV);
pSV = sv_newmortal ();
sv_setpv((SV*)pSV, cdata);
XPUSHs(pSV);
PUTBACK ;
cnt = perl_call_sv (*ppCV, G_SCALAR) ;
}
SPAGAIN ;
if (cnt != 1)
{
retval = 0 ;
if (endelm_cb)
{
SvREFCNT_inc ((SV *)endelm_cb) ;
hv_store (pObjHV, "__cb__35", 8, (SV *)endelm_cb, 0) ;
}
ne_xml_push_handler(p,elements,validate_cb?&neon_cb___cb__33:NULL,startelm_cb?&neon_cb___cb__34:NULL,endelm_cb?&neon_cb___cb__35:NULL,pObject);
void
push_mixed_handler(p,elements,validate_cb,startelm_cb,cdata_cb,endelm_cb)
ne_xml_parser * p
struct ne_xml_elm * elements
CV * validate_cb
CV * startelm_cb
CV * cdata_cb
CV * endelm_cb
PREINIT:
SV * pObject = ST(0) ;
HV * pObjHV = (HV *)SvRV(pObject) ;
CODE:
if (validate_cb)
{
SvREFCNT_inc ((SV *)validate_cb) ;
hv_store (pObjHV, "__cb__36", 8, (SV *)validate_cb, 0) ;
}
if (startelm_cb)
{
SvREFCNT_inc ((SV *)startelm_cb) ;
hv_store (pObjHV, "__cb__37", 8, (SV *)startelm_cb, 0) ;
}
if (cdata_cb)
{
SvREFCNT_inc ((SV *)cdata_cb) ;
hv_store (pObjHV, "__cb__38", 8, (SV *)cdata_cb, 0) ;
}
if (endelm_cb)
{
SvREFCNT_inc ((SV *)endelm_cb) ;
hv_store (pObjHV, "__cb__39", 8, (SV *)endelm_cb, 0) ;
}
ne_xml_push_mixed_handler(p,elements,validate_cb?&neon_cb___cb__36:NULL,startelm_cb?&neon_cb___cb__37:NULL,cdata_cb?&neon_cb___cb__38:NULL,endelm_cb?&neon_cb___cb__39:NULL,pObject);
void
set_error(p,msg)
ne_xml_parser * p
char * msg
CODE:
ne_xml_set_error(p,msg);
ne_cookie_cache * T_PTRNULL
const ne_cookie_cache * T_PTRNULL
ne_prop_result_set * ne_prop_result_set__
const ne_prop_result_set * ne_prop_result_set__
ne_xml_validate_cb T_CVREF2
ne_lock_result T_CVREF2
struct ne_md5_ctx * struct_ne_md__ctx__
const struct ne_md5_ctx * struct_ne_md__ctx__
ne_207_parser * ne_____parser__
const ne_207_parser * ne_____parser__
ne_xml_cdata_cb T_CVREF2
ne_propset_iterator T_CVREF2
ne_207_end_response T_CVREF2
ne_accept_response T_CVREF2
ne_xml_startelm_cb T_CVREF2
struct ne_xml_elm * T_PTRNULL
const struct ne_xml_elm * T_PTRNULL
ne_buffer * ne_buffer__
const ne_buffer * ne_buffer__
ne_provide_body T_CVREF2
ne_use_proxy T_CVREF2
( run in 0.650 second using v1.01-cache-2.11-cpan-454fe037f31 )