ObjXMPP  Check-in [4d52c6bfc6]

Overview
Comment:Fix argument checking for XMPPDiscoEntity
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 4d52c6bfc68fdaeb9b0028b5b46f0a39e5ac0cc277c47cca67a22ca4644d57e1
User & Date: florob@babelmonkeys.de on 2013-07-01 20:07:51
Other Links: manifest | tags
Context
2013-07-01
20:33
Coding style. check-in: bf1be4f266 user: js tags: trunk
20:07
Fix argument checking for XMPPDiscoEntity check-in: 4d52c6bfc6 user: florob@babelmonkeys.de tags: trunk
2013-06-23
21:41
Use instancetype. check-in: 049768c6ae user: js tags: trunk
Changes

Modified src/XMPPDiscoNode.h from [eb39176956] to [fef10c1504].

71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
 * \param JID The JID this node lives on
 * \param node The node's opaque name
 * \param name The node's human friendly name
 * \return A new autoreleased XMPPDiscoNode
 */
+ (instancetype)discoNodeWithJID: (XMPPJID*)JID
			    node: (OFString*)node
	      name: (OFString*)name;

/**
 * \brief Initializes an already allocated XMPPDiscoNode with the specified
 *	  JID and node
 *
 * \param JID The JID this node lives on
 * \param node The node's opaque name







|







71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
 * \param JID The JID this node lives on
 * \param node The node's opaque name
 * \param name The node's human friendly name
 * \return A new autoreleased XMPPDiscoNode
 */
+ (instancetype)discoNodeWithJID: (XMPPJID*)JID
			    node: (OFString*)node
			    name: (OFString*)name;

/**
 * \brief Initializes an already allocated XMPPDiscoNode with the specified
 *	  JID and node
 *
 * \param JID The JID this node lives on
 * \param node The node's opaque name

Modified src/XMPPDiscoNode.m from [262be970dc] to [b7adfdbf3f].

19
20
21
22
23
24
25

26
27
28
29
30
31
32
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

#import "XMPPConnection.h"
#import "XMPPIQ.h"
#import "XMPPJID.h"

#import "XMPPDiscoNode.h"
#import "XMPPDiscoIdentity.h"
#import "namespaces.h"

@implementation XMPPDiscoNode
+ (instancetype)discoNodeWithJID: (XMPPJID*)JID
			    node: (OFString*)node;







>







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

#import "XMPPConnection.h"
#import "XMPPIQ.h"
#import "XMPPJID.h"
#import "XMPPDiscoEntity.h"
#import "XMPPDiscoNode.h"
#import "XMPPDiscoIdentity.h"
#import "namespaces.h"

@implementation XMPPDiscoNode
+ (instancetype)discoNodeWithJID: (XMPPJID*)JID
			    node: (OFString*)node;
56
57
58
59
60
61
62
63

64
65
66
67
68
69
70
- initWithJID: (XMPPJID*)JID
	 node: (OFString*)node
	 name: (OFString*)name
{
	self = [super init];

	@try {
		if (JID == nil)

			@throw [OFInvalidArgumentException exception];

		_JID = [JID copy];
		_node = [node copy];
		_name = [name copy];
		_identities = [OFSortedList new];
		_features = [OFSortedList new];







|
>







57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
- initWithJID: (XMPPJID*)JID
	 node: (OFString*)node
	 name: (OFString*)name
{
	self = [super init];

	@try {
		if ((JID == nil) &&
		    ![self isKindOfClass: [XMPPDiscoEntity class]])
			@throw [OFInvalidArgumentException exception];

		_JID = [JID copy];
		_node = [node copy];
		_name = [name copy];
		_identities = [OFSortedList new];
		_features = [OFSortedList new];