TeBkRestController.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * TeBkRestController.h
  3. *
  4. * Created on: 11-Mar-2015
  5. * Author: sumeetc
  6. */
  7. #ifndef TEBKRESTCONTROLLER_H_
  8. #define TEBKRESTCONTROLLER_H_
  9. #include "TeBkWorld.h"
  10. #include "vector"
  11. #include "CastUtil.h"
  12. #include "TeBkMessage.h"
  13. #include "DataSourceManager.h"
  14. #include <stdlib.h>
  15. #pragma @RestController path="/"
  16. class TeBkRestController {
  17. public:
  18. #pragma @GET path="/json" statusCode="200" ocontentType="application/json"
  19. TeBkMessage json();
  20. #pragma @GET path="/db" statusCode="200" ocontentType="application/json"
  21. TeBkWorld db();
  22. #pragma @GET path="/queries" statusCode="200" ocontentType="application/json"
  23. std::vector<TeBkWorld> queries(
  24. #pragma @QueryParam name="queries"
  25. std::string queries);
  26. #pragma @GET path="/updates" statusCode="200" ocontentType="application/json"
  27. std::vector<TeBkWorld> updates(
  28. #pragma @QueryParam name="queries"
  29. std::string queries);
  30. #pragma @GET path="/plaintext" statusCode="200" ocontentType="text/plain"
  31. std::string plaintext();
  32. virtual ~TeBkRestController();
  33. };
  34. #endif /* TEBKRESTCONTROLLER_H_ */