ObjXMPP  Check-in [d75ffa4c2e]

Overview
Comment:Implement -initWithElement: for XMPPPresence
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d75ffa4c2ec8fabce7582172ead9d0fb501fc253f2bec88d5c7eccef879cd8a8
User & Date: florob@babelmonkeys.de on 2013-01-29 19:46:58
Other Links: manifest | tags
Context
2013-01-31
14:16
Never send starttls when the connection is already encrypted check-in: bef8950d92 user: florob@babelmonkeys.de tags: trunk
2013-01-29
19:46
Implement -initWithElement: for XMPPPresence check-in: d75ffa4c2e user: florob@babelmonkeys.de tags: trunk
2013-01-27
17:01
Add XMPPContact{,Manager} for tracking contacts check-in: fc38b1287a user: florob@babelmonkeys.de tags: trunk
Changes

Modified src/XMPPPresence.m from [c812c30fb1] to [b650ac13b8].

86
87
88
89
90
91
92





























93
94
95
96
97
98
99
- initWithType: (OFString*)type_
	    ID: (OFString*)ID_
{
	return [super initWithName: @"presence"
			      type: type_
				ID: ID_];
}






























- (void)dealloc
{
	[status release];
	[show release];
	[priority release];








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







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
120
121
122
123
124
125
126
127
128
- initWithType: (OFString*)type_
	    ID: (OFString*)ID_
{
	return [super initWithName: @"presence"
			      type: type_
				ID: ID_];
}

- initWithElement: (OFXMLElement*)element
{
	self = [super initWithElement: element];

	@try {
		OFXMLElement *subElement;

		if ((subElement = [element elementForName: @"show"
						namespace: XMPP_NS_CLIENT]))
			[self setShow: [subElement stringValue]];

		if ((subElement = [element elementForName: @"status"
						namespace: XMPP_NS_CLIENT]))
			[self setStatus: [subElement stringValue]];

		if ((subElement = [element elementForName: @"priority"
						namespace: XMPP_NS_CLIENT]))
			[self setPriority:
			    [OFNumber numberWithIntMax:
				[[subElement stringValue] decimalValue]]];
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}


- (void)dealloc
{
	[status release];
	[show release];
	[priority release];