diff options
Diffstat (limited to 'Swiftob')
-rw-r--r-- | Swiftob/MUCs.cpp | 2 | ||||
-rw-r--r-- | Swiftob/MUCs.h | 20 | ||||
-rw-r--r-- | Swiftob/SConscript | 2 | ||||
-rw-r--r-- | Swiftob/Users.cpp | 2 | ||||
-rw-r--r-- | Swiftob/Users.h | 10 |
5 files changed, 19 insertions, 17 deletions
diff --git a/Swiftob/MUCs.cpp b/Swiftob/MUCs.cpp index 5bad3a1..aec821a 100644 --- a/Swiftob/MUCs.cpp +++ b/Swiftob/MUCs.cpp @@ -17,6 +17,8 @@ #include <Swiftob/Storage.h> +using namespace Swift; + #define MUC_LIST_SETTING "muc_list" #define NICK "default_nick" diff --git a/Swiftob/MUCs.h b/Swiftob/MUCs.h index 8f56182..ecbb7a6 100644 --- a/Swiftob/MUCs.h +++ b/Swiftob/MUCs.h @@ -21,27 +21,25 @@ class MUC; class Storage; -using namespace Swift; - class MUCs { public: - MUCs(Client* client, Storage* storage); - void join(const JID& room, boost::signal<void (const std::string&)>::slot_type successCallback, boost::function<void(const std::string& /*reason*/)> failureCallback); - void part(const JID& room); - bool contains(const JID& room); - MUC::ref getMUC(const JID& room); + MUCs(Swift::Client* client, Storage* storage); + void join(const Swift::JID& room, boost::signal<void (const std::string&)>::slot_type successCallback, boost::function<void(const std::string& /*reason*/)> failureCallback); + void part(const Swift::JID& room); + bool contains(const Swift::JID& room); + Swift::MUC::ref getMUC(const Swift::JID& room); const std::string& getDefaultNick() const {return defaultNick_;} bool setDefaultNick(const std::string& nick); private: void handleConnected(); - void handleJoinFailed(const JID& room, ErrorPayload::ref error, boost::function<void(const std::string& /*reason*/)> failureCallback); + void handleJoinFailed(const Swift::JID& room, Swift::ErrorPayload::ref error, boost::function<void(const std::string& /*reason*/)> failureCallback); void handleInitialJoinSuccess(); void handleInitialJoinFailure(const std::string&); void save(); private: - MUCRegistry registry_; - std::map<JID, MUC::ref> mucs_; - Client* client_; + Swift::MUCRegistry registry_; + std::map<Swift::JID, Swift::MUC::ref> mucs_; + Swift::Client* client_; Storage* storage_; std::string defaultNick_; }; diff --git a/Swiftob/SConscript b/Swiftob/SConscript index b53057c..4f6464a 100644 --- a/Swiftob/SConscript +++ b/Swiftob/SConscript @@ -3,6 +3,8 @@ Import("env") if env["SCONS_STAGE"] == "build": myenv = env.Clone() + # Too many compile warnings here at the moment + myenv.Replace(CXXFLAGS = [flag for flag in env["CXXFLAGS"] if flag != "-Weverything"]) myenv.UseFlags(myenv.get("LUA_FLAGS", {})) myenv.UseFlags(myenv["SWIFTEN_FLAGS"]) myenv.UseFlags(myenv["SWIFTEN_DEP_FLAGS"]) diff --git a/Swiftob/Users.cpp b/Swiftob/Users.cpp index 09173cc..868efb0 100644 --- a/Swiftob/Users.cpp +++ b/Swiftob/Users.cpp @@ -13,6 +13,8 @@ #include <Swiftob/MUCs.h> +using namespace Swift; + Users::Users(Client* client, MUCs* mucs) { client_ = client; mucs_ = mucs; diff --git a/Swiftob/Users.h b/Swiftob/Users.h index 0acc330..a78beed 100644 --- a/Swiftob/Users.h +++ b/Swiftob/Users.h @@ -18,15 +18,13 @@ class Client; class MUCs; -using namespace Swift; - class Users { public: class User { public: /* If you add a role here, edit the role lists in Commands.cpp*/ enum Role {Unknown, Owner}; - User(const JID& jid, Role role) : jid_(jid), role_(role) {} + User(const Swift::JID& jid, Role role) : jid_(jid), role_(role) {} Role getRole() {return role_;} Swift::JID getJID() {return jid_;} private: @@ -35,14 +33,14 @@ class Users { }; public: - Users(Client* client, MUCs* mucs); + Users(Swift::Client* client, MUCs* mucs); void clearAll(); void addUser(const User& user); - User::Role getRoleForSender(Message::ref message); + User::Role getRoleForSender(Swift::Message::ref message); private: std::vector<User> users_; - Client* client_; + Swift::Client* client_; MUCs* mucs_; }; |