• Main Page
  • Classes
  • Files
  • File List

Swiften/Elements/WhiteboardPayload.h

00001 /*
00002  * Copyright (c) 2012 Mateusz Piękos
00003  * Licensed under the simplified BSD license.
00004  * See Documentation/Licenses/BSD-simplified.txt for more information.
00005  */
00006 
00007 #pragma once
00008 
00009 #include <string>
00010 
00011 #include <Swiften/Elements/Payload.h>
00012 #include <Swiften/Elements/Whiteboard/WhiteboardElement.h>
00013 #include <Swiften/Elements/Whiteboard/WhiteboardOperation.h>
00014 
00015 namespace Swift {
00016   class WhiteboardPayload : public Payload {
00017   public:
00018     typedef boost::shared_ptr<WhiteboardPayload> ref;
00019 
00020   public:
00021     enum Type {UnknownType, Data, SessionRequest, SessionAccept, SessionTerminate};
00022 
00023     WhiteboardPayload(Type type = WhiteboardPayload::Data) : type_(type) {
00024     }
00025 
00026     void setData(const std::string &data) {
00027       data_ = data;
00028     }
00029 
00030     std::string getData() const {
00031       return data_;
00032     }
00033 
00034     Type getType() const {
00035       return type_;
00036     }
00037 
00038     void setType(Type type) {
00039       type_ = type;
00040     }
00041 
00042     WhiteboardElement::ref getElement() const {
00043       return element_;
00044     }
00045 
00046     void setElement(WhiteboardElement::ref element) {
00047       element_ = element;
00048     }
00049 
00050     WhiteboardOperation::ref getOperation() const {
00051       return operation_;
00052     }
00053 
00054     void setOperation(WhiteboardOperation::ref operation) {
00055       operation_ = operation;
00056     }
00057 
00058   private:
00059     std::string data_;
00060     Type type_;
00061     WhiteboardElement::ref element_;
00062     WhiteboardOperation::ref operation_;
00063   };
00064 }

Generated on Fri Oct 12 2012 21:00:19 for Swiften by  doxygen 1.7.1