tizen.api-header.mustache Maven / Gradle / Ivy
#ifndef _{{classname}}_H_
#define _{{classname}}_H_
#include
#include
#include
#include
{{#imports}}
{{{import}}}
{{/imports}}
#include "Error.h"
/** \defgroup Operations API Endpoints
* Classes containing all the functions for calling API endpoints
*
*/
namespace Tizen{
namespace {{prefix}} {
{{#operations}}
/** \addtogroup {{{baseName}}} {{{baseName}}}
* \ingroup Operations
* @{
*/
class {{classname}} {
public:
{{classname}}();
virtual ~{{classname}}();
{{#operation}}
/*! \brief {{{summary}}}. *Synchronous*
*
* {{{notes}}}{{#allParams}}
* \param {{paramName}} {{{description}}}{{#required}} *Required*{{/required}}{{/allParams}}
* \param handler The callback function to be invoked on completion. *Required*
* \param accessToken The Authorization token. *Required*
* \param userData The user data to be passed to the callback function.
*/
bool {{nickname}}Sync(char * accessToken,
{{#allParams}}{{#isContainer}}{{{dataType}}}<{{baseType}}> {{paramName}}{{/isContainer}}{{^isContainer}}{{{dataType}}} {{paramName}}{{/isContainer}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#hasParams}}, {{/hasParams}}
{{#returnType}}void(* handler)({{#returnContainer}}{{#isListContainer}}{{returnType}}<{{returnBaseType}}>{{/isListContainer}}{{#isMapContainer}}{{returnType}}{{/isMapContainer}}{{/returnContainer}}{{^returnContainer}}{{returnType}}{{/returnContainer}}, Error, void* ){{/returnType}}
{{^returnType}}void(* handler)(Error, void* ) {{/returnType}}, void* userData);
/*! \brief {{{summary}}}. *Asynchronous*
*
* {{{notes}}}{{#allParams}}
* \param {{paramName}} {{{description}}}{{#required}} *Required*{{/required}}{{/allParams}}
* \param handler The callback function to be invoked on completion. *Required*
* \param accessToken The Authorization token. *Required*
* \param userData The user data to be passed to the callback function.
*/
bool {{nickname}}Async(char * accessToken,
{{#allParams}}{{#isContainer}}{{{dataType}}}<{{baseType}}> {{paramName}}{{/isContainer}}{{^isContainer}}{{{dataType}}} {{paramName}}{{/isContainer}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#hasParams}}, {{/hasParams}}
{{#returnType}}void(* handler)({{#returnContainer}}{{#isListContainer}}{{returnType}}<{{returnBaseType}}>{{/isListContainer}}{{#isMapContainer}}{{returnType}}{{/isMapContainer}}{{/returnContainer}}{{^returnContainer}}{{returnType}}{{/returnContainer}}, Error, void* ){{/returnType}}
{{^returnType}}void(* handler)(Error, void* ) {{/returnType}}, void* userData);
{{/operation}}
static std::string getBasePath()
{
return "{{{basePath}}}";
}
};
/** @}*/
{{/operations}}
}
}
#endif /* {{classname}}_H_ */