refactor(network): const methods

This commit is contained in:
Alex
2019-05-22 22:20:50 +02:00
parent 755d38d4d6
commit 85d60f95c4
2 changed files with 29 additions and 25 deletions

View File

@ -30,24 +30,24 @@ class Network : public ALabel {
void worker();
void createInfoSocket();
void createEventSocket();
int getExternalInterface(int skip_idx = -1);
int getExternalInterface(int skip_idx = -1) const;
void getInterfaceAddress();
int netlinkRequest(void*, uint32_t, uint32_t groups = 0);
int netlinkResponse(void*, uint32_t, uint32_t groups = 0);
int netlinkRequest(void*, uint32_t, uint32_t groups = 0) const;
int netlinkResponse(void*, uint32_t, uint32_t groups = 0) const;
void parseEssid(struct nlattr**);
void parseSignal(struct nlattr**);
void parseFreq(struct nlattr**);
bool associatedOrJoined(struct nlattr**);
bool checkInterface(struct ifinfomsg *rtif, std::string name);
int getPreferredIface(int skip_idx = -1);
bool checkInterface(struct ifinfomsg* rtif, std::string name);
int getPreferredIface(int skip_idx = -1) const;
auto getInfo() -> void;
void clearIface();
bool wildcardMatch(const std::string& pattern, const std::string& text);
bool wildcardMatch(const std::string& pattern, const std::string& text) const;
waybar::util::SleeperThread thread_;
waybar::util::SleeperThread thread_timer_;
int ifid_;
int last_ext_iface_;
mutable int last_ext_iface_;
sa_family_t family_;
struct sockaddr_nl nladdr_ = {0};
struct nl_sock* sock_ = nullptr;