001/** 002 * 003 * Copyright 2019 Florian Schmaus 004 * 005 * Licensed under the Apache License, Version 2.0 (the "License"); 006 * you may not use this file except in compliance with the License. 007 * You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.jivesoftware.smack.packet; 018 019public interface PresenceView extends StanzaView { 020 021 /** 022 * Returns the type of this presence stanza. 023 * 024 * @return the type of the presence stanza. 025 */ 026 Presence.Type getType(); 027 028 /** 029 * Returns the status message of the presence update, or <code>null</code> if there 030 * is not a status. The status is free-form text describing a user's presence 031 * (i.e., "gone to lunch"). 032 * 033 * @return the status message. 034 */ 035 String getStatus(); 036 037 /** 038 * Returns the priority of the presence. 039 * 040 * @return the priority. 041 * @see <a href="https://tools.ietf.org/html/rfc6121#section-4.7.2.3">RFC 6121 § 4.7.2.3. Priority Element</a> 042 */ 043 int getPriority(); 044 045 /** 046 * Returns the priority of the presence. 047 * 048 * @return the priority. 049 * @see <a href="https://tools.ietf.org/html/rfc6121#section-4.7.2.3">RFC 6121 § 4.7.2.3. Priority Element</a> 050 */ 051 byte getPriorityByte(); 052 053 /** 054 * Returns the mode of the presence update. 055 * 056 * @return the mode. 057 */ 058 Presence.Mode getMode(); 059}