Browse Source

- Add header files

decke 7 years ago
parent
commit
b5491d24e8
3 changed files with 42 additions and 0 deletions
  1. 4
    0
      common.h
  2. 1
    0
      server.c
  3. 37
    0
      stomp.h

+ 4
- 0
common.h View File

@@ -27,6 +27,10 @@
27 27
 #ifndef _COMMON_H_
28 28
 #define _COMMON_H_
29 29
 
30
+#include <event2/buffer.h>
31
+
30 32
 #define MAX_BUF 16384
33
+
34
+extern int find_readers(char *queuename, struct evbuffer *evb);
31 35
  
32 36
 #endif /* _COMMON_H_ */

+ 1
- 0
server.c View File

@@ -56,6 +56,7 @@
56 56
 #include "common.h"
57 57
 #include "server.h"
58 58
 #include "client.h"
59
+#include "stomp.h"
59 60
 
60 61
 struct event_base *base;
61 62
 

+ 37
- 0
stomp.h View File

@@ -0,0 +1,37 @@
1
+/*
2
+ * Copyright (C) 2011 Bernhard Froehlich <decke@bluelife.at>
3
+ * All rights reserved.
4
+ *
5
+ * Redistribution and use in source and binary forms, with or without
6
+ * modification, are permitted provided that the following conditions
7
+ * are met:
8
+ *
9
+ * 1. Redistributions of source code must retain the above copyright
10
+ *    notice, this list of conditions and the following disclaimer.
11
+ * 2. Author's name may not be used endorse or promote products derived
12
+ *    from this software without specific prior written permission.
13
+ *
14
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17
+ * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
18
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
22
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
23
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24
+ * POSSIBILITY OF SUCH DAMAGE.
25
+ */
26
+
27
+#ifndef _STOMP_H_
28
+#define _STOMP_H_
29
+
30
+#include <event2/buffer.h>
31
+#include <event2/http.h>
32
+
33
+extern int stomp_subscribe(struct client *client);
34
+extern int stomp_parse_headers(struct evkeyvalq* headers, struct evbuffer* buffer);
35
+
36
+ 
37
+#endif /* _STOMP_H_ */

Loading…
Cancel
Save