summaryrefslogtreecommitdiff
path: root/src/ctx.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ctx.hpp')
-rw-r--r--src/ctx.hpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/ctx.hpp b/src/ctx.hpp
index c4fa96a..54144ad 100644
--- a/src/ctx.hpp
+++ b/src/ctx.hpp
@@ -25,7 +25,8 @@
#include <map>
#include <vector>
#include <string>
-#include <stdarg.h>
+
+#include "../include/xs.h"
#include "mailbox.hpp"
#include "array.hpp"
@@ -88,6 +89,10 @@ namespace xs
// Returns reaper thread object.
xs::object_t *get_reaper ();
+ // Get the filter associated with the specified filter ID or NULL
+ // If such filter is not registered.
+ xs_filter_t *get_filter (int filter_id_);
+
// Management of inproc endpoints.
int register_endpoint (const char *addr_, endpoint_t &endpoint_);
void unregister_endpoints (xs::socket_base_t *socket_);
@@ -102,6 +107,9 @@ namespace xs
private:
+ // Plug in the extension specified.
+ int plug (const void *ext_);
+
// Used to check whether the object is a context.
uint32_t tag;
@@ -161,6 +169,10 @@ namespace xs
// Synchronisation of access to context options.
mutex_t opt_sync;
+ // List of all filters plugged into the context.
+ typedef std::map <int, xs_filter_t*> filters_t;
+ filters_t filters;
+
ctx_t (const ctx_t&);
const ctx_t &operator = (const ctx_t&);
};