MumbleChannelJoiner.hpp 780 B

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #include <boost/noncopyable.hpp>
  3. #include <log4cpp/Category.hh>
  4. #include <vector>
  5. #include <string>
  6. #include <boost/regex.hpp>
  7. #include "MumbleCommunicator.hpp"
  8. namespace mumble {
  9. class MumbleChannelJoiner : boost::noncopyable {
  10. struct ChannelEntry {
  11. int id;
  12. std::string name;
  13. };
  14. public:
  15. MumbleChannelJoiner(std::string channelNameRegex);
  16. void checkChannel(std::string channel_name, int channel_id);
  17. void maybeJoinChannel(mumble::MumbleCommunicator *mc);
  18. void findJoinChannel(mumble::MumbleCommunicator *mc);
  19. private:
  20. log4cpp::Category &logger;
  21. boost::regex channelNameRegex;
  22. int channel_id;
  23. static std::vector<ChannelEntry> channels;
  24. };
  25. }