summaryrefslogtreecommitdiff
path: root/ndb/include/mgmapi
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.ndb.mysql.com>2005-01-09 14:31:54 +0100
committerunknown <tomas@poseidon.ndb.mysql.com>2005-01-09 14:31:54 +0100
commit3c7b8815c321f546bca0b299b9ecc4bbd4a056c4 (patch)
treeeabfa0ba0ea87303f518e7bddacb485c34aff136 /ndb/include/mgmapi
parentb4de620e5162fbf334246344dbfb001106bebb21 (diff)
downloadmariadb-git-3c7b8815c321f546bca0b299b9ecc4bbd4a056c4.tar.gz
added example of mgmapi usage
moved get_configuration to doxygen internal since the "iterators" are not documented
Diffstat (limited to 'ndb/include/mgmapi')
-rw-r--r--ndb/include/mgmapi/mgmapi.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/ndb/include/mgmapi/mgmapi.h b/ndb/include/mgmapi/mgmapi.h
index e45a7f607ea..0e8ccdcb06f 100644
--- a/ndb/include/mgmapi/mgmapi.h
+++ b/ndb/include/mgmapi/mgmapi.h
@@ -47,6 +47,23 @@
* Error conditions can be identified by using the appropriate
* error-reporting functions ndb_mgm_get_latest_error() and
* @ref ndb_mgm_error.
+ *
+ * Below is an example of usage (without error handling for brevity).
+ * @code
+ * NdbMgmHandle handle= ndb_mgm_create_handle();
+ * ndb_mgm_connect(handle,0,0,0);
+ * struct ndb_mgm_cluster_state *state= ndb_mgm_get_status(handle);
+ * for(int i=0; i < state->no_of_nodes; i++)
+ * {
+ * printf("node with id=%d ", state->node_states[i].node_id);
+ * if(state->node_states[i].version != 0)
+ * printf("connected\n");
+ * else
+ * printf("not connected\n");
+ * }
+ * free((void*)state);
+ * ndb_mgm_destroy_handle(&handle);
+ * @endcode
*/
/** @addtogroup MGM_C_API
@@ -215,6 +232,9 @@ extern "C" {
*
* Sub-structure in enum ndb_mgm_cluster_state
* returned by ndb_mgm_get_status()
+ *
+ * @note @ref node_status, @ref start_phase, @ref dynamic_id
+ * and @ref node_group are only relevant for database nodes
*/
struct ndb_mgm_node_state {
/** NDB Cluster node id*/
@@ -873,6 +893,7 @@ extern "C" {
int ndb_mgm_exit_single_user(NdbMgmHandle handle,
struct ndb_mgm_reply* reply);
+#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
/** @} *********************************************************************/
/**
* @name Configuration handling
@@ -893,7 +914,6 @@ extern "C" {
unsigned version);
void ndb_mgm_destroy_configuration(struct ndb_mgm_configuration *);
-#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
int ndb_mgm_alloc_nodeid(NdbMgmHandle handle,
unsigned version, int nodetype);
/**