root/include/crm/cib/util.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /* 
   2  * Copyright (C) 2004 Andrew Beekhof <andrew@beekhof.net>
   3  * 
   4  * This program is free software; you can redistribute it and/or
   5  * modify it under the terms of the GNU Lesser General Public
   6  * License as published by the Free Software Foundation; either
   7  * version 2 of the License, or (at your option) any later version.
   8  * 
   9  * This software is distributed in the hope that it will be useful,
  10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12  * General Public License for more details.
  13  * 
  14  * You should have received a copy of the GNU Lesser General Public
  15  * License along with this library; if not, write to the Free Software
  16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  17  */
  18 #ifndef CIB_UTIL__H
  19 #  define CIB_UTIL__H
  20 
  21 /* Utility functions */
  22 const char *get_object_path(const char *object_type);
  23 const char *get_object_parent(const char *object_type);
  24 xmlNode *get_object_root(const char *object_type, xmlNode * the_root);
  25 xmlNode *create_cib_fragment_adv(xmlNode * update, const char *section, const char *source);
  26 
  27 xmlNode *createEmptyCib(int admin_epoch);
  28 gboolean verifyCibXml(xmlNode * cib);
  29 
  30 gboolean cib_version_details(xmlNode * cib, int *admin_epoch, int *epoch, int *updates);
  31 
  32 int update_attr_delegate(cib_t * the_cib, int call_options,
  33                          const char *section, const char *node_uuid,
  34                          const char *set_type, const char *set_name,
  35                          const char *attr_id, const char *attr_name,
  36                          const char *attr_value, gboolean to_console,
  37                          const char *user_name, const char *node_type);
  38 
  39 int find_nvpair_attr_delegate(cib_t * the_cib, const char *attr,
  40                               const char *section, const char *node_uuid,
  41                               const char *set_type, const char *set_name,
  42                               const char *attr_id, const char *attr_name,
  43                               gboolean to_console, char **value, const char *user_name);
  44 
  45 int read_attr_delegate(cib_t * the_cib,
  46                        const char *section, const char *node_uuid,
  47                        const char *set_type, const char *set_name,
  48                        const char *attr_id, const char *attr_name,
  49                        char **attr_value, gboolean to_console, const char *user_name);
  50 
  51 int delete_attr_delegate(cib_t * the_cib, int options,
  52                          const char *section, const char *node_uuid,
  53                          const char *set_type, const char *set_name,
  54                          const char *attr_id, const char *attr_name,
  55                          const char *attr_value, gboolean to_console, const char *user_name);
  56 
  57 int query_node_uuid(cib_t * the_cib, const char *uname, char **uuid, int *is_remote_node);
  58 
  59 int query_node_uname(cib_t * the_cib, const char *uuid, char **uname);
  60 
  61 int set_standby(cib_t * the_cib, const char *uuid, const char *scope, const char *standby_value);
  62 
  63 xmlNode *get_cib_copy(cib_t * cib);
  64 xmlNode *cib_get_generation(cib_t * cib);
  65 
  66 void cib_metadata(void);
  67 const char *cib_pref(GHashTable * options, const char *name);
  68 int cib_apply_patch_event(xmlNode * event, xmlNode * input, xmlNode ** output, int level);
  69 
  70 #endif

/* [previous][next][first][last][top][bottom][index][help] */