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 | 8 | ||||
| -rw-r--r-- | Swiftob/Users.cpp | 2 | ||||
| -rw-r--r-- | Swiftob/Users.h | 10 | 
5 files changed, 22 insertions, 20 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 bb056bb..4f6464a 100644 --- a/Swiftob/SConscript +++ b/Swiftob/SConscript @@ -3,9 +3,11 @@ Import("env")  if env["SCONS_STAGE"] == "build":  	myenv = env.Clone() -	myenv.MergeFlags(myenv.get("LUA_FLAGS", {})) -	myenv.MergeFlags(myenv["SWIFTEN_FLAGS"]) -	myenv.MergeFlags(myenv["SWIFTEN_DEP_FLAGS"]) +	# 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"])  	sources = [  		"linit.cpp",  		"Swiftob.cpp", 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_;  }; | 
 Swift
 Swift