diff options
Diffstat (limited to 'src/com/isode/stroke/elements/ChatState.java')
-rw-r--r-- | src/com/isode/stroke/elements/ChatState.java | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/com/isode/stroke/elements/ChatState.java b/src/com/isode/stroke/elements/ChatState.java new file mode 100644 index 0000000..151eec4 --- /dev/null +++ b/src/com/isode/stroke/elements/ChatState.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2010 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. + */ +/* + * Copyright (c) 2015 Tarun Gupta. + * Licensed under the simplified BSD license. + * See Documentation/Licenses/BSD-simplified.txt for more information. + */ + +package com.isode.stroke.elements; + +import com.isode.stroke.base.NotNull; +import com.isode.stroke.elements.Payload; + +public class ChatState extends Payload { + + public enum ChatStateType {Active, Composing, Paused, Inactive, Gone}; + + private ChatStateType state_; + + /** + * ChatState(); + */ + public ChatState() { + state_ = ChatStateType.Active; + } + + /** + * ChatState(state); + */ + public ChatState(ChatStateType state) { + NotNull.exceptIfNull(state, "state"); + state_ = state; + } + + /** + * + * @return state, notnull. + */ + public ChatStateType getChatState() { + return state_; + } + + /** + * + * @param state, notnull. + */ + public void setChatState(ChatStateType state) { + NotNull.exceptIfNull(state, "state"); + state_ = state; + } +}
\ No newline at end of file |