aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-registry.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-07-28 02:48:35 +0200
committerMattias Andrée <maandree@operamail.com>2014-07-28 02:48:35 +0200
commitb56efd6e9f5375bb84c2a643e7733460fb14b337 (patch)
treedc2e7702bb4fe7fc62682e10cdb35fc321065276 /src/mds-registry.h
parentm (diff)
downloadmds-b56efd6e9f5375bb84c2a643e7733460fb14b337.tar.gz
mds-b56efd6e9f5375bb84c2a643e7733460fb14b337.tar.bz2
mds-b56efd6e9f5375bb84c2a643e7733460fb14b337.tar.xz
misc
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/mds-registry.h')
-rw-r--r--src/mds-registry.h31
1 files changed, 27 insertions, 4 deletions
diff --git a/src/mds-registry.h b/src/mds-registry.h
index 34a12e9..c8ced44 100644
--- a/src/mds-registry.h
+++ b/src/mds-registry.h
@@ -15,20 +15,43 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef MDS_MDS_ECHO_H
-#define MDS_MDS_ECHO_H
+#ifndef MDS_MDS_REGISTRY_H
+#define MDS_MDS_REGISTRY_H
#include "mds-base.h"
/**
- * Echo the received message payload
+ * Handle the received message
*
* @return Zero on success -1 on error or interruption,
* errno will be set accordingly
*/
-int echo_message(void);
+int handle_message(void);
+
+/**
+ * Perform an action over the registry
+ *
+ * @param length The length of the received message
+ * @param action -1 to remove command, +1 to add commands, 0 to
+ * wait until the message commnds are registered
+ * @param recv_client_id The ID of the client
+ * @param recv_message_id The ID of the received message
+ * @return Zero on success -1 on error or interruption,
+ * errno will be set accordingly
+ */
+int registry_action(size_t length, int action, const char* recv_client_id, const char* recv_message_id);
+
+/**
+ * Send a list of all registered commands to a client
+ *
+ * @param recv_client_id The ID of the client
+ * @param recv_message_id The ID of the received message
+ * @return Zero on success -1 on error or interruption,
+ * errno will be set accordingly
+ */
+int list_registry(const char* recv_client_id, const char* recv_message_id);
/**
* Send a full message even if interrupted