#include "grassroots_service_library.h"
#include "typedefs.h"
#include "jansson.h"
Go to the source code of this file.
|
| const char * | GetProviderName (const json_t *const data_p) |
| | Get the name of the Provider from a given JSON configuration fragment. More...
|
| |
| const char * | GetProviderURI (const json_t *const data_p) |
| | Get the URI of the Provider from a given JSON configuration fragment. More...
|
| |
| const char * | GetProviderDescription (const json_t *const data_p) |
| | Get the description of the Provider from a given JSON configuration fragment. More...
|
| |
| const char * | GetProviderLogo (const json_t *const data_p) |
| | Get the URL of the logo of the Provider from a given JSON configuration fragment. More...
|
| |
| json_t * | GetProviderDetails (const json_t *root_json_p) |
| | Get the JSON object containing the Provider details. More...
|
| |
| bool | SetProviderType (json_t *provider_p) |
| | Ensure that the correct json-ld datatype is set for a given JSON object representing a Provider. More...
|
| |
◆ GetProviderName()
| const char* GetProviderName |
( |
const json_t *const |
data_p | ) |
|
Get the name of the Provider from a given JSON configuration fragment.
- Parameters
-
| data_p | The fragment to get the name of the Provider from. |
- Returns
- The name of the Provider or
NULL if it could not be found.
◆ GetProviderURI()
| const char* GetProviderURI |
( |
const json_t *const |
data_p | ) |
|
Get the URI of the Provider from a given JSON configuration fragment.
- Parameters
-
| data_p | The fragment to get the URI of the Provider from. |
- Returns
- The URI of the Provider or
NULL if it could not be found.
◆ GetProviderDescription()
| const char* GetProviderDescription |
( |
const json_t *const |
data_p | ) |
|
Get the description of the Provider from a given JSON configuration fragment.
- Parameters
-
| data_p | The fragment to get the description of the Provider from. |
- Returns
- The description of the Provider or
NULL if it could not be found.
◆ GetProviderLogo()
| const char* GetProviderLogo |
( |
const json_t *const |
data_p | ) |
|
Get the URL of the logo of the Provider from a given JSON configuration fragment.
- Parameters
-
| data_p | The fragment to get the logo of the Provider from. |
- Returns
- The URL of the logo of the Provider or
NULL if it could not be found.
◆ GetProviderDetails()
| json_t* GetProviderDetails |
( |
const json_t * |
root_json_p | ) |
|
Get the JSON object containing the Provider details.
- Parameters
-
| root_json_p | The JSON fragment to get the Provider details from. |
- Returns
- Upon success, if there is only one Provider then the returned object will be JSON object. If there are multiple providers, then the returned value will be a JSON array with each object representing each provider. Upon failure
NULL will be returned.
◆ SetProviderType()
| bool SetProviderType |
( |
json_t * |
provider_p | ) |
|
Ensure that the correct json-ld datatype is set for a given JSON object representing a Provider.
If the value is already set, then the object is unaltered.
- Parameters
-
| provider_p | The Provider to check. |
- Returns
true if the Provider has the correct datatype set successfully, false otherwise.