ObjXMPP  Diff

Differences From Artifact [3d03c9db92]:

To Artifact [0497c404f5]:


19
20
21
22
23
24
25


26
27
28
29
30
31
32
33
34





35
36
37
38

39
40
41
42
43

44
45
46
47
48

49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

64
65
66
67
68
69
70
71

72
73
74
75
76
77
78
79
80
81
82


83
84
85
86
87
88
89
90

91
92
93
94
95
96
97
98

99
100
101
102
103
104
105
106
107
108
109


110


19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44

45
46
47
48
49

50
51
52
53
54

55
56
57
58
59
60
61
62
63
64
65
66
67
68
69

70
71
72
73
74
75
76
77

78
79
80
81
82
83
84
85
86
87


88
89
90
91
92
93
94
95
96

97
98
99
100
101
102
103
104

105
106
107
108
109
110
111
112
113
114


115
116
117
118
119







+
+









+
+
+
+
+



-
+




-
+




-
+














-
+







-
+









-
-
+
+







-
+







-
+









-
-
+
+

+
+
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

#import "XMPPStanza.h"

OF_ASSUME_NONNULL_BEGIN

/**
 * \brief A class describing a presence stanza.
 */
@interface XMPPPresence: XMPPStanza <OFComparing>
{
	OFString *_status, *_show;
	OFNumber *_priority;
}

/**
 * The value of the stanza's type attribute.
 */
@property OF_NULL_RESETTABLE_PROPERTY (nonatomic, copy) OFString *type;

/**
 * The text content of the status element.
 */
@property (copy) OFString *status;
@property OF_NULLABLE_PROPERTY (nonatomic, copy) OFString *status;

/**
 * The text content of the show element of the presence stanza.
 */
@property (copy) OFString *show;
@property OF_NULLABLE_PROPERTY (nonatomic, copy) OFString *show;

/**
 * The numeric content of the priority element.
 */
@property (copy) OFNumber *priority;
@property OF_NULLABLE_PROPERTY (nonatomic, copy) OFNumber *priority;

/**
 * \brief Creates a new autoreleased XMPPPresence.
 *
 * \return A new autoreleased XMPPPresence
 */
+ (instancetype)presence;

/**
 * \brief Creates a new autoreleased XMPPPresence with the specified ID.
 *
 * \param ID The value for the stanza's id attribute
 * \return A new autoreleased XMPPPresence
 */
+ (instancetype)presenceWithID: (OFString*)ID;
+ (instancetype)presenceWithID: (nullable OFString *)ID;

/**
 * \brief Creates a new autoreleased XMPPPresence with the specified type.
 *
 * \param type The value for the stanza's type attribute
 * \return A new autoreleased XMPPPresence
 */
+ (instancetype)presenceWithType: (OFString*)type;
+ (instancetype)presenceWithType: (nullable OFString *)type;

/**
 * \brief Creates a new autoreleased XMPPPresence with the specified type and
 *	  ID.
 *
 * \param type The value for the stanza's type attribute
 * \param ID The value for the stanza's id attribute
 * \return A new autoreleased XMPPPresence
 */
+ (instancetype)presenceWithType: (OFString*)type
			      ID: (OFString*)ID;
+ (instancetype)presenceWithType: (nullable OFString *)type
			      ID: (nullable OFString *)ID;

/**
 * \brief Initializes an already allocated XMPPPresence with the specified ID.
 *
 * \param ID The value for the stanza's id attribute
 * \return A initialized XMPPPresence
 */
- initWithID: (OFString*)ID;
- initWithID: (nullable OFString *)ID;

/**
 * \brief Initializes an already allocated XMPPPresence with the specified type.
 *
 * \param type The value for the stanza's type attribute
 * \return A initialized XMPPPresence
 */
- initWithType: (OFString*)type;
- initWithType: (nullable OFString *)type;

/**
 * \brief Initializes an already allocated XMPPPresence with the specified type
 *	  and ID.
 *
 * \param type The value for the stanza's type attribute
 * \param ID The value for the stanza's id attribute
 * \return A initialized XMPPPresence
 */
- initWithType: (OFString*)type
	    ID: (OFString*)ID;
- initWithType: (nullable OFString *)type
	    ID: (nullable OFString *)ID;
@end

OF_ASSUME_NONNULL_END