Motr  M0
service.c File Reference
#include "lib/trace.h"
#include "conf/objs/common.h"
#include "conf/onwire_xc.h"
#include "motr/magic.h"
#include "lib/string.h"
Include dependency graph for service.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CONF
 
#define XCAST(xobj)   ((struct m0_confx_service *)(&(xobj)->xo_u))
 
#define X_CST(name)   [name] = #name,
 

Functions

static bool service_check (const void *bob)
 
 M0_CONF__BOB_DEFINE (m0_conf_service, M0_CONF_SERVICE_MAGIC, service_check)
 
 M0_CONF__INVARIANT_DEFINE (service_invariant, m0_conf_service)
 
 M0_BASSERT (offsetof(struct m0_confx_service, xs_header)==0)
 
static int service_decode (struct m0_conf_obj *dest, const struct m0_confx_obj *src)
 
static int service_encode (struct m0_confx_obj *dest, const struct m0_conf_obj *src)
 
static bool service_match (const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
 
static int service_lookup (const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
 
static const struct m0_fid ** service_downlinks (const struct m0_conf_obj *obj)
 
static void service_delete (struct m0_conf_obj *obj)
 
 M0_CONF__CTOR_DEFINE (service_create, m0_conf_service, &service_ops)
 
M0_INTERNAL const char * m0_conf_service_type2str (enum m0_conf_service_type type)
 

Variables

static const struct m0_conf_obj_ops service_ops
 
const struct m0_conf_obj_type M0_CONF_SERVICE_TYPE
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CONF

Definition at line 22 of file service.c.

◆ X_CST

#define X_CST (   name)    [name] = #name,

◆ XCAST

#define XCAST (   xobj)    ((struct m0_confx_service *)(&(xobj)->xo_u))

Definition at line 44 of file service.c.

Function Documentation

◆ M0_BASSERT()

M0_BASSERT ( offsetof(struct m0_confx_service, xs_header = =0)

◆ M0_CONF__BOB_DEFINE()

M0_CONF__BOB_DEFINE ( m0_conf_service  ,
M0_CONF_SERVICE_MAGIC  ,
service_check   
)

◆ M0_CONF__CTOR_DEFINE()

M0_CONF__CTOR_DEFINE ( service_create  ,
m0_conf_service  ,
service_ops 
)

◆ M0_CONF__INVARIANT_DEFINE()

M0_CONF__INVARIANT_DEFINE ( service_invariant  ,
m0_conf_service   
)

◆ service_check()

static bool service_check ( const void *  bob)
static

Definition at line 30 of file service.c.

Here is the call graph for this function:

◆ service_decode()

static int service_decode ( struct m0_conf_obj dest,
const struct m0_confx_obj src 
)
static

Definition at line 48 of file service.c.

Here is the call graph for this function:

◆ service_delete()

static void service_delete ( struct m0_conf_obj obj)
static

Definition at line 133 of file service.c.

Here is the call graph for this function:

◆ service_downlinks()

static const struct m0_fid** service_downlinks ( const struct m0_conf_obj obj)
static

Definition at line 125 of file service.c.

Here is the call graph for this function:

◆ service_encode()

static int service_encode ( struct m0_confx_obj dest,
const struct m0_conf_obj src 
)
static

Definition at line 73 of file service.c.

Here is the call graph for this function:

◆ service_lookup()

static int service_lookup ( const struct m0_conf_obj parent,
const struct m0_fid name,
struct m0_conf_obj **  out 
)
static

Definition at line 113 of file service.c.

Here is the call graph for this function:

◆ service_match()

static bool service_match ( const struct m0_conf_obj cached,
const struct m0_confx_obj flat 
)
static

Definition at line 101 of file service.c.

Here is the call graph for this function:

Variable Documentation

◆ M0_CONF_SERVICE_TYPE

const struct m0_conf_obj_type M0_CONF_SERVICE_TYPE
Initial value:
= {
.cot_ftype = {
.ft_id = M0_CONF__SERVICE_FT_ID,
.ft_name = "conf_service"
},
.cot_create = &service_create,
.cot_xt = &m0_confx_service_xc,
.cot_branch = "u_service",
.cot_xc_init = &m0_xc_m0_confx_service_struct_init,
.cot_magic = M0_CONF_SERVICE_MAGIC
}

Definition at line 156 of file service.c.

◆ service_ops

const struct m0_conf_obj_ops service_ops
static
Initial value:
= {
.coo_invariant = service_invariant,
.coo_decode = service_decode,
.coo_encode = service_encode,
.coo_match = service_match,
.coo_lookup = service_lookup,
.coo_readdir = NULL,
.coo_downlinks = service_downlinks,
.coo_delete = service_delete
}
static int service_decode(struct m0_conf_obj *dest, const struct m0_confx_obj *src)
Definition: service.c:48
#define NULL
Definition: misc.h:38
static bool service_match(const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
Definition: service.c:101
static const struct m0_fid ** service_downlinks(const struct m0_conf_obj *obj)
Definition: service.c:125
static int service_encode(struct m0_confx_obj *dest, const struct m0_conf_obj *src)
Definition: service.c:73
static int service_lookup(const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
Definition: service.c:113
static void service_delete(struct m0_conf_obj *obj)
Definition: service.c:133

Definition at line 143 of file service.c.