ContentProviderIntrospector

class kanzi::connect::ContentProviderIntrospector

Class that is capable of introspecting a provided service metaclass.

Public Static Functions

void copyProvidersFromXML(const string &xml, kanzi::connect::tinyxml2::XMLDocument &document, const char *rootnodename = "service")

Parses a content providers from provided xml and adds corresponding objects to xml document.

Parameters
  • xml: [in] the xml that has structure <data-sources><data-source>..</data-source></data-sources>

  • document: [out] xml document where-to put the data.

  • rootnodename: [in] name of the root element whom childs the content providers should be added. defaults to “service”

void introspect(kanzi::connect::tinyxml2::XMLDocument &document, const string &baseUri, ContentProvider &contentProvider, const char *rootelementname = "service")

Introspects a content provider and fills in a xml document describing the content provider.

Parameters
  • document: xml document that is extended to include content provider details.

  • baseUri: basic uri

  • contentProvider: the content provider

  • rootelementname: name of the root element whom childs the content providers should be added. defaults to “service”

string introspect(const string &uri, ContentProvider &contentProvider)

Introspects a content provider and returns an xml document describing the content provider.

Parameters
  • uri: The URI for the content provider.

  • contentProvider: The content provider.

string introspect(const string &baseUri, ContentProviderDescriptionSharedPtr description)

Introspects a sub content provider and returns xml document describing it.

Parameters
  • baseUri: The base URI where to append to subprovider specific path.

  • description: The content provider description.