StropheCappuccino API 1.0.0
/tmp/tempDoc.doc/Build/StropheCappuccino.build/Debug/Browser.environment/Sources/TNStropheRosterBase.j
Go to the documentation of this file.
00001 @STATIC;1.0;I;23;Foundation/Foundation.ji;21;TNStropheConnection.ji;18;TNStropheContact.ji;16;TNStropheGroup.ji;14;TNStropheJID.ji;17;TNStropheStanza.jt;7757;objj_executeFile("Foundation/Foundation.j", NO);objj_executeFile("TNStropheConnection.j", YES);objj_executeFile("TNStropheContact.j", YES);objj_executeFile("TNStropheGroup.j", YES);objj_executeFile("TNStropheJID.j", YES);objj_executeFile("TNStropheStanza.j", YES);{var the_class = objj_allocateClassPair(CPObject, "TNStropheRosterBase"),
00002 meta_class = the_class.isa;class_addIvars(the_class, [new objj_ivar("_contactCache"), new objj_ivar("_groupCache"), new objj_ivar("_content"), new objj_ivar("_delegate"), new objj_ivar("_connection")]);objj_registerClassPair(the_class);
00003 class_addMethods(the_class, [new objj_method(sel_getUid("contactCache"), function $TNStropheRosterBase__contactCache(self, _cmd)
00004 {
00005     return self._contactCache;
00006 }
00007 ,["CPArray"]), new objj_method(sel_getUid("_setContactCache:"), function $TNStropheRosterBase___setContactCache_(self, _cmd, newValue)
00008 {
00009     self._contactCache = newValue;
00010 }
00011 ,["void","CPArray"]), new objj_method(sel_getUid("groupCache"), function $TNStropheRosterBase__groupCache(self, _cmd)
00012 {
00013     return self._groupCache;
00014 }
00015 ,["CPArray"]), new objj_method(sel_getUid("_setGroupCache:"), function $TNStropheRosterBase___setGroupCache_(self, _cmd, newValue)
00016 {
00017     self._groupCache = newValue;
00018 }
00019 ,["void","CPArray"]), new objj_method(sel_getUid("content"), function $TNStropheRosterBase__content(self, _cmd)
00020 {
00021     return self._content;
00022 }
00023 ,["CPArray"]), new objj_method(sel_getUid("_setContent:"), function $TNStropheRosterBase___setContent_(self, _cmd, newValue)
00024 {
00025     self._content = newValue;
00026 }
00027 ,["void","CPArray"]), new objj_method(sel_getUid("delegate"), function $TNStropheRosterBase__delegate(self, _cmd)
00028 {
00029     return self._delegate;
00030 }
00031 ,["id"]), new objj_method(sel_getUid("setDelegate:"), function $TNStropheRosterBase__setDelegate_(self, _cmd, newValue)
00032 {
00033     self._delegate = newValue;
00034 }
00035 ,["void","id"]), new objj_method(sel_getUid("connection"), function $TNStropheRosterBase__connection(self, _cmd)
00036 {
00037     return self._connection;
00038 }
00039 ,["TNStropheConnection"]), new objj_method(sel_getUid("_setConnection:"), function $TNStropheRosterBase___setConnection_(self, _cmd, newValue)
00040 {
00041     self._connection = newValue;
00042 }
00043 ,["void","TNStropheConnection"]), new objj_method(sel_getUid("initWithConnection:"), function $TNStropheRosterBase__initWithConnection_(self, _cmd, aConnection)
00044 {
00045     if (self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("TNStropheRosterBase").super_class }, "init"))
00046     {
00047         self._connection = aConnection;
00048         self._content = CPArray.isa.objj_msgSend0(CPArray, "array");
00049         self._contactCache = CPArray.isa.objj_msgSend0(CPArray, "array");
00050         self._groupCache = CPArray.isa.objj_msgSend0(CPArray, "array");
00051     }
00052     return self;
00053 }
00054 ,["id","TNStropheConnection"]), new objj_method(sel_getUid("disconnect"), function $TNStropheRosterBase__disconnect(self, _cmd)
00055 {
00056     ((___r1 = self._connection), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "disconnect"));
00057     var ___r1;
00058 }
00059 ,["void"]), new objj_method(sel_getUid("clear"), function $TNStropheRosterBase__clear(self, _cmd)
00060 {
00061     ((___r1 = self._content), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "removeAllObjects"));
00062     ((___r1 = self._contactCache), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "removeAllObjects"));
00063     ((___r1 = self._groupCache), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "removeAllObjects"));
00064     var ___r1;
00065 }
00066 ,["void"]), new objj_method(sel_getUid("contacts"), function $TNStropheRosterBase__contacts(self, _cmd)
00067 {
00068     return self._contactCache;
00069 }
00070 ,["void"]), new objj_method(sel_getUid("cacheContact:"), function $TNStropheRosterBase__cacheContact_(self, _cmd, aContact)
00071 {
00072     if (!((___r1 = self._contactCache), ___r1 == null ? null : ___r1.isa.objj_msgSend1(___r1, "containsObject:", aContact)))
00073         ((___r1 = self._contactCache), ___r1 == null ? null : ___r1.isa.objj_msgSend1(___r1, "addObject:", aContact));
00074     var ___r1;
00075 }
00076 ,["void","TNStropheContact"]), new objj_method(sel_getUid("uncacheContact:"), function $TNStropheRosterBase__uncacheContact_(self, _cmd, aContact)
00077 {
00078     ((___r1 = self._contactCache), ___r1 == null ? null : ___r1.isa.objj_msgSend1(___r1, "removeObject:", aContact));
00079     var ___r1;
00080 }
00081 ,["void","TNStropheContact"]), new objj_method(sel_getUid("contactWithJID:"), function $TNStropheRosterBase__contactWithJID_(self, _cmd, aJID)
00082 {
00083     return self.isa.objj_msgSend1(self, "contactWithFullJID:", aJID) || self.isa.objj_msgSend1(self, "contactWithBareJID:", aJID);
00084 }
00085 ,["TNStropheContact","TNStropheJID"]), new objj_method(sel_getUid("contactWithFullJID:"), function $TNStropheRosterBase__contactWithFullJID_(self, _cmd, aJID)
00086 {
00087     for (var i = 0; i < ((___r1 = self._contactCache), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "count")); i++)
00088         if (((___r1 = ((___r2 = ((___r3 = self._contactCache), ___r3 == null ? null : ___r3.isa.objj_msgSend1(___r3, "objectAtIndex:", i))), ___r2 == null ? null : ___r2.isa.objj_msgSend0(___r2, "JID"))), ___r1 == null ? null : ___r1.isa.objj_msgSend1(___r1, "fullEquals:", aJID)))
00089             return ((___r1 = self._contactCache), ___r1 == null ? null : ___r1.isa.objj_msgSend1(___r1, "objectAtIndex:", i));
00090     return nil;
00091     var ___r1, ___r2, ___r3;
00092 }
00093 ,["TNStropheContact","TNStropheJID"]), new objj_method(sel_getUid("contactWithBareJID:"), function $TNStropheRosterBase__contactWithBareJID_(self, _cmd, aJID)
00094 {
00095     for (var i = 0; i < ((___r1 = self._contactCache), ___r1 == null ? null : ___r1.isa.objj_msgSend0(___r1, "count")); i++)
00096         if (((___r1 = ((___r2 = ((___r3 = self._contactCache), ___r3 == null ? null : ___r3.isa.objj_msgSend1(___r3, "objectAtIndex:", i))), ___r2 == null ? null : ___r2.isa.objj_msgSend0(___r2, "JID"))), ___r1 == null ? null : ___r1.isa.objj_msgSend1(___r1, "bareEquals:", aJID)))
00097             return ((___r1 = self._contactCache), ___r1 == null ? null : ___r1.isa.objj_msgSend1(___r1, "objectAtIndex:", i));
00098     return nil;
00099     var ___r1, ___r2, ___r3;
00100 }
00101 ,["TNStropheContact","TNStropheJID"]), new objj_method(sel_getUid("containsJID:"), function $TNStropheRosterBase__containsJID_(self, _cmd, aJID)
00102 {
00103     return self.isa.objj_msgSend1(self, "contactWithBareJID:", aJID) || self.isa.objj_msgSend1(self, "contactWithFullJID:", aJID);
00104 }
00105 ,["BOOL","TNStropheJID"]), new objj_method(sel_getUid("containsFullJID:"), function $TNStropheRosterBase__containsFullJID_(self, _cmd, aJID)
00106 {
00107     return self.isa.objj_msgSend1(self, "contactWithFullJID:", aJID) ? YES : NO;
00108 }
00109 ,["BOOL","TNStropheJID"]), new objj_method(sel_getUid("containsBareJID:"), function $TNStropheRosterBase__containsBareJID_(self, _cmd, aJID)
00110 {
00111     return self.isa.objj_msgSend1(self, "contactWithBareJID:", aJID) ? YES : NO;
00112 }
00113 ,["BOOL","TNStropheJID"]), new objj_method(sel_getUid("changeNickname:ofContact:"), function $TNStropheRosterBase__changeNickname_ofContact_(self, _cmd, aName, aContact)
00114 {
00115     (aContact == null ? null : aContact.isa.objj_msgSend1(aContact, "setNickname:", aName));
00116 }
00117 ,["void","CPString","TNStropheContact"]), new objj_method(sel_getUid("changeNickname:ofContactWithJID:"), function $TNStropheRosterBase__changeNickname_ofContactWithJID_(self, _cmd, aName, aJID)
00118 {
00119     self.isa.objj_msgSend2(self, "changeNickname:ofContact:", aName, self.isa.objj_msgSend1(self, "contactWithJID:", aJID));
00120 }
00121 ,["void","CPString","TNStropheJID"])]);
00122 class_addMethods(meta_class, [new objj_method(sel_getUid("rosterWithConnection:"), function $TNStropheRosterBase__rosterWithConnection_(self, _cmd, aConnection)
00123 {
00124     return ((___r1 = TNStropheRosterBase.isa.objj_msgSend0(TNStropheRosterBase, "alloc")), ___r1 == null ? null : ___r1.isa.objj_msgSend1(___r1, "initWithConnection:", aConnection));
00125     var ___r1;
00126 }
00127 ,["id","TNStropheConnection"])]);
00128 }
 All Classes Namespaces Files Functions Variables