OpenAB  1.0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
DAVHelper::DAVResponse Struct Reference

DAV Response. More...

#include <DAVHelper.hpp>

Collaboration diagram for DAVHelper::DAVResponse:

Public Member Functions

bool hasProperty (const std::string &prop)
 Checks if response contains given property. In case of properties which contains nested properties, they cane be accessed by name in form property_name:nested_property_name etc. Properties can have no value assigned. More...
 
std::string getProperty (const std::string &prop)
 Gets value of given property. For properties naming see documentation of hasProperty(). More...
 
std::vector< std::string > getPropertiesNames ()
 
bool hasError (const std::string &error)
 

Public Attributes

std::string href
 
std::vector< DAVPropStatproperties
 
DAVStatusCode status
 
std::map< std::string,
std::string > 
error
 

Detailed Description

DAV Response.

Member Function Documentation

std::vector< std::string > DAVHelper::DAVResponse::getPropertiesNames ( )
std::string DAVHelper::DAVResponse::getProperty ( const std::string &  prop)

Gets value of given property. For properties naming see documentation of hasProperty().

Parameters
[in]propproperty name
Returns
property value or empty string if given property is not present in response
Note
please note that based only on result of this function it is not possible to say if property is not present in response or it has no value assigned, this function should be always used after successful hasProperty() check.
bool DAVHelper::DAVResponse::hasError ( const std::string &  error)
bool DAVHelper::DAVResponse::hasProperty ( const std::string &  prop)

Checks if response contains given property. In case of properties which contains nested properties, they cane be accessed by name in form property_name:nested_property_name etc. Properties can have no value assigned.

Parameters
[in]propproperty name
Returns
true if property is present in response and its status code is 200 (HTTP OK), false otherwise.

Member Data Documentation

std::map<std::string, std::string> DAVHelper::DAVResponse::error
std::string DAVHelper::DAVResponse::href
std::vector<DAVPropStat> DAVHelper::DAVResponse::properties
DAVStatusCode DAVHelper::DAVResponse::status

The documentation for this struct was generated from the following files: