This source file includes following definitions.
- ra_param_flag2text
1 #ifndef CRMD_METADATA_H
2 #define CRMD_METADATA_H
3
4
5
6
7
8
9
10
11 enum ra_flags_e {
12 ra_supports_reload = 0x01,
13 ra_uses_private = 0x02,
14 };
15
16 enum ra_param_flags_e {
17 ra_param_unique = 0x01,
18 ra_param_private = 0x02,
19 };
20
21 struct ra_param_s {
22 char *rap_name;
23 uint32_t rap_flags;
24 };
25
26 struct ra_metadata_s {
27 char *ra_version;
28 GList *ra_params;
29 uint32_t ra_flags;
30 };
31
32 GHashTable *metadata_cache_new(void);
33 void metadata_cache_free(GHashTable *mdc);
34 void metadata_cache_reset(GHashTable *mdc);
35 void metadata_cache_fini(void);
36
37 struct ra_metadata_s *metadata_cache_update(GHashTable *mdc,
38 lrmd_rsc_info_t *rsc,
39 const char *metadata_str);
40 struct ra_metadata_s *metadata_cache_get(GHashTable *mdc, lrmd_rsc_info_t *rsc);
41
42 static inline const char *
43 ra_param_flag2text(enum ra_param_flags_e flag)
44 {
45 switch (flag) {
46 case ra_param_unique:
47 return "unique";
48 case ra_param_private:
49 return "private";
50 default:
51 return "unknown";
52 }
53 }
54
55 #endif