pubsub.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. Copyright (c) 2012 Martin Sustrik All rights reserved.
  3. Permission is hereby granted, free of charge, to any person obtaining a copy
  4. of this software and associated documentation files (the "Software"),
  5. to deal in the Software without restriction, including without limitation
  6. the rights to use, copy, modify, merge, publish, distribute, sublicense,
  7. and/or sell copies of the Software, and to permit persons to whom
  8. the Software is furnished to do so, subject to the following conditions:
  9. The above copyright notice and this permission notice shall be included
  10. in all copies or substantial portions of the Software.
  11. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  12. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  13. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  14. THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  15. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  16. FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  17. IN THE SOFTWARE.
  18. */
  19. #ifndef PUBSUB_H_INCLUDED
  20. #define PUBSUB_H_INCLUDED
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. #define NN_PROTO_PUBSUB 2
  25. #define NN_PUB (NN_PROTO_PUBSUB * 16 + 0)
  26. #define NN_SUB (NN_PROTO_PUBSUB * 16 + 1)
  27. #define NN_SUB_SUBSCRIBE 1
  28. #define NN_SUB_UNSUBSCRIBE 2
  29. #ifdef __cplusplus
  30. }
  31. #endif
  32. #endif