HTTP-Webdav

 view release on metacpan or  search on metacpan

Webdav.pod  view on Meta::CPAN

Holds a lock

=item HTTP::Webdav::LockSession

Holds a lock session

=item HTTP::Webdav::Propfind

Class to access the result of a PROPFIND

=item HTTP::Webdav::Propset

Class to acess properties of one resource

=item HTTP::Webdav::Request

Low level interface to http request

=item HTTP::Webdav::MD5

MD5 checksum

Webdav.pod  view on Meta::CPAN



=back


=back

=head2 int = $session -> propnames (href,depth,results)

Retrieve property names for the resources at 'href'.  'results'
callback is called for each resource.  Use 'ne_propset_iterate' on
the passed results object to retrieve the list of property names.  

=over 4

=item Arguments

=over 4

=item $session

Webdav.pod  view on Meta::CPAN


=item depth

<integer>




=item Callback function: results

results (userdata,href,$propset)

Callback for handling the results of fetching properties for a
single resource (named by 'href').  The results are stored in the
result set 'results': use ne_propset_* to examine this object.  



=over 4

=item userdata

void *

=item href

Webdav.pod  view on Meta::CPAN


props = {
nspace => <string>, name => <string>, };





=item Callback function: results

results (userdata,href,$propset)

Callback for handling the results of fetching properties for a
single resource (named by 'href').  The results are stored in the
result set 'results': use ne_propset_* to examine this object.  



=over 4

=item userdata

void *

=item href

Webdav.pod  view on Meta::CPAN

=item $propfind

ne_propfind_handler *





=item Callback function: result

result (userdata,href,$propset)

Callback for handling the results of fetching properties for a
single resource (named by 'href').  The results are stored in the
result set 'results': use ne_propset_* to examine this object.  



=over 4

=item userdata

void *

=item href

Webdav.pod  view on Meta::CPAN




=back


=back

=head2 void * = $propfind -> current_private ()

Retrieve the 'private' pointer for the current propset for the
given handler, as returned by the ne_props_create_complex callback
installed using 'ne_propfind_set_private'.  If this callback was
not registered, this function will return NULL.  

=over 4

=item Arguments

=over 4

Webdav.pod  view on Meta::CPAN


prop = {
nspace => <string>, name => <string>, };





=item Callback function: result

result (userdata,href,$propset)

Callback for handling the results of fetching properties for a
single resource (named by 'href').  The results are stored in the
result set 'results': use ne_propset_* to examine this object.  



=over 4

=item userdata

void *

=item href

Webdav.pod  view on Meta::CPAN


ne_props_create_complex

A "complex property" has a value which is structured XML. To handle
complex properties, you must set up and register an XML handler
which will understand the elements which make up such properties.
The handler must be registered with the parser returned by
'ne_propfind_get_parser'.

To store the parsed value of the property, a 'private' structure is
allocated in each propset (i.e. one per resource). When parsing the
property value elements, for each new resource encountered in the
response, the 'creator' callback is called to retrieve a 'private'
structure for this resource.

Whilst in XML element callbacks you will have registered to handle
complex properties, you can use the 'ne_propfind_current_private'
call to retrieve the pointer to this private structure.

To retrieve this 'private' structure from the propset in the
results callback, simply call 'ne_propset_private'.



=item userdata

void *




=back


=back



=head1 Methods of HTTP::Webdav::Propset

=head2 int = $propset -> iterate (iterator)

Iterate over all the properties in 'set', calling 'iterator'
for each, passing 'userdata' as the first argument to callback.

Returns:
whatever value iterator returns.


=over 4

=item Arguments

=over 4

=item $propset

const ne_prop_result_set *

The 'ne_simple_propfind' interface. ***

ne_simple_propfind allows you to fetch a set of properties for a
single resource, or a tree of resources.  You set the operation
going by passing these arguments:

- the session which should be used.

Webdav.pod  view on Meta::CPAN

- the properties results set (const ne_prop_result_set *results)





=item Callback function: iterator

int = iterator (userdata,pname,value,status)

ne_propset_iterate iterates over a properties result set,
calling the callback for each property in the set. userdata is
passed as the first argument to the callback. value may be NULL,
indicating an error occurred fetching this property: look at 
status for the error in that case.

If the iterator returns non-zero, ne_propset_iterate will return
immediately with that value.




=over 4

=item userdata

void *

Webdav.pod  view on Meta::CPAN


=back



=back


=back

=head2 const char * = $propset -> lang (pname)

Return language string of property (may be NULL). 

=over 4

=item Arguments

=over 4

=item $propset

const ne_prop_result_set *

The 'ne_simple_propfind' interface. ***

ne_simple_propfind allows you to fetch a set of properties for a
single resource, or a tree of resources.  You set the operation
going by passing these arguments:

- the session which should be used.

Webdav.pod  view on Meta::CPAN






=back


=back

=head2 void * = $propset -> private ()

Returns the private pointer for the given propset. 

=over 4

=item Arguments

=over 4

=item $propset

const ne_prop_result_set *

The 'ne_simple_propfind' interface. ***

ne_simple_propfind allows you to fetch a set of properties for a
single resource, or a tree of resources.  You set the operation
going by passing these arguments:

- the session which should be used.

Webdav.pod  view on Meta::CPAN






=back


=back

=head2 const ne_status * = $propset -> status (propname)

Returns the status structure for fetching the given property on
this resource. This function will return NULL if the server did not
return the property (which is a server error). 

=over 4

=item Arguments

=over 4

=item $propset

const ne_prop_result_set *

The 'ne_simple_propfind' interface. ***

ne_simple_propfind allows you to fetch a set of properties for a
single resource, or a tree of resources.  You set the operation
going by passing these arguments:

- the session which should be used.

Webdav.pod  view on Meta::CPAN






=back


=back

=head2 const char * = $propset -> value (propname)

Get the value of a given property. Will return NULL if there was an
error fetching this property on this resource.  Call
ne_propset_result to get the response-status if so.  

=over 4

=item Arguments

=over 4

=item $propset

const ne_prop_result_set *

The 'ne_simple_propfind' interface. ***

ne_simple_propfind allows you to fetch a set of properties for a
single resource, or a tree of resources.  You set the operation
going by passing these arguments:

- the session which should be used.

Webdav.xs  view on Meta::CPAN

	pSV = sv_newmortal ();
	
        {
        SV ** ppArg ;
        ppArg = hv_fetch (pC2Perl, (char *)(&results), sizeof(results), 1) ;
        if (!SvOK(*ppArg))
            {
            SV * pObj ;
            *ppArg = newRV_noinc ((SV *)newHV()) ;
            sv_2mortal(*ppArg) ;
	    sv_bless (*ppArg, gv_stashpv ("HTTP::Webdav::Propset", 0)) ;
            hv_store (pPerl2C, (char *)(SvRV (*ppArg)), sizeof (void *), newSViv ((IV)results), 0) ;
            }
        pSV = *ppArg ;
        }
	XPUSHs(pSV);

    PUTBACK ;
		cnt = perl_call_sv (*ppCV, G_VOID) ;
		}

Webdav.xs  view on Meta::CPAN

	pSV = sv_newmortal ();
	
        {
        SV ** ppArg ;
        ppArg = hv_fetch (pC2Perl, (char *)(&results), sizeof(results), 1) ;
        if (!SvOK(*ppArg))
            {
            SV * pObj ;
            *ppArg = newRV_noinc ((SV *)newHV()) ;
            sv_2mortal(*ppArg) ;
	    sv_bless (*ppArg, gv_stashpv ("HTTP::Webdav::Propset", 0)) ;
            hv_store (pPerl2C, (char *)(SvRV (*ppArg)), sizeof (void *), newSViv ((IV)results), 0) ;
            }
        pSV = *ppArg ;
        }
	XPUSHs(pSV);

    PUTBACK ;
		cnt = perl_call_sv (*ppCV, G_VOID) ;
		}

Webdav.xs  view on Meta::CPAN

	pSV = sv_newmortal ();
	
        {
        SV ** ppArg ;
        ppArg = hv_fetch (pC2Perl, (char *)(&results), sizeof(results), 1) ;
        if (!SvOK(*ppArg))
            {
            SV * pObj ;
            *ppArg = newRV_noinc ((SV *)newHV()) ;
            sv_2mortal(*ppArg) ;
	    sv_bless (*ppArg, gv_stashpv ("HTTP::Webdav::Propset", 0)) ;
            hv_store (pPerl2C, (char *)(SvRV (*ppArg)), sizeof (void *), newSViv ((IV)results), 0) ;
            }
        pSV = *ppArg ;
        }
	XPUSHs(pSV);

    PUTBACK ;
		cnt = perl_call_sv (*ppCV, G_VOID) ;
		}

Webdav.xs  view on Meta::CPAN

	pSV = sv_newmortal ();
	
        {
        SV ** ppArg ;
        ppArg = hv_fetch (pC2Perl, (char *)(&results), sizeof(results), 1) ;
        if (!SvOK(*ppArg))
            {
            SV * pObj ;
            *ppArg = newRV_noinc ((SV *)newHV()) ;
            sv_2mortal(*ppArg) ;
	    sv_bless (*ppArg, gv_stashpv ("HTTP::Webdav::Propset", 0)) ;
            hv_store (pPerl2C, (char *)(SvRV (*ppArg)), sizeof (void *), newSViv ((IV)results), 0) ;
            }
        pSV = *ppArg ;
        }
	XPUSHs(pSV);

    PUTBACK ;
		cnt = perl_call_sv (*ppCV, G_VOID) ;
		}

    FREETMPS ;
    LEAVE ;

    }

    
    /* *** ne_propset_iterator set by ne_propset_iterate *** */

int neon_cb___cb__22 (void *userdata,
				    const ne_propname *pname,
				    const char *value,
				    const ne_status *status)
    {
	int retval ;

    int cnt ;
    SV * pSV ;

Webdav.xs  view on Meta::CPAN



void
set_private(handler,creator,userdata)
	ne_propfind_handler * handler
	ne_props_create_complex creator
	void * userdata
CODE:
	ne_propfind_set_private(handler,creator,userdata);

MODULE = HTTP::Webdav         PACKAGE = HTTP::Webdav::Propset



void
DESTROY(obj)
	const ne_prop_result_set * obj
CODE:
        hv_delete (pPerl2C, (char *)(SvRV(ST(0))), sizeof (void *), G_DISCARD) ;
            {
            SV ** ppArg = hv_fetch (pC2Perl, (char *)(&obj), sizeof(obj), 0) ;

Webdav.xs  view on Meta::CPAN

        PREINIT:
            SV * pObject = ST(0) ;
            HV * pObjHV  = (HV *)SvRV(pObject) ;
        CODE:

            if (iterator)
                {
                SvREFCNT_inc ((SV *)iterator) ;
                hv_store (pObjHV, "__cb__22", 8, (SV *)iterator, 0) ; 
                }
	RETVAL = 	ne_propset_iterate(set,iterator?&neon_cb___cb__22:NULL,pObject);
OUTPUT:
RETVAL


const char *
lang(set,pname)
	ne_prop_result_set * set
	ne_propname * pname
CODE:
	RETVAL = 	ne_propset_lang(set,pname);
OUTPUT:
RETVAL


void *
private(set)
	ne_prop_result_set * set
CODE:
	RETVAL = 	ne_propset_private(set);
OUTPUT:
RETVAL


const ne_status *
status(set,propname)
	ne_prop_result_set * set
	ne_propname * propname
CODE:
	RETVAL = 	ne_propset_status(set,propname);
OUTPUT:
RETVAL


const char *
value(set,propname)
	ne_prop_result_set * set
	ne_propname * propname
CODE:
	RETVAL = 	ne_propset_value(set,propname);
OUTPUT:
RETVAL

MODULE = HTTP::Webdav         PACKAGE = HTTP::Webdav::Request


void
DESTROY(req)
	ne_request * req
CODE:

typemap  view on Meta::CPAN

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
ne_request * ne_request__

typemap  view on Meta::CPAN

        $var = ($type)SvIV (*ppObj) ;
        }

ne_prop_result_set__

        {
        SV ** ppObj = NULL ;
        ppObj = hv_fetch (pPerl2C, (char *)(SvRV($arg)), sizeof (void *), 0) ;

        if (!ppObj || !*ppObj)
            croak (\"\$var is not of type HTTP::Webdav::Propset\") ;

        $var = ($type)SvIV (*ppObj) ;
        }

struct_ne_lock__

        {
        HV * _pHV_ ;
        if (SvOK($arg))
            {

typemap  view on Meta::CPAN

ne_prop_result_set__

        {
        SV ** ppArg ;
        ppArg = hv_fetch (pC2Perl, (char *)(\&$var), sizeof($var), 1) ;
        if (!SvOK(*ppArg))
            {
            SV * pObj ;
            *ppArg = newRV_noinc ((SV *)newHV()) ;
            sv_2mortal(*ppArg) ;
	    sv_bless (*ppArg, gv_stashpv (\"HTTP::Webdav::Propset\", 0)) ;
            hv_store (pPerl2C, (char *)(SvRV (*ppArg)), sizeof (void *), newSViv ((IV)$var), 0) ;
            }
        $arg = *ppArg ;
        }

struct_ne_lock__

        {
        HV * _pHV_ ;
        if (!SvOK($arg))



( run in 1.722 second using v1.01-cache-2.11-cpan-71847e10f99 )