NCClientInterface.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /**
  2. * Copyright (c) 2015 ownCloud GmbH. All rights reserved.
  3. *
  4. * This library is free software; you can redistribute it and/or modify it under
  5. * the terms of the GNU Lesser General Public License as published by the Free
  6. * Software Foundation; version 2.1 of the License
  7. *
  8. * This library is distributed in the hope that it will be useful, but WITHOUT
  9. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  10. * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
  11. * details.
  12. */
  13. /**
  14. * Copyright (c) 2014 ownCloud GmbH. All rights reserved.
  15. *
  16. * This library is free software; you can redistribute it and/or modify it under
  17. * the terms of the GNU Lesser General Public License as published by the Free
  18. * Software Foundation; version 2.1 of the License
  19. *
  20. * This library is distributed in the hope that it will be useful, but WITHOUT
  21. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  22. * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
  23. * details.
  24. */
  25. #ifndef AbstractSocketHandler_H
  26. #define AbstractSocketHandler_H
  27. #pragma once
  28. #include <string>
  29. #include <vector>
  30. #include <unordered_map>
  31. #include <queue>
  32. #include <thread>
  33. #include <mutex>
  34. #include <atomic>
  35. #include <condition_variable>
  36. class CommunicationSocket;
  37. class NCClientInterface
  38. {
  39. public:
  40. struct ContextMenuInfo {
  41. std::vector<std::wstring> watchedDirectories;
  42. std::wstring contextMenuTitle;
  43. struct MenuItem
  44. {
  45. std::wstring command, flags, title;
  46. };
  47. std::vector<MenuItem> menuItems;
  48. };
  49. static ContextMenuInfo FetchInfo(const std::wstring &files);
  50. static void SendRequest(const wchar_t *verb, const std::wstring &path);
  51. };
  52. #endif //ABSTRACTSOCKETHANDLER_H