sysrepo  1.4.58
YANG datastore
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Plugin API

Macros

#define SRP_INIT_CB   "sr_plugin_init_cb"
 Sysrepo plugin initialization callback name that must exist in every plugin. More...
 
#define SRP_CLEANUP_CB   "sr_plugin_cleanup_cb"
 Sysrepo plugin cleanup callback name that must exist in every plugin. More...
 
#define SRP_LOG_ERR(format,...)   srp_log(SR_LL_ERR, format, __VA_ARGS__)
 Log a plugin error message with format arguments. More...
 
#define SRP_LOG_WRN(format,...)   srp_log(SR_LL_WRN, format, __VA_ARGS__)
 Log a plugin warning message with format arguments. More...
 
#define SRP_LOG_INF(format,...)   srp_log(SR_LL_INF, format, __VA_ARGS__)
 Log a plugin info message with format arguments. More...
 
#define SRP_LOG_DBG(format,...)   srp_log(SR_LL_DBG, format, __VA_ARGS__)
 Log a plugin debug message with format arguments. More...
 
#define SRP_LOG_ERRMSG(msg)   srp_log(SR_LL_ERR, msg)
 Log a simple plugin error message. More...
 
#define SRP_LOG_WRNMSG(msg)   srp_log(SR_LL_WRN, msg)
 Log a simple plugin warning message. More...
 
#define SRP_LOG_INFMSG(msg)   srp_log(SR_LL_INF, msg)
 Log a simple plugin info message. More...
 
#define SRP_LOG_DBGMSG(msg)   srp_log(SR_LL_DBG, msg)
 Log a simple plugin debug message. More...
 

Typedefs

typedef int(* srp_init_cb_t )(sr_session_ctx_t *session, void **private_data)
 Sysrepo plugin initialization callback. More...
 
typedef void(* srp_cleanup_cb_t )(sr_session_ctx_t *session, void *private_data)
 Sysrepo plugin cleanup callback. More...
 

Detailed Description

Macro Definition Documentation

#define SRP_INIT_CB   "sr_plugin_init_cb"

Sysrepo plugin initialization callback name that must exist in every plugin.

Definition at line 1756 of file sysrepo.h.

#define SRP_CLEANUP_CB   "sr_plugin_cleanup_cb"

Sysrepo plugin cleanup callback name that must exist in every plugin.

Definition at line 1761 of file sysrepo.h.

#define SRP_LOG_ERR (   format,
  ... 
)    srp_log(SR_LL_ERR, format, __VA_ARGS__)

Log a plugin error message with format arguments.

Parameters
[in]formatMessage format.
[in]...Format arguments.

Definition at line 1792 of file sysrepo.h.

#define SRP_LOG_WRN (   format,
  ... 
)    srp_log(SR_LL_WRN, format, __VA_ARGS__)

Log a plugin warning message with format arguments.

Parameters
[in]formatMessage format.
[in]...Format arguments.

Definition at line 1800 of file sysrepo.h.

#define SRP_LOG_INF (   format,
  ... 
)    srp_log(SR_LL_INF, format, __VA_ARGS__)

Log a plugin info message with format arguments.

Parameters
[in]formatMessage format.
[in]...Format arguments.

Definition at line 1808 of file sysrepo.h.

#define SRP_LOG_DBG (   format,
  ... 
)    srp_log(SR_LL_DBG, format, __VA_ARGS__)

Log a plugin debug message with format arguments.

Parameters
[in]formatMessage format.
[in]...Format arguments.

Definition at line 1816 of file sysrepo.h.

#define SRP_LOG_ERRMSG (   msg)    srp_log(SR_LL_ERR, msg)

Log a simple plugin error message.

Parameters
[in]msgMessage to log.

Definition at line 1823 of file sysrepo.h.

#define SRP_LOG_WRNMSG (   msg)    srp_log(SR_LL_WRN, msg)

Log a simple plugin warning message.

Parameters
[in]msgMessage to log.

Definition at line 1830 of file sysrepo.h.

#define SRP_LOG_INFMSG (   msg)    srp_log(SR_LL_INF, msg)

Log a simple plugin info message.

Parameters
[in]msgMessage to log.

Definition at line 1837 of file sysrepo.h.

#define SRP_LOG_DBGMSG (   msg)    srp_log(SR_LL_DBG, msg)

Log a simple plugin debug message.

Parameters
[in]msgMessage to log.

Definition at line 1844 of file sysrepo.h.

Typedef Documentation

typedef int(* srp_init_cb_t)(sr_session_ctx_t *session, void **private_data)

Sysrepo plugin initialization callback.

Parameters
[in]sessionSysrepo session that can be used for any API calls needed for plugin initialization (mainly for reading of startup configuration and subscribing for notifications).
[out]private_dataPrivate context (opaque to sysrepo) that will be passed to srp_cleanup_cb_t when plugin cleanup is requested.
Returns
Error code (SR_ERR_OK on success).

Definition at line 1774 of file sysrepo.h.

typedef void(* srp_cleanup_cb_t)(sr_session_ctx_t *session, void *private_data)

Sysrepo plugin cleanup callback.

Parameters
[in]sessionSysrepo session that can be used for any API calls needed for plugin cleanup (mainly for unsubscribing of subscriptions initialized in srp_init_cb_t).
[in]private_dataPrivate context as passed in srp_init_cb_t.

Definition at line 1784 of file sysrepo.h.