ThingWorx C SDK
Classes | Typedefs | Functions
twServices.h File Reference

Service definitions & metadata functions. More...

#include "twOSPort.h"
#include "twLogger.h"
#include "twBaseTypes.h"
#include "twInfoTable.h"
#include "cJSON.h"

Go to the source code of this file.

Classes

struct  twServiceDef
 Service definition structure. More...
 

Typedefs

typedef struct twServiceDef twServiceDef
 Service definition structure.
 

Functions

twServiceDeftwServiceDef_Create (char *name, char *description, twDataShape *inputs, enum BaseType outputType, twDataShape *outputDataShape)
 Creates a new twServiceDef structure. More...
 
void twServiceDef_Delete (void *input)
 Frees all memory associated with a twServiceDef structure and all its owned substructures. More...
 

Detailed Description

Service definitions & metadata functions.

Function Documentation

twServiceDef* twServiceDef_Create ( char *  name,
char *  description,
twDataShape inputs,
enum BaseType  outputType,
twDataShape outputDataShape 
)

Creates a new twServiceDef structure.

Parameters
[in]nameThe name of the service.
[in]descriptionA description of the service.
[in]inputsA twDataShape that describes the service input.
[in]outputTypeThe BaseType of the service result.
[in]outputDataShapeA twDataShape that described the service output if the output is a twInfoTable.
Returns
A pointer to the newly allocated twServiceDef structure. Returns NULL on failure.
Note
The calling function gains ownership of the newly created twServiceDef and is responsible for freeing it via twServiceDef_Delete().
void twServiceDef_Delete ( void *  input)

Frees all memory associated with a twServiceDef structure and all its owned substructures.

Parameters
[in]inputA pointer to the twServiceDef structure to be deleted.
Returns
Nothing.