StropheCappuccino API 1.0.0
/tmp/tempDoc.doc/Build/StropheCappuccino.build/Release/Browser.environment/Sources/TNStropheServerAdministration.j
Go to the documentation of this file.
00001 @STATIC;1.0;I;23;Foundation/Foundation.ji;28;Resources/Strophe/strophe.jsi;21;TNStropheConnection.ji;14;TNStropheJID.jt;23998;objj_executeFile("Foundation/Foundation.j", NO);objj_executeFile("Resources/Strophe/strophe.js", YES);objj_executeFile("TNStropheConnection.j", YES);objj_executeFile("TNStropheJID.j", YES);TNStropheServerAdministrationGetConnectedUserNotification = "TNStropheServerAdministrationGetConnectedUserNotification";
00002 TNStropheServerAdministrationGetRegisteredUserNotification = "TNStropheServerAdministrationGetRegisteredUserNotification";
00003 TNStropheServerAdministrationRegisterUserNotification = "TNStropheServerAdministrationRegisterUserNotification";
00004 TNStropheServerAdministrationSendAnnouncementNotification = "TNStropheServerAdministrationSendAnnouncementNotification";
00005 TNStropheServerAdministrationSetUserEnabledNotification = "TNStropheServerAdministrationSetUserEnabledNotification";
00006 TNStropheServerAdministrationUnregisterUserNotification = "TNStropheServerAdministrationUnregisterUserNotification";
00007 {var the_class = objj_allocateClassPair(CPObject, "TNStropheServerAdministration"),
00008 meta_class = the_class.isa;class_addIvars(the_class, [new objj_ivar("_connection"), new objj_ivar("_server"), new objj_ivar("_delegate")]);objj_registerClassPair(the_class);
00009 class_addMethods(the_class, [new objj_method(sel_getUid("connection"), function $TNStropheServerAdministration__connection(self, _cmd)
00010 {
00011     return self._connection;
00012 }
00013 ,["TNStropheConnection"]), new objj_method(sel_getUid("setConnection:"), function $TNStropheServerAdministration__setConnection_(self, _cmd, newValue)
00014 {
00015     self._connection = newValue;
00016 }
00017 ,["void","TNStropheConnection"]), new objj_method(sel_getUid("server"), function $TNStropheServerAdministration__server(self, _cmd)
00018 {
00019     return self._server;
00020 }
00021 ,["TNStropheJID"]), new objj_method(sel_getUid("setServer:"), function $TNStropheServerAdministration__setServer_(self, _cmd, newValue)
00022 {
00023     self._server = newValue;
00024 }
00025 ,["void","TNStropheJID"]), new objj_method(sel_getUid("delegate"), function $TNStropheServerAdministration__delegate(self, _cmd)
00026 {
00027     return self._delegate;
00028 }
00029 ,["id"]), new objj_method(sel_getUid("setDelegate:"), function $TNStropheServerAdministration__setDelegate_(self, _cmd, newValue)
00030 {
00031     self._delegate = newValue;
00032 }
00033 ,["void","id"]), new objj_method(sel_getUid("initWithConnection:server:"), function $TNStropheServerAdministration__initWithConnection_server_(self, _cmd, aConnection, aServer)
00034 {
00035     if (self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("TNStropheServerAdministration").super_class }, "init"))
00036     {
00037         self._connection = aConnection;
00038         self._server = aServer;
00039     }
00040     return self;
00041 }
00042 ,["id","TNStropheConnection","TNStropheJID"]), new objj_method(sel_getUid("sendAction:selector:"), function $TNStropheServerAdministration__sendAction_selector_(self, _cmd, anAction, aSelector)
00043 {
00044     var uid = ((___r1 = self._connection), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "getUniqueId")),
00045         stanza = TNStropheStanza.isa.objj_msgSend1(TNStropheStanza, "iqWithAttributes:", {"id": uid, "type": "set"}),
00046         params = CPDictionary.isa.objj_msgSend2(CPDictionary, "dictionaryWithObjectsAndKeys:", uid, "id");
00047     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "setTo:", self._server));
00048     (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "command", {"xmlns": Strophe.NS.COMMAND, "action": "execute", "node": anAction}));
00049     ((___r1 = self._connection), ___r1 == null ? null : ___r1.isa.objj_msgSend3(___r1, "registerSelector:ofObject:withDict:", aSelector, self, params));
00050     ((___r1 = self._connection), ___r1 == null ? null : ___r1.isa.objj_msgSend1(___r1, "send:", stanza));
00051     var ___r1;
00052 }
00053 ,["void","CPString","SEL"]), new objj_method(sel_getUid("sendAnnouncement:subject:"), function $TNStropheServerAdministration__sendAnnouncement_subject_(self, _cmd, anAnnouncement, aSubject)
00054 {
00055     var uid = ((___r1 = self._connection), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "getUniqueId")),
00056         stanza = TNStropheStanza.isa.objj_msgSend1(TNStropheStanza, "iqWithAttributes:", {"id": uid, "type": "set"}),
00057         params = CPDictionary.isa.objj_msgSend2(CPDictionary, "dictionaryWithObjectsAndKeys:", uid, "id");
00058     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "setTo:", self._server));
00059     (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "command", {"xmlns": Strophe.NS.COMMAND, "node": "http://jabber.org/protocol/admin#announce"}));
00060     (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "x", {"xmlns": "jabber:x:data", "type": "submit"}));
00061     (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "field", {"type": "hidden", "var": "FORM_TYPE"}));
00062     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addChildWithName:", "value"));
00063     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addTextNode:", "http://jabber.org/protocol/admin"));
00064     (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00065     (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00066     if (aSubject)
00067     {
00068         (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "field", {"var": "subject"}));
00069         (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addChildWithName:", "value"));
00070         (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addTextNode:", aSubject));
00071         (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00072         (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00073     }
00074     (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "field", {"var": "body"}));
00075     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addChildWithName:", "value"));
00076     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addTextNode:", anAnnouncement));
00077     ((___r1 = self._connection), ___r1 == null ? null : ___r1.isa.objj_msgSend3(___r1, "registerSelector:ofObject:withDict:", sel_getUid("_didSendAnnouncement:"), self, params));
00078     ((___r1 = self._connection), ___r1 == null ? null : ___r1.isa.objj_msgSend1(___r1, "send:", stanza));
00079     var ___r1;
00080 }
00081 ,["void","CPString","CPString"]), new objj_method(sel_getUid("_didSendAnnouncement:"), function $TNStropheServerAdministration___didSendAnnouncement_(self, _cmd, aStanza)
00082 {
00083     if (self._delegate && ((___r1 = self._delegate), ___r1 == null ? null : ___r1.isa.objj_msgSend1(___r1, "respondsToSelector:", sel_getUid("serverAdmin:didSendAnnouncement:"))))
00084         ((___r1 = self._delegate), ___r1 == null ? null : ___r1.isa.objj_msgSend2(___r1, "serverAdmin:didSendAnnouncement:", self, aStanza));
00085     else
00086         ((___r1 = CPNotificationCenter.isa.objj_msgSend0(CPNotificationCenter, "defaultCenter")), ___r1 == null ? null : ___r1.isa.objj_msgSend3(___r1, "postNotificationName:object:userInfo:", TNStropheServerAdministrationSendAnnouncementNotification, self, aStanza));
00087     var ___r1;
00088 }
00089 ,["void","TNStropheStanza"]), new objj_method(sel_getUid("registeredUsers"), function $TNStropheServerAdministration__registeredUsers(self, _cmd)
00090 {
00091     self.isa.objj_msgSend2(self, "sendAction:selector:", "http://jabber.org/protocol/admin#get-registered-users-list", sel_getUid("_didGetRegisteredUsers:"));
00092 }
00093 ,["void"]), new objj_method(sel_getUid("_didGetRegisteredUsers:"), function $TNStropheServerAdministration___didGetRegisteredUsers_(self, _cmd, aStanza)
00094 {
00095     if (self._delegate && ((___r1 = self._delegate), ___r1 == null ? null : ___r1.isa.objj_msgSend1(___r1, "respondsToSelector:", sel_getUid("serverAdmin:didGetRegisteredUsers:"))))
00096         ((___r1 = self._delegate), ___r1 == null ? null : ___r1.isa.objj_msgSend2(___r1, "serverAdmin:didGetRegisteredUsers:", self, aStanza));
00097     else
00098         ((___r1 = CPNotificationCenter.isa.objj_msgSend0(CPNotificationCenter, "defaultCenter")), ___r1 == null ? null : ___r1.isa.objj_msgSend3(___r1, "postNotificationName:object:userInfo:", TNStropheServerAdministrationGetRegisteredUserNotification, self, aStanza));
00099     var ___r1;
00100 }
00101 ,["void","TNStropheStanza"]), new objj_method(sel_getUid("connectedUsers"), function $TNStropheServerAdministration__connectedUsers(self, _cmd)
00102 {
00103     self.isa.objj_msgSend2(self, "sendAction:selector:", "http://jabber.org/protocol/admin#get-online-users-list", sel_getUid("_didGetConnectedUsers:"));
00104 }
00105 ,["void"]), new objj_method(sel_getUid("_didGetConnectedUsers:"), function $TNStropheServerAdministration___didGetConnectedUsers_(self, _cmd, aStanza)
00106 {
00107     if (self._delegate && ((___r1 = self._delegate), ___r1 == null ? null : ___r1.isa.objj_msgSend1(___r1, "respondsToSelector:", sel_getUid("serverAdmin:didGetConnectedUsers:"))))
00108         ((___r1 = self._delegate), ___r1 == null ? null : ___r1.isa.objj_msgSend2(___r1, "serverAdmin:didGetConnectedUsers:", self, aStanza));
00109     else
00110         ((___r1 = CPNotificationCenter.isa.objj_msgSend0(CPNotificationCenter, "defaultCenter")), ___r1 == null ? null : ___r1.isa.objj_msgSend3(___r1, "postNotificationName:object:userInfo:", TNStropheServerAdministrationGetConnectedUserNotification, self, aStanza));
00111     var ___r1;
00112 }
00113 ,["void","TNStropheStanza"]), new objj_method(sel_getUid("registerUser:password:name:surname:email:"), function $TNStropheServerAdministration__registerUser_password_name_surname_email_(self, _cmd, aJID, aPassword, aName, aSurname, anEmail)
00114 {
00115     var uid = ((___r1 = self._connection), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "getUniqueId")),
00116         stanza = TNStropheStanza.isa.objj_msgSend1(TNStropheStanza, "iqWithAttributes:", {"id": uid, "type": "set"}),
00117         params = CPDictionary.isa.objj_msgSend2(CPDictionary, "dictionaryWithObjectsAndKeys:", uid, "id");
00118     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "setTo:", self._server));
00119     (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "command", {"xmlns": Strophe.NS.COMMAND, "node": "http://jabber.org/protocol/admin#add-user"}));
00120     (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "x", {"xmlns": "jabber:x:data", "type": "submit"}));
00121     (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "field", {"type": "hidden", "var": "FORM_TYPE"}));
00122     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addChildWithName:", "value"));
00123     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addTextNode:", "http://jabber.org/protocol/admin"));
00124     (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00125     (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00126     (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "field", {"var": "accountjid"}));
00127     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addChildWithName:", "value"));
00128     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addTextNode:", (aJID == null ? null : aJID.isa.objj_msgSend0(aJID, "bare"))));
00129     (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00130     (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00131     (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "field", {"var": "password"}));
00132     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addChildWithName:", "value"));
00133     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addTextNode:", aPassword));
00134     (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00135     (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00136     (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "field", {"var": "password-verify"}));
00137     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addChildWithName:", "value"));
00138     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addTextNode:", aPassword));
00139     (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00140     (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00141     (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "field", {"var": "email"}));
00142     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addChildWithName:", "value"));
00143     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addTextNode:", anEmail));
00144     (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00145     (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00146     (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "field", {"var": "given_name"}));
00147     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addChildWithName:", "value"));
00148     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addTextNode:", aName));
00149     (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00150     (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00151     (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "field", {"var": "surname"}));
00152     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addChildWithName:", "value"));
00153     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addTextNode:", aSurname));
00154     (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00155     (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00156     ((___r1 = self._connection), ___r1 == null ? null : ___r1.isa.objj_msgSend3(___r1, "registerSelector:ofObject:withDict:", sel_getUid("_didRegisterUser:"), self, params));
00157     ((___r1 = self._connection), ___r1 == null ? null : ___r1.isa.objj_msgSend1(___r1, "send:", stanza));
00158     var ___r1;
00159 }
00160 ,["void","TNStropheJID","CPString","CPString","CPString","CPString"]), new objj_method(sel_getUid("_didRegisterUser:"), function $TNStropheServerAdministration___didRegisterUser_(self, _cmd, aStanza)
00161 {
00162     if (self._delegate && ((___r1 = self._delegate), ___r1 == null ? null : ___r1.isa.objj_msgSend1(___r1, "respondsToSelector:", sel_getUid("serverAdmin:didRegisterUser:"))))
00163         ((___r1 = self._delegate), ___r1 == null ? null : ___r1.isa.objj_msgSend2(___r1, "serverAdmin:didRegisterUser:", self, aStanza));
00164     else
00165         ((___r1 = CPNotificationCenter.isa.objj_msgSend0(CPNotificationCenter, "defaultCenter")), ___r1 == null ? null : ___r1.isa.objj_msgSend3(___r1, "postNotificationName:object:userInfo:", TNStropheServerAdministrationRegisterUserNotification, self, aStanza));
00166     var ___r1;
00167 }
00168 ,["void","TNStropheStanza"]), new objj_method(sel_getUid("unregisterUsers:"), function $TNStropheServerAdministration__unregisterUsers_(self, _cmd, someJIDs)
00169 {
00170     var uid = ((___r1 = self._connection), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "getUniqueId")),
00171         stanza = TNStropheStanza.isa.objj_msgSend1(TNStropheStanza, "iqWithAttributes:", {"id": uid, "type": "set"}),
00172         params = CPDictionary.isa.objj_msgSend2(CPDictionary, "dictionaryWithObjectsAndKeys:", uid, "id");
00173     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "setTo:", self._server));
00174     (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "command", {"xmlns": Strophe.NS.COMMAND, "node": "http://jabber.org/protocol/admin#delete-user"}));
00175     (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "x", {"xmlns": "jabber:x:data", "type": "submit"}));
00176     (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "field", {"type": "hidden", "var": "FORM_TYPE"}));
00177     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addChildWithName:", "value"));
00178     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addTextNode:", "http://jabber.org/protocol/admin"));
00179     (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00180     (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00181     (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "field", {"var": "accountjids"}));
00182     for (var i = 0; i < (someJIDs == null ? null : someJIDs.isa.objj_msgSend0(someJIDs, "count")); i++)
00183     {
00184         (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addChildWithName:", "value"));
00185         (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addTextNode:", ((___r1 = (someJIDs == null ? null : someJIDs.isa.objj_msgSend1(someJIDs, "objectAtIndex:", i))), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "bare"))));
00186         (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00187     }
00188     (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00189     ((___r1 = self._connection), ___r1 == null ? null : ___r1.isa.objj_msgSend3(___r1, "registerSelector:ofObject:withDict:", sel_getUid("_didUnregisterUser:"), self, params));
00190     ((___r1 = self._connection), ___r1 == null ? null : ___r1.isa.objj_msgSend1(___r1, "send:", stanza));
00191     var ___r1;
00192 }
00193 ,["void","CPArray"]), new objj_method(sel_getUid("_didUnregisterUser:"), function $TNStropheServerAdministration___didUnregisterUser_(self, _cmd, aStanza)
00194 {
00195     if (self._delegate && ((___r1 = self._delegate), ___r1 == null ? null : ___r1.isa.objj_msgSend1(___r1, "respondsToSelector:", sel_getUid("serverAdmin:didUnregisterUser:"))))
00196         ((___r1 = self._delegate), ___r1 == null ? null : ___r1.isa.objj_msgSend2(___r1, "serverAdmin:didUnregisterUser:", self, aStanza));
00197     else
00198         ((___r1 = CPNotificationCenter.isa.objj_msgSend0(CPNotificationCenter, "defaultCenter")), ___r1 == null ? null : ___r1.isa.objj_msgSend3(___r1, "postNotificationName:object:userInfo:", TNStropheServerAdministrationUnregisterUserNotification, self, aStanza));
00199     var ___r1;
00200 }
00201 ,["void","TNStropheStanza"]), new objj_method(sel_getUid("setUsers:enabled:"), function $TNStropheServerAdministration__setUsers_enabled_(self, _cmd, someJIDs, shouldEnable)
00202 {
00203     var uid = ((___r1 = self._connection), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "getUniqueId")),
00204         stanza = TNStropheStanza.isa.objj_msgSend1(TNStropheStanza, "iqWithAttributes:", {"id": uid, "type": "set"}),
00205         params = CPDictionary.isa.objj_msgSend2(CPDictionary, "dictionaryWithObjectsAndKeys:", uid, "id"),
00206         node = shouldEnable ? "http://jabber.org/protocol/admin#reenable-user" : "http://jabber.org/protocol/admin#disable-user";
00207     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "setTo:", self._server));
00208     (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "command", {"xmlns": Strophe.NS.COMMAND, "node": node}));
00209     (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "x", {"xmlns": "jabber:x:data", "type": "submit"}));
00210     (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "field", {"type": "hidden", "var": "FORM_TYPE"}));
00211     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addChildWithName:", "value"));
00212     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addTextNode:", "http://jabber.org/protocol/admin"));
00213     (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00214     (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00215     (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "field", {"var": "accountjids"}));
00216     for (var i = 0; i < (someJIDs == null ? null : someJIDs.isa.objj_msgSend0(someJIDs, "count")); i++)
00217     {
00218         (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addChildWithName:", "value"));
00219         (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "addTextNode:", ((___r1 = (someJIDs == null ? null : someJIDs.isa.objj_msgSend1(someJIDs, "objectAtIndex:", i))), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "bare"))));
00220         (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00221     }
00222     (stanza == null ? null : stanza.isa.objj_msgSend0(stanza, "up"));
00223     ((___r1 = self._connection), ___r1 == null ? null : ___r1.isa.objj_msgSend3(___r1, "registerSelector:ofObject:withDict:", sel_getUid("_didEnableUsers:"), self, params));
00224     ((___r1 = self._connection), ___r1 == null ? null : ___r1.isa.objj_msgSend1(___r1, "send:", stanza));
00225     var ___r1;
00226 }
00227 ,["void","CPArray","BOOL"]), new objj_method(sel_getUid("_didEnableUsers:"), function $TNStropheServerAdministration___didEnableUsers_(self, _cmd, aStanza)
00228 {
00229     if (self._delegate && ((___r1 = self._delegate), ___r1 == null ? null : ___r1.isa.objj_msgSend1(___r1, "respondsToSelector:", sel_getUid("serverAdmin:didEnableUsers:"))))
00230         ((___r1 = self._delegate), ___r1 == null ? null : ___r1.isa.objj_msgSend2(___r1, "serverAdmin:didEnableUsers:", self, aStanza));
00231     else
00232         ((___r1 = CPNotificationCenter.isa.objj_msgSend0(CPNotificationCenter, "defaultCenter")), ___r1 == null ? null : ___r1.isa.objj_msgSend3(___r1, "postNotificationName:object:userInfo:", TNStropheServerAdministrationSetUserEnabledNotification, self, aStanza));
00233     var ___r1;
00234 }
00235 ,["void","TNStropheStanza"])]);
00236 }{var the_class = objj_allocateClassPair(TNStropheServerAdministration, "TNStropheEjabberdAdministration"),
00237 meta_class = the_class.isa;objj_registerClassPair(the_class);
00238 class_addMethods(the_class, [new objj_method(sel_getUid("registredUsers"), function $TNStropheEjabberdAdministration__registredUsers(self, _cmd)
00239 {
00240     var uid = ((___r1 = self._connection), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "getUniqueId")),
00241         stanza = TNStropheStanza.isa.objj_msgSend1(TNStropheStanza, "iqWithAttributes:", {"id": uid, "type": "get"}),
00242         params = CPDictionary.isa.objj_msgSend2(CPDictionary, "dictionaryWithObjectsAndKeys:", uid, "id");
00243     (stanza == null ? null : stanza.isa.objj_msgSend1(stanza, "setTo:", self._server));
00244     (stanza == null ? null : stanza.isa.objj_msgSend2(stanza, "addChildWithName:andAttributes:", "query", {"xmlns": "http://jabber.org/protocol/disco#items", "node": "all users"}));
00245     ((___r1 = self._connection), ___r1 == null ? null : ___r1.isa.objj_msgSend3(___r1, "registerSelector:ofObject:withDict:", sel_getUid("_didGetRegisteredUsers:"), self, params));
00246     ((___r1 = self._connection), ___r1 == null ? null : ___r1.isa.objj_msgSend1(___r1, "send:", stanza));
00247     var ___r1;
00248 }
00249 ,["void"]), new objj_method(sel_getUid("_didGetRegisteredUsers:"), function $TNStropheEjabberdAdministration___didGetRegisteredUsers_(self, _cmd, aStanza)
00250 {
00251     if ((aStanza == null ? null : aStanza.isa.objj_msgSend0(aStanza, "type")) != "result")
00252         CPException.isa.objj_msgSend2(CPException, "raise:reason:", "error", "stanza error");
00253     var users = CPArray.isa.objj_msgSend0(CPArray, "array"),
00254         items = (aStanza == null ? null : aStanza.isa.objj_msgSend1(aStanza, "childrenWithName:", "item"));
00255     for (var i = 0; i < (items == null ? null : items.isa.objj_msgSend0(items, "count")); i++)
00256         (users == null ? null : users.isa.objj_msgSend1(users, "addObject:", TNStropheJID.isa.objj_msgSend1(TNStropheJID, "stropheJIDWithString:", ((___r1 = (items == null ? null : items.isa.objj_msgSend1(items, "objectAtIndex:", i))), ___r1 == null ? null : ___r1.isa.objj_msgSend1(___r1, "valueForAttribute:", "jid")))));
00257     if (self._delegate && ((___r1 = self._delegate), ___r1 == null ? null : ___r1.isa.objj_msgSend1(___r1, "respondsToSelector:", sel_getUid("serverAdmin:didGetRegisteredUsers:"))))
00258         ((___r1 = self._delegate), ___r1 == null ? null : ___r1.isa.objj_msgSend2(___r1, "serverAdmin:didGetRegisteredUsers:", self, users));
00259     else
00260         ((___r1 = CPNotificationCenter.isa.objj_msgSend0(CPNotificationCenter, "defaultCenter")), ___r1 == null ? null : ___r1.isa.objj_msgSend3(___r1, "postNotificationName:object:userInfo:", TNStropheServerAdministrationGetRegisteredUserNotification, self, users));
00261     var ___r1;
00262 }
00263 ,["void","TNStropheStanza"])]);
00264 }
 All Classes Namespaces Files Functions Variables