db-ctl-base: remove ctl_get_all_commands() function
[cascardo/ovs.git] / lib / db-ctl-base.h
index ba177f2..2a66230 100644 (file)
@@ -43,9 +43,6 @@ struct table;
  * - the *ctl command context by inheriting the 'struct ctl_context' for
  *   additional commands implemented by user.  (See 'struct ctl_context' for
  *   more info)
- *
- * - the 'tables[]' for each table in the schema.
- *
 */
 
 /* ctl_fatal() also logs the error, so it is preferred in this file. */
@@ -56,12 +53,13 @@ struct table;
 extern struct ovsdb_idl *the_idl;
 extern struct ovsdb_idl_txn *the_idl_txn;
 
-void ctl_init(void);
+struct ctl_table_class;
+void ctl_init(const struct ctl_table_class *tables);
 char *ctl_default_db(void);
 OVS_NO_RETURN void ctl_exit(int status);
 OVS_NO_RETURN void ctl_fatal(const char *, ...) OVS_PRINTF_FORMAT(1, 2);
 
-/* *clt command syntax structure, to be defined by each command implementation.
+/* *ctl command syntax structure, to be defined by each command implementation.
  *
  * Execution Path
  * ==============
@@ -72,7 +70,7 @@ OVS_NO_RETURN void ctl_fatal(const char *, ...) OVS_PRINTF_FORMAT(1, 2);
  *            ---------------  ------------  -----------------
  * *ctl       ->prerequisites     ->run        ->postprocess
  *
- * Any *clt command implementation should go through the following execution
+ * Any *ctl command implementation should go through the following execution
  * path:
  *
  *   1. parses user command-line input and finds the corresponding syntax
@@ -153,7 +151,6 @@ void ctl_print_options(const struct option *);
 void ctl_add_cmd_options(struct option **, size_t *n_options_p,
                          size_t *allocated_options_p, int opt_val);
 void ctl_register_commands(const struct ctl_command_syntax *);
-const struct shash *ctl_get_all_commands(void);
 struct ctl_command *ctl_parse_commands(int argc, char *argv[],
                                        struct shash *local_options,
                                        size_t *n_commandsp);
@@ -245,14 +242,8 @@ struct ctl_table_class {
     struct ctl_row_id row_ids[2];
 };
 
-/* Represents all tables in the schema.  User must define 'tables'
- * in implementation.  And the definition must end with an all-NULL
- * entry. */
-extern const struct ctl_table_class tables[];
-
-const struct ctl_table_class * get_table(const char *table_name);
-void set_column(const struct ctl_table_class *,
-                const struct ovsdb_idl_row *, const char *arg,
-                struct ovsdb_symbol_table *);
+void ctl_set_column(const char *table_name,
+                    const struct ovsdb_idl_row *, const char *arg,
+                    struct ovsdb_symbol_table *);
 
 #endif /* db-ctl-base.h */