diff options
author | Tobias Markmann <tm@ayena.de> | 2013-03-08 15:17:30 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2013-03-27 14:12:26 (GMT) |
commit | 497b647fe034a3d2cdc6d75ce0ff70e3df3aaf04 (patch) | |
tree | dc81e56199f54cf20f834c78bda7fc26ffbc38f9 /Swift/Controllers/UIEvents | |
parent | 20ead0a84fdd8c9e870e98ee6a2712bfa263d7fb (diff) | |
download | swift-contrib-497b647fe034a3d2cdc6d75ce0ff70e3df3aaf04.zip swift-contrib-497b647fe034a3d2cdc6d75ce0ff70e3df3aaf04.tar.bz2 |
Adding support for Blocking Command (XEP-0191) to Swift(-en).
Change-Id: I7c92518dc389474d520d4cf96f96a11459f73d26
License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
Diffstat (limited to 'Swift/Controllers/UIEvents')
-rw-r--r-- | Swift/Controllers/UIEvents/RequestBlockListDialogUIEvent.h | 16 | ||||
-rw-r--r-- | Swift/Controllers/UIEvents/RequestChangeBlockStateUIEvent.h | 37 |
2 files changed, 53 insertions, 0 deletions
diff --git a/Swift/Controllers/UIEvents/RequestBlockListDialogUIEvent.h b/Swift/Controllers/UIEvents/RequestBlockListDialogUIEvent.h new file mode 100644 index 0000000..d29cb4f --- /dev/null +++ b/Swift/Controllers/UIEvents/RequestBlockListDialogUIEvent.h @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2013 Tobias Markmann + * Licensed under the simplified BSD license. + * See Documentation/Licenses/BSD-simplified.txt for more information. + */ + +#pragma once + +#include <Swift/Controllers/UIEvents/UIEvent.h> + +namespace Swift { + +class RequestBlockListDialogUIEvent : public UIEvent { +}; + +} diff --git a/Swift/Controllers/UIEvents/RequestChangeBlockStateUIEvent.h b/Swift/Controllers/UIEvents/RequestChangeBlockStateUIEvent.h new file mode 100644 index 0000000..9b7abcb --- /dev/null +++ b/Swift/Controllers/UIEvents/RequestChangeBlockStateUIEvent.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2013 Tobias Markmann + * Licensed under the simplified BSD license. + * See Documentation/Licenses/BSD-simplified.txt for more information. + */ + +#pragma once + +#include <Swift/Controllers/UIEvents/UIEvent.h> + +#include <Swiften/JID/JID.h> + +namespace Swift { + +class RequestChangeBlockStateUIEvent : public UIEvent { + public: + enum BlockState { + Blocked, + Unblocked + }; + + public: + RequestChangeBlockStateUIEvent(BlockState newState, const JID& contact) : state_(newState), contact_(contact) {} + + BlockState getBlockState() const { + return state_; + } + + JID getContact() const { + return contact_; + } + private: + BlockState state_; + JID contact_; +}; + +} |