#ifndef _TOPO_METHOD_H
#define _TOPO_METHOD_H
#ifdef __cplusplus
extern "C" {
#endif
#include <fm/topo_list.h>
typedef struct topo_imethod {
topo_list_t tim_list;
pthread_mutex_t tim_lock;
pthread_cond_t tim_cv;
uint_t tim_busy;
char *tim_name;
topo_version_t tim_version;
topo_stability_t tim_stability;
char *tim_desc;
topo_method_f *tim_func;
struct topo_mod *tim_mod;
} topo_imethod_t;
extern int topo_method_call(tnode_t *, const char *, topo_version_t, nvlist_t *,
nvlist_t **, int *);
extern topo_imethod_t *topo_method_lookup(tnode_t *, const char *);
extern int topo_prop_method_version_register(tnode_t *, const char *,
const char *, topo_type_t, const char *, topo_version_t, const nvlist_t *,
int *);
#define ST_SPOOF_FMRI "spoof_resource_fmri"
#define ST_SPOOF_SENSOR "spoof_sensor_name"
#define ST_SPOOF_STATE "spoof_sensor_state"
#define TOPO_METH_ASRU_COMPUTE "topo_asru_compute"
#define TOPO_METH_FRU_COMPUTE "topo_fru_compute"
#define TOPO_METH_FMRI "topo_fmri"
#define TOPO_METH_NVL2STR "topo_nvl2str"
#define TOPO_METH_STR2NVL "topo_str2nvl"
#define TOPO_METH_COMPARE "topo_compare"
#define TOPO_METH_PROP_GET "topo_prop_get"
#define TOPO_METH_PGRP_GET "topo_pgrp_get"
#define TOPO_METH_PROP_SET "topo_prop_set"
#define TOPO_METH_FACILITY "topo_facility"
#define TOPO_METH_OCCUPIED "topo_occupied"
#define TOPO_METH_PATH_STR2NVL "topo_path_str2nvl"
#define TOPO_METH_PATH_NVL2STR "topo_path_nvl2str"
#define TOPO_METH_FMRI_VERSION 0
#define TOPO_METH_FRU_COMPUTE_VERSION 0
#define TOPO_METH_ASRU_COMPUTE_VERSION 0
#define TOPO_METH_NVL2STR_VERSION 0
#define TOPO_METH_STR2NVL_VERSION 0
#define TOPO_METH_COMPARE_VERSION 0
#define TOPO_METH_PROP_GET_VERSION 0
#define TOPO_METH_PGRP_GET_VERSION 0
#define TOPO_METH_PROP_SET_VERSION 0
#define TOPO_METH_FACILITY_VERSION 0
#define TOPO_METH_OCCUPIED_VERSION 0
#define TOPO_METH_ASRU_COMPUTE_DESC "Dynamic ASRU constructor"
#define TOPO_METH_FRU_COMPUTE_DESC "Dynamic FRU constructor"
#define TOPO_METH_FMRI_DESC "Dynamic FMRI constructor"
#define TOPO_METH_NVL2STR_DESC "FMRI to string"
#define TOPO_METH_STR2NVL_DESC "string to FMRI"
#define TOPO_METH_COMPARE_DESC "compare two FMRIs"
#define TOPO_METH_PROP_GET_DESC "get properties for FMRI"
#define TOPO_METH_PGRP_GET_DESC "get property group for FMRI"
#define TOPO_METH_PROP_SET_DESC "set properties for FMRI"
#define TOPO_METH_FACILITY_DESC "get facility for FMRI"
#define TOPO_METH_OCCUPIED_DESC "get occupant status"
#define TOPO_METH_COMPARE_RET "compare-return"
#define TOPO_METH_OCCUPIED_RET "occupied-return"
#define TOPO_METH_FMRI_ARG_NAME "child-name"
#define TOPO_METH_FMRI_ARG_INST "child-inst"
#define TOPO_METH_FMRI_ARG_NVL "args"
#define TOPO_METH_FMRI_ARG_PARENT "parent-fmri"
#define TOPO_METH_FMRI_ARG_AUTH "auth"
#define TOPO_METH_FMRI_ARG_PART "part"
#define TOPO_METH_FMRI_ARG_REV "rev"
#define TOPO_METH_FMRI_ARG_SER "serial"
#define TOPO_METH_FMRI_ARG_HCS "hc-specific"
#define TOPO_METH_FMRI_ARG_FMRI "fmri"
#define TOPO_METH_FMRI_ARG_SUBFMRI "sub-fmri"
#define TOPO_METH_FMRI_ARG_NV1 "nv1"
#define TOPO_METH_FMRI_ARG_NV2 "nv2"
#ifdef __cplusplus
}
#endif
#endif