MumbleChannelJoiner.hpp 873 B

123456789101112131415161718192021222324252627282930313233
  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. void joinOtherChannel(mumble::MumbleCommunicator *mc, std::string channelNameRegex);
  20. private:
  21. log4cpp::Category &logger;
  22. boost::regex channelNameRegex;
  23. int channel_id;
  24. static std::vector<ChannelEntry> channels;
  25. };
  26. }