12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- // plugin.h :
- //
- #if !defined(AGD_PLUGIN_H__98AA983E_C855_424B_ADEE_D6A881108474__INCLUDED_)
- #define AGD_PLUGIN_H__98AA983E_C855_424B_ADEE_D6A881108474__INCLUDED_
- #include <stdint.h>
- #include <stdbool.h>
- #ifndef _LIBBUILD
- #include <gfa/svc/common/uuid.h>
- #else // _LIBBUILD
- #include "common/uuid.h"
- #endif // _LIBBUILD
- #ifdef __cplusplus
- extern "C" {
- #endif // __cplusplus
- #include <ulfius.h>
- #include <gfa/gfaipc.h>
- /////////////////////////////////////////////////////////////////////////////
- // plugin.h - Declarations:
- typedef struct _REST_REQUEST_HANDLER
- {
- const char *pszHandlerName;
- const char *pszMethod;
- const char *pszVUrl;
- const char *pszMime;
- const char *pszFunctionName;
- }REST_REQUEST_HANDLER, *LPREST_REQUEST_HANDLER;
- typedef const REST_REQUEST_HANDLER *LPCREST_REQUEST_HANDLER;
- typedef struct _REST_PLUGIN_INFO
- {
- uuid_t signature;
- const char *pszPluginName;
- size_t nHandlerCnt;
- REST_REQUEST_HANDLER handler[1];
- }REST_PLUGIN_INFO, *LPREST_PLUGIN_INFO;
- typedef const REST_PLUGIN_INFO *LPCREST_PLUGIN_INFO;
- typedef struct _REST_PLUGIN_REQUEST_HANDLER_PARAMS
- {
- uuid_t uuidShm;
- HSHM hShm;
- void *pShm;
- void *pParam;
- }REST_PLUGIN_REQUEST_HANDLER_PARAMS, *LPREST_PLUGIN_REQUEST_HANDLER_PARAMS;
- typedef const REST_PLUGIN_REQUEST_HANDLER_PARAMS *LPCREST_PLUGIN_REQUEST_HANDLER_PARAMS;
- DECLARE_UUID(UUID_REST_PLUGIN);
- /////////////////////////////////////////////////////////////////////////////
- typedef const REST_PLUGIN_INFO* (*PFN_GETPLUGININFO)(void);
- typedef int (*PFN_REST_REQUEST_HANDLER)(const struct _u_request*, struct _u_response*, void*);
- /*
- Prototype example:
- extern "C" int PluginRequestHandler(const struct _u_request *request, struct _u_response *response, void *user_data)
- {
- ...
- }
- */
- /////////////////////////////////////////////////////////////////////////////
- #ifdef __cplusplus
- }
- #endif // __cplusplus
- #endif // !defined(AGD_PLUGIN_H__98AA983E_C855_424B_ADEE_D6A881108474__INCLUDED_)
|