Pass a threadsafe ctx into fr_connection_pool create callback
[freeradius.git] / src / modules / rlm_rest / rest.h
index a9f33da..d6f474f 100644 (file)
@@ -45,11 +45,12 @@ RCSIDH(other_h, "$Id$")
 #define REST_BODY_MAX_ATTRS            256
 
 typedef enum {
-       HTTP_METHOD_CUSTOM,
+       HTTP_METHOD_UNKNOWN = 0,
        HTTP_METHOD_GET,
        HTTP_METHOD_POST,
        HTTP_METHOD_PUT,
-       HTTP_METHOD_DELETE
+       HTTP_METHOD_DELETE,
+       HTTP_METHOD_CUSTOM              //!< Must always come last, should not be in method table
 } http_method_t;
 
 typedef enum {
@@ -58,7 +59,8 @@ typedef enum {
        HTTP_BODY_UNAVAILABLE,
        HTTP_BODY_INVALID,
        HTTP_BODY_NONE,
-       HTTP_BODY_CUSTOM,
+       HTTP_BODY_CUSTOM_XLAT,
+       HTTP_BODY_CUSTOM_LITERAL,
        HTTP_BODY_POST,
        HTTP_BODY_JSON,
        HTTP_BODY_XML,
@@ -246,12 +248,10 @@ int rest_init(rlm_rest_t *instance);
 
 void rest_cleanup(void);
 
-void *mod_conn_create(void *instance);
+void *mod_conn_create(TALLOC_CTX *ctx, void *instance);
 
 int mod_conn_alive(void *instance, void *handle);
 
-int mod_conn_delete(void *instance, void *handle);
-
 /*
  *     Request processing API
  */