From c3c2c93cc91d94560457c8364841703befb13527 Mon Sep 17 00:00:00 2001 From: Ray Slakinski Date: Fri, 27 Jul 2012 10:06:22 -0400 Subject: [PATCH] first commit --- .gitignore | 58 + OSX/English.lproj/InfoPlist.strings | Bin 0 -> 638 bytes OSX/English.lproj/MainMenu.nib/classes.nib | 28 + OSX/English.lproj/MainMenu.nib/info.nib | 25 + .../MainMenu.nib/keyedobjects.nib | Bin 0 -> 24839 bytes OSX/README | 38 + OSX/Resources/images/00.gif | Bin 0 -> 87 bytes OSX/Resources/images/01.gif | Bin 0 -> 87 bytes OSX/Resources/images/02.gif | Bin 0 -> 88 bytes OSX/Resources/images/03.gif | Bin 0 -> 87 bytes OSX/Resources/images/04.gif | Bin 0 -> 94 bytes OSX/Resources/images/05.gif | Bin 0 -> 96 bytes OSX/Resources/images/06.gif | Bin 0 -> 88 bytes OSX/Resources/images/07.gif | Bin 0 -> 87 bytes OSX/Resources/images/08.gif | Bin 0 -> 92 bytes OSX/Resources/images/09.gif | Bin 0 -> 124 bytes OSX/Resources/images/10.gif | Bin 0 -> 86 bytes OSX/Resources/images/11.gif | Bin 0 -> 91 bytes OSX/Resources/images/12.gif | Bin 0 -> 85 bytes OSX/Resources/images/13.gif | Bin 0 -> 133 bytes OSX/Resources/images/14.gif | Bin 0 -> 128 bytes OSX/Resources/images/15.gif | Bin 0 -> 120 bytes OSX/Resources/images/16.gif | Bin 0 -> 87 bytes OSX/Resources/images/17.gif | Bin 0 -> 86 bytes OSX/Resources/images/18.gif | Bin 0 -> 100 bytes OSX/Resources/images/19.gif | Bin 0 -> 85 bytes OSX/Resources/images/20.gif | Bin 0 -> 97 bytes OSX/Resources/images/21.gif | Bin 0 -> 106 bytes OSX/Resources/images/22.gif | Bin 0 -> 94 bytes OSX/Resources/images/23.gif | Bin 0 -> 87 bytes OSX/Resources/images/24.gif | Bin 0 -> 93 bytes OSX/Resources/images/25.gif | Bin 0 -> 90 bytes OSX/Resources/images/26.gif | Bin 0 -> 86 bytes OSX/Resources/images/27.gif | Bin 0 -> 101 bytes OSX/Resources/images/28.gif | Bin 0 -> 332 bytes OSX/Resources/images/29.gif | Bin 0 -> 87 bytes OSX/Resources/images/30.gif | Bin 0 -> 92 bytes OSX/Resources/images/31.gif | Bin 0 -> 93 bytes OSX/Resources/images/32.gif | Bin 0 -> 95 bytes OSX/Resources/imood.icns | Bin 0 -> 29652 bytes OSX/XMLTree.h | 325 ++++++ OSX/XMLTree.m | 383 +++++++ OSX/iMoodUpdater.h | 18 + OSX/iMoodUpdater.m | 127 ++ OSX/iMoodUpdater.pbproj/project.pbxproj | 1018 +++++++++++++++++ OSX/iMoodUpdater_Prefix.h | 7 + OSX/main.m | 35 + cmdline/README | 36 + cmdline/imoodupdater.c | 93 ++ python/README | 44 + python/imoodupdater.py | 95 ++ 51 files changed, 2330 insertions(+) create mode 100644 .gitignore create mode 100644 OSX/English.lproj/InfoPlist.strings create mode 100644 OSX/English.lproj/MainMenu.nib/classes.nib create mode 100644 OSX/English.lproj/MainMenu.nib/info.nib create mode 100644 OSX/English.lproj/MainMenu.nib/keyedobjects.nib create mode 100644 OSX/README create mode 100644 OSX/Resources/images/00.gif create mode 100644 OSX/Resources/images/01.gif create mode 100644 OSX/Resources/images/02.gif create mode 100644 OSX/Resources/images/03.gif create mode 100644 OSX/Resources/images/04.gif create mode 100644 OSX/Resources/images/05.gif create mode 100644 OSX/Resources/images/06.gif create mode 100644 OSX/Resources/images/07.gif create mode 100644 OSX/Resources/images/08.gif create mode 100644 OSX/Resources/images/09.gif create mode 100644 OSX/Resources/images/10.gif create mode 100644 OSX/Resources/images/11.gif create mode 100644 OSX/Resources/images/12.gif create mode 100644 OSX/Resources/images/13.gif create mode 100644 OSX/Resources/images/14.gif create mode 100644 OSX/Resources/images/15.gif create mode 100644 OSX/Resources/images/16.gif create mode 100644 OSX/Resources/images/17.gif create mode 100644 OSX/Resources/images/18.gif create mode 100644 OSX/Resources/images/19.gif create mode 100644 OSX/Resources/images/20.gif create mode 100644 OSX/Resources/images/21.gif create mode 100644 OSX/Resources/images/22.gif create mode 100644 OSX/Resources/images/23.gif create mode 100644 OSX/Resources/images/24.gif create mode 100644 OSX/Resources/images/25.gif create mode 100644 OSX/Resources/images/26.gif create mode 100644 OSX/Resources/images/27.gif create mode 100644 OSX/Resources/images/28.gif create mode 100644 OSX/Resources/images/29.gif create mode 100644 OSX/Resources/images/30.gif create mode 100644 OSX/Resources/images/31.gif create mode 100644 OSX/Resources/images/32.gif create mode 100644 OSX/Resources/imood.icns create mode 100644 OSX/XMLTree.h create mode 100644 OSX/XMLTree.m create mode 100644 OSX/iMoodUpdater.h create mode 100644 OSX/iMoodUpdater.m create mode 100644 OSX/iMoodUpdater.pbproj/project.pbxproj create mode 100644 OSX/iMoodUpdater_Prefix.h create mode 100644 OSX/main.m create mode 100644 cmdline/README create mode 100644 cmdline/imoodupdater.c create mode 100644 python/README create mode 100644 python/imoodupdater.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..61475ef --- /dev/null +++ b/.gitignore @@ -0,0 +1,58 @@ +# python +*.py[co] +ipython_autoexec.py + + +# system +.DS_Store +*.pid +*.log +*.sw[ponm] +*~ + +# xcode +build/* +*.perspective +*.perspectivev3 +*.pbxuser +*.xcworkspace +*.mode1 +*.mode2v3 +*.mode1v3 +xcuserdata +Snapshots + +# java/andriod +*.apk +*.ap_ +*.dex +*.class +bin/ +gen/ + +# Eclipse/Idea/Dev Env +env/ +.idea +.cache +tags +temp +.coverage +*.packed +*.pydevproject +.project +.metadata +bin/** +tmp/** +tmp/**/* +*.tmp +*.bak +*.swp +*~.nib +local.properties +.classpath +.settings/ +.loadpath +.externalToolBuilders/ +*.launch +.cproject +.buildpath diff --git a/OSX/English.lproj/InfoPlist.strings b/OSX/English.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..4e1c51c62f9cedd12ad3ff3ad6b14a257ecd7fe5 GIT binary patch literal 638 zcmbV~&2GXl5QOKM&=|MF)y(`m1BQ2EbphPjb9WmF2Or{ml5vTm$SWTG+S{r_&g6tghx1nlqRv2CN z^{g%E7+j(d{w2|=!&ilO083_feZUp7U)Y^hJ(Zk~^aVNx^J%DSWf7Siwv}dgbHBh? z{3`n&LpO}uHVr8@O=sd~?`WFs&R?cOKHs)uh)W}(%zH_daL z4e-qS5`uZf*QK2qf*P53V{^IezKh>wJNH)N{&X+3zE6IX?oF%j + + + + IBDocumentLocation + 410 325 364 391 0 0 1024 746 + IBEditorPositions + + 29 + 480 252 165 44 0 0 1024 746 + 292 + 377 338 270 342 0 0 1024 746 + + IBFramework Version + 326.0 + IBOpenObjects + + 29 + 295 + 394 + + IBSystem Version + 7A202 + + diff --git a/OSX/English.lproj/MainMenu.nib/keyedobjects.nib b/OSX/English.lproj/MainMenu.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..88aba65bee42ecbb03bcb13b97ee1ba031800ec7 GIT binary patch literal 24839 zcmc({cYIaF(?7oDl=R$_PC`O@fwX(m3#50rB?-M5l1qrBnL-boRjMK#M37zt6+}=_ ziXb3@*g#Z@f*th(ii#jA@SSsRZW4sg^YFZWfBfK;oO93Jeb4Od%QQrLOY=yLv%ajv zJkea0)!xtr;hAesAsb{nyeK=`(yXeYr9#FpOSBZ(BL~zA#h^Hpih83Al!FRT9cn?- z(NkzHdKxW4i_sFa9IZer(Q337ZA8zb7to97CA1yAf?h+r(H`_V+K1kRyMyQuI)dIt z$Iv_IJ@f^-h%TWo(YNR}x`XawgbB968tjF;;cy&-V{shrjr-sXoP+alAuhrt*nkJ% zA$TaR#|`)~+=5&2I6MirVHq<#1JA^B@RN8ho`>h-O?WeY7oWx-<4^FX_%pb>h`+>N z!S!4GJ-!UrpYRoY6|TSH-|=<0-o&@?UvRyR?-E2P;fO#)e45x3N8$um7ve_T;o6P( zknV8xCxIjgu3;pC^n`0Pi6vUNCXghO4A*qhhh)Gto8*!_xE7HT(ig5qQcB9;I*<$| zL*P1`j3kf1wTg@;)o>k4>PS6Yn@9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ry9cTw)r z+~v6|b64lC%iWm!eD3kwler({ew_PB?v31Ax&P$hJen7o*DueQSC-e3H$HDt-pahy zdF%2H=e?cxUf$KbYk9xtchAquFU&8=*XNhzKayXWKRUl5e?tBf`7`t98YpT8)7 zSN`t&H}c=gKa&4#{^k6i@~`LLDDW)sF7PerRS;F6FEAC97t|Fr6f7uMT(GR*rGo7R zpB0=h_@dy;f~y7B3Vtv6r;rv3g|>wbg;9mEg>i)$g^v_g7LG2QRrqA#;=<*H>x!lp z%_{o5=)2<7;@-uX#W}_K#YM$^iw(u4#r=y16%Q>QQCv}6Ra{;CXmMR}V{vowxZ;V$ zQ;Me*KVCeecy{qq#q)|67B4A&rg%m1s^Yc98;UmOAeO2SMo{8#gfbY9QwKI zQ}w;|nfe@kzP?D`S8vdl>ig>l>4)k^=qvP9`fB~7`Z|51zF9v`KT$tLKTZF*eujRw z{we)D{X+c`{WJO%`c?Y1`VIQc`mOqx^e^jo>R;2puHUDBQ~#F!sQw-OyZZO_AL&2V zf2u#H|6G4b|F!-*{SW&8=zrG#s=uzkssBrV+kgzzAQ)^74hCm~i^1LCW$-ch83GK! zhA=}qXhKq);4Br|q8-6leHC!|NZurCSr{QnI9V0e!M$u?zbTB#_ zU5sujFH9|qt2LMOfse#dmA&2ImUcrp|QlMH=2y)#(~Bm#^J`1 z#!*JIvD)~kvCi0NY&MQFPB2b3PBqHLCyXx5=n8uqXnc7UUX^v?gQvVTR Oxr&=CSL<)ns{aRo+4#W# literal 0 HcmV?d00001 diff --git a/OSX/README b/OSX/README new file mode 100644 index 0000000..85fe182 --- /dev/null +++ b/OSX/README @@ -0,0 +1,38 @@ +iMood Updater 1.52 - Updates your internet mood (imood.com). +Copyright (C) 2003 RiSC, and SDF1 Networks +-------------------------------------------------------------------------- +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +GNU License @ http://www.gnu.org/copyleft/gpl.htm + +iMood Updater version 1.52, Copyright (C) 2003 RiSC, and SDF1 Networks +iMood Updater comes with ABSOLUTELY NO WARRANTY +-------------------------------------------------------------------------- +Requirements: + Mac OS X 10.2 or higher +-------------------------------------------------------------------------- + +New in 1.52: + +- DES encryption of passwords being sent to iMood.com + +Known issues: + +- Must have a connection to the internet before running + +To-do list: + +- Keychain support +- Better error handling diff --git a/OSX/Resources/images/00.gif b/OSX/Resources/images/00.gif new file mode 100644 index 0000000000000000000000000000000000000000..e1442126d45fe63b217d3ebb707dcfa4157b516d GIT binary patch literal 87 zcmZ?wbhEHb{R3ZvQGE(+~igBo^(szP2QC=$C2;wcW*`pYXDr<9vuJx literal 0 HcmV?d00001 diff --git a/OSX/Resources/images/01.gif b/OSX/Resources/images/01.gif new file mode 100644 index 0000000000000000000000000000000000000000..53102357477f5dfe627010b60297325fd324c3ad GIT binary patch literal 87 zcmZ?wbhEHbWA`S p3|pEy)aL$rcB=7yS*Lq?Zt|*m3zDUx%+)jIIPx9-?#;+x4FD(e90dRX literal 0 HcmV?d00001 diff --git a/OSX/Resources/images/02.gif b/OSX/Resources/images/02.gif new file mode 100644 index 0000000000000000000000000000000000000000..5d1a8c076617b3c128c352eddd2a71bf66951c22 GIT binary patch literal 88 zcmZ?wbhEHbWA`S q3|pEyo~@OV-rG1&A@2%DRQj^07o2O|#p69sc}_U|Gn-P@DVf*{R0+Wu5Nnxyh^MNner5=-Qbx*OBk=cW*`pYXEJ|9lHPk literal 0 HcmV?d00001 diff --git a/OSX/Resources/images/04.gif b/OSX/Resources/images/04.gif new file mode 100644 index 0000000000000000000000000000000000000000..499624f0ef51b35a7486a3d504c2b0ac3828bdfa GIT binary patch literal 94 zcmZ?wbhEHb0_O3_+`^$wh8l#?CEqI!e$YulSRNk%57kL5BedK=KSshI9H?b~7+7 yE@0;o+{Bj@@wi2)G(j@0$fGMOcIVOc6OU<~+4=mHQ(n+-O%=hmk2^FN7_0$;79hj` literal 0 HcmV?d00001 diff --git a/OSX/Resources/images/06.gif b/OSX/Resources/images/06.gif new file mode 100644 index 0000000000000000000000000000000000000000..a488de2db7881011fc097e0e3f0bbdfcbe2e3f0d GIT binary patch literal 88 zcmZ?wbhEHbtTmn)uGn$AW%_+UK^E9-46Y%fBE725SH<1srSu literal 0 HcmV?d00001 diff --git a/OSX/Resources/images/07.gif b/OSX/Resources/images/07.gif new file mode 100644 index 0000000000000000000000000000000000000000..3d09c0b6a29dc40abe34c89ad3ff8598b202463e GIT binary patch literal 87 zcmZ?wbhEHbcbx`v3nw0}LqsWMO1rU}4Y!34qixFgtp9 zUDDGwbI9!W={b8m^sGQn$^%D5&929q3~MyE9}roe_4k-+?)RmQeAj}02CeOV)%0er V*urzqm}^5zBrY_2c`z_o0|2fkEa3nE literal 0 HcmV?d00001 diff --git a/OSX/Resources/images/10.gif b/OSX/Resources/images/10.gif new file mode 100644 index 0000000000000000000000000000000000000000..a241df074090fac1b44d9bcb4d49ae4b87915816 GIT binary patch literal 86 zcmZ?wbhEHbWA`S o3|pEymTkT9f;(vL0?Y83xiPD{-u&!MZQYm6Y9F)YRa literal 0 HcmV?d00001 diff --git a/OSX/Resources/images/14.gif b/OSX/Resources/images/14.gif new file mode 100644 index 0000000000000000000000000000000000000000..64ef094bbbe8259b3adc0f3674a55e46a1c1f15d GIT binary patch literal 128 zcmZ?wbhEHb8ON(;|NHQd0S0tH43HWIW?u{8E6Qs)O+8eV z(%qYcSQPpgmPIfNtjSs6rnq`v-sKCMbvW0*_}0j|-jzki#$-`;Y4pQ6+h$y5?^P?E Z^q_x9laCHh|MG)#=A00aR%K+c1^}N^D@*_Y literal 0 HcmV?d00001 diff --git a/OSX/Resources/images/15.gif b/OSX/Resources/images/15.gif new file mode 100644 index 0000000000000000000000000000000000000000..3a790f97e2e5714ae51b50947cf57a8b4a067d08 GIT binary patch literal 120 zcmZ?wbhEHb3s2d3Y literal 0 HcmV?d00001 diff --git a/OSX/Resources/images/18.gif b/OSX/Resources/images/18.gif new file mode 100644 index 0000000000000000000000000000000000000000..d813f3a05dcdc8cbe497e270262f8e8d9a2727d1 GIT binary patch literal 100 zcmZ?wbhEHbG!fLx#~KLZ1k>74#dC958n zj6yd9N$v){23Do(p;2m;{X256DW-l}y))VOXo|=Dmo2C6=B&E<;@JU5nKRCe4AuYu Cd?UyJ literal 0 HcmV?d00001 diff --git a/OSX/Resources/images/19.gif b/OSX/Resources/images/19.gif new file mode 100644 index 0000000000000000000000000000000000000000..39ceab29229845562d2006f96ce127a405ce450a GIT binary patch literal 85 zcmZ?wbhEHbwE0F^N;TY xr<{aE|0%tBlFKU`6gX18&wQ~w&vB04J+;=Xzq$IRm!)Eks5eRU_pmTn0|0r?A=>}| literal 0 HcmV?d00001 diff --git a/OSX/Resources/images/22.gif b/OSX/Resources/images/22.gif new file mode 100644 index 0000000000000000000000000000000000000000..0454431ba8bc98a55e47ecb37d86dc3bff1435d0 GIT binary patch literal 94 zcmZ?wbhEHb8q=XS&vu0Z?up&@@NqQgEaujp(17g literal 0 HcmV?d00001 diff --git a/OSX/Resources/images/23.gif b/OSX/Resources/images/23.gif new file mode 100644 index 0000000000000000000000000000000000000000..f1bfcfc1f7d08770f7802119249f40a4e8e8ccab GIT binary patch literal 87 zcmZ?wbhEHbg@XD_1|14`bNU n)bVVqi1gmbc?%j-uPv2575bQ^OQ&Shor(*5hrfF>GFSru9aS9R literal 0 HcmV?d00001 diff --git a/OSX/Resources/images/24.gif b/OSX/Resources/images/24.gif new file mode 100644 index 0000000000000000000000000000000000000000..ca41554d268e579867b56cdd2c3ba7c17efaaace GIT binary patch literal 93 zcmZ?wbhEHbSt4{|pQaia%Kx85o!tbbxH2EI*K~KBa%<>WA`S o3|pEymTkS^6W%!YLuZoP%*;i(i?^>mTk56f?DXTDIxB-U04h5i>;M1& literal 0 HcmV?d00001 diff --git a/OSX/Resources/images/27.gif b/OSX/Resources/images/27.gif new file mode 100644 index 0000000000000000000000000000000000000000..b84c8245bf351fc74e54a0001485f5a9e10a634c GIT binary patch literal 101 zcmZ?wbhEHbnjnot#l|>8; F)&Q#=BQ*d3 literal 0 HcmV?d00001 diff --git a/OSX/Resources/images/28.gif b/OSX/Resources/images/28.gif new file mode 100644 index 0000000000000000000000000000000000000000..a97364a7b28f09a850d85a0d68ef0ea461e1ee52 GIT binary patch literal 332 zcmZXP%PRu_0LFh?<2qrip*2IsyvHUbcG$dXR|f}=q#ew1vQjRhos{IDO%f-06ld+^ z=$RBQSosGKd3GQ^FP_AU&?|aJH|Q2! zqAPTYPS8F&KwBt*rcfEOqhe%5He~4)!(v>_ibb(3RJ=aw8w2*3M8iE9gn7*dFSYbCm!+} zZ&Kr(+dFw)pF3(93a;coM{^g96FJGjNNL*fFypVPsgD&F6x++I-AxU#BCD^$Rp)DI ejg{D){T?rosY+LEV{@BfV{D+WXLm2yO~)?>SA&HB literal 0 HcmV?d00001 diff --git a/OSX/Resources/images/29.gif b/OSX/Resources/images/29.gif new file mode 100644 index 0000000000000000000000000000000000000000..901995157a32cd50a842ce1eca44540ad0408ca4 GIT binary patch literal 87 zcmZ?wbhEHbSOWk7>K|zU literal 0 HcmV?d00001 diff --git a/OSX/Resources/images/30.gif b/OSX/Resources/images/30.gif new file mode 100644 index 0000000000000000000000000000000000000000..27e4aa0e8751e8df989f6751c2e932db34d4afbe GIT binary patch literal 92 zcmZ?wbhEHbwjzfKwZyj=GznWMdpiNP8GvKb>Y literal 0 HcmV?d00001 diff --git a/OSX/Resources/images/31.gif b/OSX/Resources/images/31.gif new file mode 100644 index 0000000000000000000000000000000000000000..24b568c1c6fd9a9b26bcdcd9ae43d7eeae5dc5c3 GIT binary patch literal 93 zcmZ?wbhEHb3yop{;Du!TwR_R*SW ndn+dk#i@2q)x1^8aC@DnXW{!fw~XZO_k>n*w7a-6GFSruZLA<` literal 0 HcmV?d00001 diff --git a/OSX/Resources/images/32.gif b/OSX/Resources/images/32.gif new file mode 100644 index 0000000000000000000000000000000000000000..275bedfb4067d0a9502be605b11b8e7a064132c0 GIT binary patch literal 95 zcmZ?wbhEHb=QEr2`gIv#|!axQFYXE<`AW#4R literal 0 HcmV?d00001 diff --git a/OSX/Resources/imood.icns b/OSX/Resources/imood.icns new file mode 100644 index 0000000000000000000000000000000000000000..e44bc609f683dd2f0ecdef2f090b5ae1366fe3e5 GIT binary patch literal 29652 zcmeHP30zdw_doBw+1OnWTP!|lTA65;)z3D!!tqnus=53s`kN_kEoezU&0$f%4N+V` zR9wonQo$TozR|k?>YCJbGLWyeeX@^ z(6M1eVcDTW!`cv$QvQ2jNw;aGmpfd z*n-}y&@;FwlC?>pIQF*W2%AW+?9vq7h^3A<&dRAr1&iRx^B!+{{x|lTioE`>lI6q< zd3`{#j*Wr2y^p}~?AN17E`MXrhE4POdq&WIuV;+PDeNC(Mxp-{7z^}|c_(k?XD7WV z=83!$N~(rLc~TP;y|$PJNEQgQO-05Q)6?bVW!8OxMUkccYFW`98h+VLqT8{7Q%> zGa|-R0%O0+8PoVNRwDifGFH)zF`eO`O=hglfABK=>tzBVk9x%a60u&fevYwBy}rN- z(G0rV`a?&H^I4KQjpX;f@Wz{O_IQAwLz1A0d$g4iOej1Q^~@~dTP?mF%lNW2k4?u6 zzc_<&*N4Xu{cASk;<>3rU(H~2JCf1tDMSMznQ&#|nCwUhXoOgMn@5M-`^mF z5VgGt!ZH=nvIxc%1Vs`piDc4pn82R|G84!w)U+jnxW`LHryd%9-37`TJ+!+8X0fa>} zzCXP=g-Mq9$;XyQFv;0_NVWykPyu?rqV(JCg%M58Z>WAgDt(o>jFD)M-$ zg0X@pV0|j|l&WCN7!{*eBZ$^xDLmF1Ru0R!70I|$SjnU>Vn*%d(N1k|V0Anhs3JM{ z*x=76Oc>$^w9}s$bI(N)eGH>c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ation functions. + */ + + +/*! + @class XMLTree + @abstract Wraps some C-level functions from Apple for XML manipulation. + @discussion +

+ XMLTree provides an Objective-C wrapper for Apple's built-in C-language + XML parser and manipulation functions. + At the moment it only supports basic element and attribute information. + However Apple's XML parser supports processing instructions, CDATA, + and some other things I've never seen, so I'll add support for these + as I go along. +

+

+ I'm releasing this code into the Public Domain, so you can include it + with your software regardless of the license you use. If you make any + useful additions or bug fixes (especially with retain/release), we + would all appreciate it if you would let me know so we can give the + changes to everyone else too. +

+

Author: Robert Harder, rob -at- iharder.net

+

version: 0.1

+ */ +@interface XMLTree : NSObject +{ + CFXMLTreeRef _tree; + CFXMLNodeRef _node; + + NSString *_lastUnknownSelector; +} + + +/*! + @method dealloc + @abstract Be a good citizen and clean up after ourselves. + */ +-(void)dealloc; + + +/*! + @method treeWithURL: + @abstract Creates an autoreleased XMLTree with the contents of url. + @discussion +

This method does not return a properly-autoreleased object. + Do not use it until we figure out what's wrong (or let me know if you found out.

+ Creates an autoreleased XMLTree with the contents of url or + nil if there was an error. + Of course the URL can be pointing to a file or a URL on the internet + such as a GET command to a SOAP application. + @param url The NSURL pointing to your XML data. + @result An autoreleased XMLTree with the contents + of url or nil if there was a problem. + */ ++(XMLTree *)treeWithURL:(NSURL *)url; + + +/*! + @method init + @abstract Initializes and returns an XMLTree. + @discussion + Initializes and returns an XMLTree (with a retain count of 1). + There isn't much point to creating an XMLTree this way until + I add methods for manuallying adding XML nodes to the tree. + @result An XMLTree (with a retain count of 1). + */ +-(XMLTree *)init; + + +/*! + @method initWithURL: + @abstract Initializes and returns an XMLTree + with the contents of url. + @discussion + Initializes and returns an XMLTree (with a retain count of 1) + with the XML contents of url or nil if there is an error. + @param url The NSURL pointing to your XML data. + @result An XMLTree with a retain count of 1. + */ +-(XMLTree *)initWithURL:(NSURL *)url; + + +/*! + @method initWithCFXMLTreeRef: + @abstract Initializes and returns an XMLTree + with the internal data represented by ref. + @discussion + Initializes and returns an XMLTree (with a retain count of 1) + with the internal CFXMLTreeRef data represented by ref. + You probably won't ever need to call this yourself, but I call it internally + and may move it to a Private API in the XMLTree.m file later. + @param ref The CFXMLTreeRef containing the XML data. + @result An XMLTree with a retain count of 1. + */ +-(XMLTree *)initWithCFXMLTreeRef:(CFXMLTreeRef)ref; + + + +/* ******** A B O U T S E L F ******** */ +/*! + @method name + @abstract Returns the name of the root node in the tree. + @discussion + Returns the name of the root node in the tree or nil + if a name is not appropriate in the current context such as + if the "tree" is actually a single XML Processing Instruction node. + @result The name of the root node in the tree.. + */ +-(NSString *)name; + + +/*! + @method xml + @abstract Returns the XMLTree in an XML-looking form. + @discussion + Returns the XMLTree in an XML-looking form as performed + by Apple's own CFXMLTreeCreateXMLData(...) method. + @result The XMLTree in an XML-looking form. + */ +-(NSString *)xml; + + +/*! + @method description + @abstract Returns a textual representation of the XMLTree. + @discussion +

+ Returns a textual representation of the XMLTree. + The way the tree is interpreted depends on what kind of root + node is represented by the receiver. +

+

+ Listed below are the actions this method takes depending + on the type of node this is. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Node TypeCFXMLNodeTypeCodeAction
DocumentkCFXMLNodeTypeDocument + Recursively descends XML document piecing together + the Text and CDATA nodes that are encountered. + You can think of this as returning the plaintext + version of the XML data, that is, with all tags removed. +
ElementkCFXMLNodeTypeElement
AttributekCFXMLNodeTypeAttribute + Default action: Whatever is returned by Apple's + CFXMLNodeGetString(...) method. +
Processing InstructionkCFXMLNodeTypeProcessingInstruction
CommentkCFXMLNodeTypeComment
TextkCFXMLNodeTypeText
CDATA SectionkCFXMLNodeTypeCDATASection
Document FragmentkCFXMLNodeTypeDocumentFragment
EntitykCFXMLNodeTypeEntity
Entity ReferencekCFXMLNodeTypeEntityReference
Document TypekCFXMLNodeTypeDocumentType
WhitespacekCFXMLNodeTypeWhitespace
Notation ElementkCFXMLNodeTypeNotation
Element Type DeclarationkCFXMLNodeTypeElementTypeDeclaration
Attribute List DeclarationkCFXMLNodeTypeAttributeListDeclaration
+ + @result A textual representation of the XMLTree. + */ +-(NSString *)description; + + +/*! + @method attributeNamed: + @abstract Returns the attribute named name. + @discussion + Returns the attribute named name or + nil if no such attribute is found or + the node is not an Element node. + @param name The name of the attribute to return. + @result The attribute named name. + */ +-(NSString *)attributeNamed:(NSString *)name; + + + +/*! + @method attributes + @abstract Returns a dictionary of all the attributes. + @discussion + Returns a dictionary of all the attributes in the node + or nil if the node is not an Element node. + @result A dictionary of all the attributes. + */ +-(NSDictionary *)attributes; + + +/*! + @method type + @abstract Returns the type of node this is. + @discussion + Returns the type of node this is as defined by Apple's + enum: +
+ enum CFXMLNodeTypeCode {
+     kCFXMLNodeTypeDocument = 1,
+     kCFXMLNodeTypeElement = 2,
+     kCFXMLNodeTypeAttribute = 3,
+     kCFXMLNodeTypeProcessingInstruction = 4,
+     kCFXMLNodeTypeComment = 5,
+     kCFXMLNodeTypeText = 6,
+     kCFXMLNodeTypeCDATASection = 7,
+     kCFXMLNodeTypeDocumentFragment = 8,
+     kCFXMLNodeTypeEntity = 9,
+     kCFXMLNodeTypeEntityReference = 10,
+     kCFXMLNodeTypeDocumentType = 11,
+     kCFXMLNodeTypeWhitespace = 12,
+     kCFXMLNodeTypeNotation = 13,
+     kCFXMLNodeTypeElementTypeDeclaration = 14,
+     kCFXMLNodeTypeAttributeListDeclaration = 15
+ };
+ 
+ @result The type of node this is. + */ +-(CFXMLNodeTypeCode)type; + + + +/* ******** A B O U T C H I L D R E N ******** */ + + +/*! + @method childAtIndex: + @abstract Returns the child at the given index. + @discussion + Returns the child at the given index or nil + if no such child exists or it doesn't make sense + to have children (such as a Processing Instruction node). + @param index The index of the child to get. + @result The child at index. + */ +-(XMLTree *)childAtIndex:(int)index; + + + + +/*! + @method childNamed: + @abstract Returns the first child named name. + @discussion + Returns the first child named name or nil + if no such child exists or it doesn't make sense + to have children (such as a Processing Instruction node). + @param name The name of the child. + @result The child named name. +*/ +-(XMLTree *)childNamed:(NSString *)name; + + +/*! + @method descendentNamed: + @abstract Returns the first descendent named name. + @discussion + Returns the descendent named name or nil + if no such descendent exists or it doesn't make sense + to have descendents (such as a Processing Instruction node). + This is a depth-first search. + @param name The name of the child. + @result The child named name. +*/ +-(XMLTree *)descendentNamed:(NSString *)name; + + +/*! + @method count + @abstract Returns the number of children in the tree. + @discussion + Returns the number of children in the tree or -1 + if there is no valid tree contained within (like if you + tried to create an XMLTree with init). + @result The number of children in the tree. + */ +-(int)count; + + +@end + +/*! + @function XMLTreeDescription + @abstract Used internally to recursively generate tree descriptions. + @param descr The mutable string that will have descriptions appended to it. + @param tree The tree from which to make a description. + @result A description of tree. + */ +CFStringRef XMLTreeDescription( CFMutableStringRef descr, CFXMLTreeRef tree ); + + + +/*! +@function XMLTreeDescendentNamed + @abstract Used internally to recursively search for a descendent. + @param name The name of the descendent to search for. + @param tree The tree in which to recursively search. + @result The matching descendent or nil if no descendent is found. + */ +CFXMLTreeRef XMLTreeDescendentNamed( CFStringRef name, CFXMLTreeRef tree ); + + + diff --git a/OSX/XMLTree.m b/OSX/XMLTree.m new file mode 100644 index 0000000..8e47e97 --- /dev/null +++ b/OSX/XMLTree.m @@ -0,0 +1,383 @@ +#import "XMLTree.h" + +@interface XMLTree (PrivateAPI) + + +@end // End Private API + + + +@implementation XMLTree + + +-(void)dealloc +{ + //NSLog( @"dealloc %@", self ); + + if( _tree != NULL ) + CFRelease( _tree ); + + if( _node != NULL ) + CFRelease( _node ); + + _tree = NULL; + _node = NULL; + +} // end dealloc + + + ++(XMLTree *)treeWithURL:(NSURL *)url +{ + return [[[XMLTree alloc] initWithURL:url] autorelease]; +} // end treeWithURL + + + +-(XMLTree *)init +{ + if( [super init] == nil ) + return nil; + + _tree = NULL; + _node = NULL; + + return self; +} // end init + + + +-(XMLTree *)initWithCFXMLTreeRef:(CFXMLTreeRef)ref +{ + if( [self init] == nil ) + return nil; + + // Clean up? + if( _tree != NULL ) + CFRelease( _tree ); + if( _node != NULL ) + CFRelease( _node ); + + _tree = ref; + _node = CFXMLTreeGetNode( _tree ); + + CFRetain( _tree ); + CFRetain( _node ); + + return self; +} // end initWithCFXMLTreeRef: + + +-(XMLTree *)initWithURL:(NSURL *)url +{ + CFDataRef xmlData; + if( (xmlData = (CFDataRef)malloc( sizeof( CFDataRef ) ) ) == NULL){ + NSLog(@"Couldn't allocate any memory."); + return nil; + } // end if: malloc fail + + + _tree = CFXMLTreeCreateWithDataFromURL( + kCFAllocatorDefault, + (CFURLRef)url, + kCFXMLParserSkipWhitespace, + NULL ); //CFIndex + + _node = CFXMLTreeGetNode( _tree ); + + // _tree is implicitly retained + CFRetain( _node ); + + return self; +} // end initWithURL + + + + + +/* ******** A B O U T C H I L D R E N ******** */ + + +-(int)count +{ + if( _tree == NULL ) + return -1; + + return CFTreeGetChildCount( _tree ); +} // end count + + + +-(XMLTree *)childAtIndex:(int)index +{ + CFXMLTreeRef child; + + if( _tree == NULL ) + return nil; + + if( index >= CFTreeGetChildCount( _tree ) ) + return nil; + + child = CFTreeGetChildAtIndex(_tree, index); + + return [[XMLTree alloc] initWithCFXMLTreeRef:child]; +} // end childAtIndex: + + + +-(XMLTree *)childNamed:(NSString *)name +{ + CFXMLTreeRef childTree; + CFXMLNodeRef childNode; + CFStringRef childName; + int childCount; + int i; + + if( _tree == NULL ) + return nil; + + childCount = CFTreeGetChildCount( _tree ); + + for( i = 0; i < childCount; i++ ){ + childTree = CFTreeGetChildAtIndex(_tree, i ); + childNode = CFXMLTreeGetNode( childTree ); + childName = CFXMLNodeGetString( childNode ); + + if( CFStringCompare( (CFStringRef)name, childName, NULL ) == kCFCompareEqualTo ) + return [[XMLTree alloc] initWithCFXMLTreeRef:childTree]; + + } // end for: each child + + return nil; +} // end childNamed: + + +-(XMLTree *)descendentNamed:(NSString *)name +{ + CFXMLTreeRef descTree; + + if( _tree == NULL ) + return nil; + + descTree = XMLTreeDescendentNamed( (CFStringRef)name, _tree ); + + if( descTree == NULL ) + return nil; + + return [[XMLTree alloc] initWithCFXMLTreeRef:descTree]; +} // end descendentNamed: + + + +/* ******** A B O U T S E L F ******** */ + + + + +-(NSString *)name +{ + NSString *name; + + if( _node == NULL ) + return nil; + + name = [[NSString alloc] initWithString:(NSString *)CFXMLNodeGetString(_node)]; + + return name; +} // end name + + +/*! + @discussion + Returns the node type, as defined by Apple's XML parser. + The values will be one of the following constants: +
+ enum CFXMLNodeTypeCode {
+     kCFXMLNodeTypeDocument = 1,
+     kCFXMLNodeTypeElement = 2,
+     kCFXMLNodeTypeAttribute = 3,
+     kCFXMLNodeTypeProcessingInstruction = 4,
+     kCFXMLNodeTypeComment = 5,
+     kCFXMLNodeTypeText = 6,
+     kCFXMLNodeTypeCDATASection = 7,
+     kCFXMLNodeTypeDocumentFragment = 8,
+     kCFXMLNodeTypeEntity = 9,
+     kCFXMLNodeTypeEntityReference = 10,
+     kCFXMLNodeTypeDocumentType = 11,
+     kCFXMLNodeTypeWhitespace = 12,
+     kCFXMLNodeTypeNotation = 13,
+     kCFXMLNodeTypeElementTypeDeclaration = 14,
+     kCFXMLNodeTypeAttributeListDeclaration = 15
+ };
+ 
+ */ +-(CFXMLNodeTypeCode)type +{ + return CFXMLNodeGetTypeCode(_node); +} // end type + + + +-(NSDictionary *)attributes +{ + CFXMLElementInfo eInfo; + + if( CFXMLNodeGetTypeCode( _node ) != kCFXMLNodeTypeElement ) + return nil; + + eInfo = *(CFXMLElementInfo *)CFXMLNodeGetInfoPtr(_node); + + return (NSDictionary *)eInfo.attributes; +} // end attributes + + + + + + + +-(NSString *)attributeNamed:(NSString *)name +{ + if( _tree == NULL ) + return nil; + + return [[[self attributes] objectForKey:name] description]; +} // end attributeNamed: + + + + + +-(NSString *)description +{ + NSMutableString *descr; + + descr = [[NSMutableString alloc] init]; + + //NSLog( @"Description for type %d", CFXMLNodeGetTypeCode(_node) ); + + switch( CFXMLNodeGetTypeCode(_node) ){ + + case kCFXMLNodeTypeDocument: + case kCFXMLNodeTypeElement: + XMLTreeDescription( (CFMutableStringRef)descr, _tree ); + break; + + case kCFXMLNodeTypeProcessingInstruction: + case kCFXMLNodeTypeAttribute: + case kCFXMLNodeTypeComment: + case kCFXMLNodeTypeText: + case kCFXMLNodeTypeCDATASection: + case kCFXMLNodeTypeDocumentFragment: + case kCFXMLNodeTypeEntity: + case kCFXMLNodeTypeEntityReference: + case kCFXMLNodeTypeDocumentType: + case kCFXMLNodeTypeWhitespace: + case kCFXMLNodeTypeNotation: + case kCFXMLNodeTypeElementTypeDeclaration: + case kCFXMLNodeTypeAttributeListDeclaration: + default: + [descr appendString:(NSString *)CFXMLNodeGetString(_node)]; + } // end switch + + return descr; +} // end description + + + + +-(NSString *)xml +{ + CFDataRef xmlData; + + if( _tree == NULL ) + return nil; + + xmlData = CFXMLTreeCreateXMLData( + kCFAllocatorDefault, + _tree ); + if( xmlData == NULL ) + return nil; + + return [[NSString alloc] initWithData:(NSData *)xmlData encoding:NSASCIIStringEncoding]; + +} // end xml + + + + +@end // End implementation + + + +CFStringRef XMLTreeDescription( CFMutableStringRef descr, CFXMLTreeRef tree ) +{ + CFXMLTreeRef childTree; + CFXMLNodeRef childNode; + int childCount; + int i; + + childCount = CFTreeGetChildCount( tree ); + + for( i = 0; i < childCount; i++ ){ + + childTree = CFTreeGetChildAtIndex( tree, i ); + childNode = CFXMLTreeGetNode( childTree ); + + switch( CFXMLNodeGetTypeCode( childNode ) ){ + + case kCFXMLNodeTypeText: + CFStringAppend( descr, CFXMLNodeGetString( childNode ) ); + break; + + case kCFXMLNodeTypeElement: + XMLTreeDescription( descr, childTree ); + break; + + default: + break; + } // end switch: node type + } // end for + + return descr; +} // end XMLTreeDescription + + + +CFXMLTreeRef XMLTreeDescendentNamed( CFStringRef name, CFXMLTreeRef tree ) +{ + CFXMLTreeRef childTree; + CFXMLTreeRef descTree; + CFXMLNodeRef childNode; + CFStringRef childName; + int childCount; + int i; + + childCount = CFTreeGetChildCount( tree ); + + for( i = 0; i < childCount; i++ ){ + + childTree = CFTreeGetChildAtIndex( tree, i ); + childNode = CFXMLTreeGetNode( childTree ); + childName = CFXMLNodeGetString( childNode ); + + // Is this it? + if( CFStringCompare( name, childName, NULL ) == kCFCompareEqualTo ) + return childTree; + + // If child is an element, search recursively + if( CFXMLNodeGetTypeCode( childNode ) == kCFXMLNodeTypeElement ){ + + descTree = XMLTreeDescendentNamed( name, childTree ); + + // Got a match? + if( descTree != NULL ) + return descTree; + + } // end if: element node type + + } // end for + + return NULL; +} // end XMLTreeDescendentNamed: + diff --git a/OSX/iMoodUpdater.h b/OSX/iMoodUpdater.h new file mode 100644 index 0000000..92f6087 --- /dev/null +++ b/OSX/iMoodUpdater.h @@ -0,0 +1,18 @@ +/* iMoodUpdater */ + +#import + +@interface iMoodUpdater : NSObject +{ + IBOutlet id face; + IBOutlet id mood; + IBOutlet id pMood; + IBOutlet id pass; + IBOutlet id adv; + IBOutlet id userID; + IBOutlet id moodList; + IBOutlet id moodTextList; +} + +- (IBAction)iMoodUpdater:(id)sender; +@end diff --git a/OSX/iMoodUpdater.m b/OSX/iMoodUpdater.m new file mode 100644 index 0000000..748a319 --- /dev/null +++ b/OSX/iMoodUpdater.m @@ -0,0 +1,127 @@ +#import "iMoodUpdater.h" +#import "XMLTree.h" +#include + +#define preferences [NSUserDefaults standardUserDefaults] + +@implementation iMoodUpdater + +- (IBAction)iMoodUpdater:(id)sender +{ + // Put data from app into usable variables + int iFace = [face selectedTag]; + NSString *lMood = @"happy"; + char *crypt(); + char passwd[256]; + char salt[3]; + char rndChar[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789./"; + + // Setup the salt for crypt() + srandom(time(0)); + salt[0] = rndChar[random() %64]; + salt[1] = rndChar[random() &64]; + salt[3] = 0; + + if ([[preferences stringForKey:@"Advanced"] compare:@"1"]) + { + lMood = [moodList titleOfSelectedItem]; + } + else + { + lMood = [moodTextList stringValue]; + } + + // Setup the URL to goto to update the mood for given user. + NSString *tempURL = @"http://xml.imood.org/update.cgi?email="; + tempURL = [tempURL stringByAppendingString:[preferences stringForKey:@"UserID"]]; + tempURL = [tempURL stringByAppendingString:@"&crypt=1"]; + tempURL = [tempURL stringByAppendingString:@"&password="]; + // Crypt the password + [[preferences stringForKey:@"Password"] getCString:passwd]; + tempURL = [tempURL stringByAppendingString:[NSString stringWithFormat:@"%s",crypt(passwd, salt)]]; + tempURL = [tempURL stringByAppendingString:@"&base="]; + tempURL = [tempURL stringByAppendingString:lMood]; + tempURL = [tempURL stringByAppendingString:@"&face="]; + tempURL = [tempURL stringByAppendingFormat:@"%d",iFace]; + tempURL = [tempURL stringByAppendingString:@"&personal="]; + tempURL = [tempURL stringByAppendingString:[pMood stringValue]]; + tempURL = (NSString *) CFURLCreateStringByAddingPercentEscapes(NULL,(CFStringRef)tempURL,NULL, NULL,kCFStringEncodingUTF8); + [tempURL retain]; + //NSLog(tempURL); + + XMLTree *errorXML = [[[XMLTree alloc] initWithURL:[NSURL URLWithString:tempURL]] retain]; + NSString *errorMsg = [NSString stringWithFormat: @"%@", [errorXML descendentNamed:@"error"]]; + NSRunAlertPanel(@"iMood Updater",errorMsg,@"OK",NULL,NULL); +} + + +- (void)awakeFromNib +{ + if ([preferences stringForKey:@"UserID"] == nil) + { + [preferences setObject:@"" forKey:@"UserID"]; + [preferences setObject:@"" forKey:@"Password"]; + NSRunAlertPanel(@"No Account Info Found",@"Please go into preferences and set your account info.",@"OK", NULL, NULL); + } + else + { + [userID setStringValue:[preferences stringForKey:@"UserID"]]; + [pass setStringValue:[preferences stringForKey:@"Password"]]; + + + if ([preferences stringForKey:@"Advanced"] == nil) + { + [preferences setObject:[adv stringValue] forKey:@"Advanced"]; + } + else + { + [adv setStringValue:[preferences stringForKey:@"Advanced"]]; + } + } + + if ([[preferences stringForKey:@"Advanced"] compare:@"1"]) + { + NSDictionary *moodsDict = [NSDictionary dictionaryWithContentsOfURL: + [NSURL URLWithString:@"http://dev.sdf1.net/moods.xml"]]; + NSArray *moods = [moodsDict valueForKey:@"Moods"]; + NSLog(@"Number of moods found in XML: %d",[moods count]); + + [moodTextList removeFromSuperview]; + [moodList addItemsWithTitles:moods]; + [moodList removeItemAtIndex:0]; + [moodList selectItemAtIndex:0]; + } + else + { + [moodList removeFromSuperview]; + } + + [[mood window] makeKeyAndOrderFront:self]; + [moodTextList selectText:self]; + [userID selectText:self]; +} + +- (void)setMoodPrefs:(id)sender; +{ + [preferences setObject:[userID stringValue] forKey:@"UserID"]; + [preferences setObject:[pass stringValue] forKey:@"Password"]; + [preferences setObject:[adv stringValue] forKey:@"Advanced"]; + [[userID window] performClose:self]; +} + +- (void)goiMoodURL:(id)sender; +{ + [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://my.imood.com"]]; +} + +- (void)goDEVSDF1:(id)sender; +{ + [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://dev.sdf1.net"]]; +} + +- (void)goDonate:(id)sender; +{ + [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://dev.sdf1.net/donate.html"]]; +} + +@end \ No newline at end of file diff --git a/OSX/iMoodUpdater.pbproj/project.pbxproj b/OSX/iMoodUpdater.pbproj/project.pbxproj new file mode 100644 index 0000000..abb97d2 --- /dev/null +++ b/OSX/iMoodUpdater.pbproj/project.pbxproj @@ -0,0 +1,1018 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 39; + objects = { + 080E96DCFE201CFB7F000001 = { + fileRef = 29B97318FDCFA39411CA2CEA; + isa = PBXBuildFile; + settings = { + }; + }; + 080E96DDFE201D6D7F000001 = { + children = ( + CC12CA75044734C2002CDE91, + CC12CA6C04473407002CDE91, + 29B97316FDCFA39411CA2CEA, + CCFB7AA8043E231D005CDF0D, + CC95CD6C04F79E8A002032FD, + CCFB7AA9043E231D005CDF0D, + ); + isa = PBXGroup; + name = Classes; + refType = 4; + sourceTree = ""; + }; + 089C165CFE840E0CC02AAC07 = { + children = ( + 089C165DFE840E0CC02AAC07, + ); + isa = PBXVariantGroup; + name = InfoPlist.strings; + refType = 4; + sourceTree = ""; + }; + 089C165DFE840E0CC02AAC07 = { + expectedFileType = text.plist.strings; + fileEncoding = 10; + isa = PBXFileReference; + name = English; + path = English.lproj/InfoPlist.strings; + refType = 4; + sourceTree = ""; + }; + 089C165EFE840E0CC02AAC07 = { + fileRef = 089C165CFE840E0CC02AAC07; + isa = PBXBuildFile; + settings = { + }; + }; +//080 +//081 +//082 +//083 +//084 +//100 +//101 +//102 +//103 +//104 + 1058C7A0FEA54F0111CA2CBB = { + children = ( + 1058C7A1FEA54F0111CA2CBB, + ); + isa = PBXGroup; + name = "Linked Frameworks"; + refType = 4; + sourceTree = ""; + }; + 1058C7A1FEA54F0111CA2CBB = { + expectedFileType = wrapper.framework; + fallbackIsa = PBXFileReference; + isa = PBXFrameworkReference; + name = Cocoa.framework; + path = /System/Library/Frameworks/Cocoa.framework; + refType = 0; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB = { + children = ( + 29B97325FDCFA39411CA2CEA, + 29B97324FDCFA39411CA2CEA, + ); + isa = PBXGroup; + name = "Other Frameworks"; + refType = 4; + sourceTree = ""; + }; + 1058C7A3FEA54F0111CA2CBB = { + fileRef = 1058C7A1FEA54F0111CA2CBB; + isa = PBXBuildFile; + settings = { + }; + }; +//100 +//101 +//102 +//103 +//104 +//170 +//171 +//172 +//173 +//174 + 17587328FF379C6511CA2CBB = { + expectedFileType = wrapper.application; + fallbackIsa = PBXFileReference; + isa = PBXApplicationReference; + path = "iMood Updater.app"; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; +//170 +//171 +//172 +//173 +//174 +//190 +//191 +//192 +//193 +//194 + 19C28FACFE9D520D11CA2CBB = { + children = ( + 17587328FF379C6511CA2CBB, + ); + isa = PBXGroup; + name = Products; + refType = 4; + sourceTree = ""; + }; +//190 +//191 +//192 +//193 +//194 +//290 +//291 +//292 +//293 +//294 + 29B97313FDCFA39411CA2CEA = { + buildStyles = ( + 4A9504CCFFE6A4B311CA0CBA, + 4A9504CDFFE6A4B311CA0CBA, + ); + hasScannedForEncodings = 1; + isa = PBXProject; + mainGroup = 29B97314FDCFA39411CA2CEA; + projectDirPath = ""; + targets = ( + 29B97326FDCFA39411CA2CEA, + ); + }; + 29B97314FDCFA39411CA2CEA = { + children = ( + 080E96DDFE201D6D7F000001, + 29B97317FDCFA39411CA2CEA, + 29B97323FDCFA39411CA2CEA, + 19C28FACFE9D520D11CA2CBB, + ); + isa = PBXGroup; + name = iMoodUpdater; + path = ""; + refType = 4; + sourceTree = ""; + }; + 29B97316FDCFA39411CA2CEA = { + expectedFileType = sourcecode.c.objc; + fileEncoding = 30; + isa = PBXFileReference; + path = main.m; + refType = 4; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA = { + children = ( + CC4C73FA04FFA54D00A1B3B3, + F5A7328C04422F8C0134A0D8, + 29B97318FDCFA39411CA2CEA, + 089C165CFE840E0CC02AAC07, + ); + isa = PBXGroup; + name = Resources; + path = ""; + refType = 4; + sourceTree = ""; + }; + 29B97318FDCFA39411CA2CEA = { + children = ( + 29B97319FDCFA39411CA2CEA, + ); + isa = PBXVariantGroup; + name = MainMenu.nib; + path = ""; + refType = 4; + sourceTree = ""; + }; + 29B97319FDCFA39411CA2CEA = { + expectedFileType = wrapper.nib; + isa = PBXFileReference; + name = English; + path = English.lproj/MainMenu.nib; + refType = 4; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA = { + children = ( + 1058C7A0FEA54F0111CA2CBB, + 1058C7A2FEA54F0111CA2CBB, + ); + isa = PBXGroup; + name = Frameworks; + path = ""; + refType = 4; + sourceTree = ""; + }; + 29B97324FDCFA39411CA2CEA = { + expectedFileType = wrapper.framework; + fallbackIsa = PBXFileReference; + isa = PBXFrameworkReference; + name = AppKit.framework; + path = /System/Library/Frameworks/AppKit.framework; + refType = 0; + sourceTree = ""; + }; + 29B97325FDCFA39411CA2CEA = { + expectedFileType = wrapper.framework; + fallbackIsa = PBXFileReference; + isa = PBXFrameworkReference; + name = Foundation.framework; + path = /System/Library/Frameworks/Foundation.framework; + refType = 0; + sourceTree = ""; + }; + 29B97326FDCFA39411CA2CEA = { + buildPhases = ( + 29B97327FDCFA39411CA2CEA, + 29B97328FDCFA39411CA2CEA, + 29B9732BFDCFA39411CA2CEA, + 29B9732DFDCFA39411CA2CEA, + ); + buildSettings = { + DEBUGGING_SYMBOLS = NO; + FRAMEWORK_SEARCH_PATHS = ""; + HEADER_SEARCH_PATHS = ""; + INSTALL_PATH = "$(HOME)/Applications"; + LIBRARY_SEARCH_PATHS = ""; + OPTIMIZATION_CFLAGS = "-O3"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + PRECOMPILE_PREFIX_HEADER = YES; + PREFIX_HEADER = iMoodUpdater_Prefix.h; + PRODUCT_NAME = "iMood Updater"; + PROFILING_CODE = YES; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + WRAPPER_EXTENSION = app; + }; + dependencies = ( + ); + isa = PBXApplicationTarget; + name = iMoodUpdater; + productInstallPath = "$(HOME)/Applications"; + productName = iMoodUpdater; + productReference = 17587328FF379C6511CA2CBB; + productSettingsXML = " + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + iMood Updater + CFBundleGetInfoString + 1.52 + CFBundleIconFile + imood + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + iMood Updater + CFBundlePackageType + APPL + CFBundleShortVersionString + iMood Updater v1.52 + CFBundleSignature + ???? + CFBundleVersion + 1.52 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + +"; + }; + 29B97327FDCFA39411CA2CEA = { + buildActionMask = 2147483647; + files = ( + CCFB7AAA043E231D005CDF0D, + CC12CA6D04473407002CDE91, + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 29B97328FDCFA39411CA2CEA = { + buildActionMask = 2147483647; + files = ( + 080E96DCFE201CFB7F000001, + 089C165EFE840E0CC02AAC07, + CC4C73D704FFA53400A1B3B3, + CC4C73D804FFA53400A1B3B3, + CC4C73D904FFA53400A1B3B3, + CC4C73DA04FFA53400A1B3B3, + CC4C73DB04FFA53400A1B3B3, + CC4C73DC04FFA53400A1B3B3, + CC4C73DD04FFA53400A1B3B3, + CC4C73DE04FFA53400A1B3B3, + CC4C73DF04FFA53400A1B3B3, + CC4C73E004FFA53400A1B3B3, + CC4C73E104FFA53400A1B3B3, + CC4C73E204FFA53400A1B3B3, + CC4C73E304FFA53400A1B3B3, + CC4C73E404FFA53400A1B3B3, + CC4C73E504FFA53400A1B3B3, + CC4C73E604FFA53400A1B3B3, + CC4C73E704FFA53400A1B3B3, + CC4C73E804FFA53400A1B3B3, + CC4C73E904FFA53400A1B3B3, + CC4C73EA04FFA53400A1B3B3, + CC4C73EB04FFA53400A1B3B3, + CC4C73EC04FFA53400A1B3B3, + CC4C73ED04FFA53400A1B3B3, + CC4C73EE04FFA53400A1B3B3, + CC4C73EF04FFA53400A1B3B3, + CC4C73F004FFA53400A1B3B3, + CC4C73F104FFA53400A1B3B3, + CC4C73F204FFA53400A1B3B3, + CC4C73F304FFA53400A1B3B3, + CC4C73F404FFA53400A1B3B3, + CC4C73F504FFA53400A1B3B3, + CC4C73F604FFA53400A1B3B3, + CC4C73F704FFA53400A1B3B3, + CC4C73FB04FFA54D00A1B3B3, + ); + isa = PBXResourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 29B9732BFDCFA39411CA2CEA = { + buildActionMask = 2147483647; + files = ( + 29B9732CFDCFA39411CA2CEA, + CC12CA76044734C2002CDE91, + CC95CD6D04F79E8A002032FD, + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 29B9732CFDCFA39411CA2CEA = { + fileRef = 29B97316FDCFA39411CA2CEA; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + ); + }; + }; + 29B9732DFDCFA39411CA2CEA = { + buildActionMask = 2147483647; + files = ( + 1058C7A3FEA54F0111CA2CBB, + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; +//290 +//291 +//292 +//293 +//294 +//4A0 +//4A1 +//4A2 +//4A3 +//4A4 + 4A9504CCFFE6A4B311CA0CBA = { + buildRules = ( + ); + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + OPTIMIZATION_CFLAGS = "-O0"; + ZERO_LINK = YES; + }; + isa = PBXBuildStyle; + name = Development; + }; + 4A9504CDFFE6A4B311CA0CBA = { + buildRules = ( + ); + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + ZERO_LINK = NO; + }; + isa = PBXBuildStyle; + name = Deployment; + }; +//4A0 +//4A1 +//4A2 +//4A3 +//4A4 +//CC0 +//CC1 +//CC2 +//CC3 +//CC4 + CC12CA6C04473407002CDE91 = { + expectedFileType = sourcecode.c.h; + fileEncoding = 30; + isa = PBXFileReference; + path = XMLTree.h; + refType = 4; + sourceTree = ""; + }; + CC12CA6D04473407002CDE91 = { + fileRef = CC12CA6C04473407002CDE91; + isa = PBXBuildFile; + settings = { + }; + }; + CC12CA75044734C2002CDE91 = { + expectedFileType = sourcecode.c.objc; + fileEncoding = 30; + isa = PBXFileReference; + path = XMLTree.m; + refType = 4; + sourceTree = ""; + }; + CC12CA76044734C2002CDE91 = { + fileRef = CC12CA75044734C2002CDE91; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73B604FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 31.gif; + path = Resources/images/31.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73B704FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 15.gif; + path = Resources/images/15.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73B804FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 04.gif; + path = Resources/images/04.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73B904FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 20.gif; + path = Resources/images/20.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73BA04FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 18.gif; + path = Resources/images/18.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73BB04FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 07.gif; + path = Resources/images/07.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73BC04FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 28.gif; + path = Resources/images/28.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73BD04FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 12.gif; + path = Resources/images/12.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73BE04FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 03.gif; + path = Resources/images/03.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73BF04FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 24.gif; + path = Resources/images/24.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73C004FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 10.gif; + path = Resources/images/10.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73C104FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 22.gif; + path = Resources/images/22.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73C204FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 01.gif; + path = Resources/images/01.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73C304FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 30.gif; + path = Resources/images/30.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73C404FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 14.gif; + path = Resources/images/14.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73C504FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 26.gif; + path = Resources/images/26.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73C604FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 06.gif; + path = Resources/images/06.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73C704FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 17.gif; + path = Resources/images/17.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73C804FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 27.gif; + path = Resources/images/27.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73C904FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 11.gif; + path = Resources/images/11.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73CA04FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 23.gif; + path = Resources/images/23.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73CB04FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 09.gif; + path = Resources/images/09.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73CC04FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 32.gif; + path = Resources/images/32.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73CD04FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 00.gif; + path = Resources/images/00.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73CE04FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 21.gif; + path = Resources/images/21.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73CF04FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 05.gif; + path = Resources/images/05.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73D004FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 02.gif; + path = Resources/images/02.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73D104FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 19.gif; + path = Resources/images/19.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73D204FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 13.gif; + path = Resources/images/13.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73D304FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 08.gif; + path = Resources/images/08.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73D404FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 25.gif; + path = Resources/images/25.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73D504FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 29.gif; + path = Resources/images/29.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73D604FFA53400A1B3B3 = { + expectedFileType = image.gif; + isa = PBXFileReference; + name = 16.gif; + path = Resources/images/16.gif; + refType = 4; + sourceTree = ""; + }; + CC4C73D704FFA53400A1B3B3 = { + fileRef = CC4C73B604FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73D804FFA53400A1B3B3 = { + fileRef = CC4C73B704FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73D904FFA53400A1B3B3 = { + fileRef = CC4C73B804FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73DA04FFA53400A1B3B3 = { + fileRef = CC4C73B904FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73DB04FFA53400A1B3B3 = { + fileRef = CC4C73BA04FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73DC04FFA53400A1B3B3 = { + fileRef = CC4C73BB04FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73DD04FFA53400A1B3B3 = { + fileRef = CC4C73BC04FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73DE04FFA53400A1B3B3 = { + fileRef = CC4C73BD04FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73DF04FFA53400A1B3B3 = { + fileRef = CC4C73BE04FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73E004FFA53400A1B3B3 = { + fileRef = CC4C73BF04FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73E104FFA53400A1B3B3 = { + fileRef = CC4C73C004FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73E204FFA53400A1B3B3 = { + fileRef = CC4C73C104FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73E304FFA53400A1B3B3 = { + fileRef = CC4C73C204FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73E404FFA53400A1B3B3 = { + fileRef = CC4C73C304FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73E504FFA53400A1B3B3 = { + fileRef = CC4C73C404FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73E604FFA53400A1B3B3 = { + fileRef = CC4C73C504FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73E704FFA53400A1B3B3 = { + fileRef = CC4C73C604FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73E804FFA53400A1B3B3 = { + fileRef = CC4C73C704FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73E904FFA53400A1B3B3 = { + fileRef = CC4C73C804FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73EA04FFA53400A1B3B3 = { + fileRef = CC4C73C904FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73EB04FFA53400A1B3B3 = { + fileRef = CC4C73CA04FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73EC04FFA53400A1B3B3 = { + fileRef = CC4C73CB04FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73ED04FFA53400A1B3B3 = { + fileRef = CC4C73CC04FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73EE04FFA53400A1B3B3 = { + fileRef = CC4C73CD04FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73EF04FFA53400A1B3B3 = { + fileRef = CC4C73CE04FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73F004FFA53400A1B3B3 = { + fileRef = CC4C73CF04FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73F104FFA53400A1B3B3 = { + fileRef = CC4C73D004FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73F204FFA53400A1B3B3 = { + fileRef = CC4C73D104FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73F304FFA53400A1B3B3 = { + fileRef = CC4C73D204FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73F404FFA53400A1B3B3 = { + fileRef = CC4C73D304FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73F504FFA53400A1B3B3 = { + fileRef = CC4C73D404FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73F604FFA53400A1B3B3 = { + fileRef = CC4C73D504FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73F704FFA53400A1B3B3 = { + fileRef = CC4C73D604FFA53400A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC4C73FA04FFA54D00A1B3B3 = { + expectedFileType = image.icns; + isa = PBXFileReference; + name = imood.icns; + path = Resources/imood.icns; + refType = 4; + sourceTree = ""; + }; + CC4C73FB04FFA54D00A1B3B3 = { + fileRef = CC4C73FA04FFA54D00A1B3B3; + isa = PBXBuildFile; + settings = { + }; + }; + CC95CD6C04F79E8A002032FD = { + expectedFileType = sourcecode.c.objc; + fileEncoding = 30; + isa = PBXFileReference; + path = iMoodUpdater.m; + refType = 4; + sourceTree = ""; + }; + CC95CD6D04F79E8A002032FD = { + fileRef = CC95CD6C04F79E8A002032FD; + isa = PBXBuildFile; + settings = { + }; + }; + CCFB7AA8043E231D005CDF0D = { + expectedFileType = sourcecode.c.h; + fileEncoding = 30; + isa = PBXFileReference; + path = iMoodUpdater.h; + refType = 4; + sourceTree = ""; + }; + CCFB7AA9043E231D005CDF0D = { + expectedFileType = sourcecode.c.objc; + fileEncoding = 30; + isa = PBXFileReference; + name = iMoodUpdater.m; + path = /Users/thrawn/Sandbox/dev/iMoodUpdater.m; + refType = 0; + sourceTree = ""; + }; + CCFB7AAA043E231D005CDF0D = { + fileRef = CCFB7AA8043E231D005CDF0D; + isa = PBXBuildFile; + settings = { + }; + }; +//CC0 +//CC1 +//CC2 +//CC3 +//CC4 +//F50 +//F51 +//F52 +//F53 +//F54 + F5A7328C04422F8C0134A0D8 = { + children = ( + CC4C73B604FFA53400A1B3B3, + CC4C73B704FFA53400A1B3B3, + CC4C73B804FFA53400A1B3B3, + CC4C73B904FFA53400A1B3B3, + CC4C73BA04FFA53400A1B3B3, + CC4C73BB04FFA53400A1B3B3, + CC4C73BC04FFA53400A1B3B3, + CC4C73BD04FFA53400A1B3B3, + CC4C73BE04FFA53400A1B3B3, + CC4C73BF04FFA53400A1B3B3, + CC4C73C004FFA53400A1B3B3, + CC4C73C104FFA53400A1B3B3, + CC4C73C204FFA53400A1B3B3, + CC4C73C304FFA53400A1B3B3, + CC4C73C404FFA53400A1B3B3, + CC4C73C504FFA53400A1B3B3, + CC4C73C604FFA53400A1B3B3, + CC4C73C704FFA53400A1B3B3, + CC4C73C804FFA53400A1B3B3, + CC4C73C904FFA53400A1B3B3, + CC4C73CA04FFA53400A1B3B3, + CC4C73CB04FFA53400A1B3B3, + CC4C73CC04FFA53400A1B3B3, + CC4C73CD04FFA53400A1B3B3, + CC4C73CE04FFA53400A1B3B3, + CC4C73CF04FFA53400A1B3B3, + CC4C73D004FFA53400A1B3B3, + CC4C73D104FFA53400A1B3B3, + CC4C73D204FFA53400A1B3B3, + CC4C73D304FFA53400A1B3B3, + CC4C73D404FFA53400A1B3B3, + CC4C73D504FFA53400A1B3B3, + CC4C73D604FFA53400A1B3B3, + ); + isa = PBXGroup; + name = images; + refType = 4; + sourceTree = ""; + }; + }; + rootObject = 29B97313FDCFA39411CA2CEA; +} diff --git a/OSX/iMoodUpdater_Prefix.h b/OSX/iMoodUpdater_Prefix.h new file mode 100644 index 0000000..ae671b7 --- /dev/null +++ b/OSX/iMoodUpdater_Prefix.h @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'iMoodUpdater' target in the 'iMoodUpdater' project +// + +#ifdef __OBJC__ + #import +#endif diff --git a/OSX/main.m b/OSX/main.m new file mode 100644 index 0000000..a42e30d --- /dev/null +++ b/OSX/main.m @@ -0,0 +1,35 @@ +/* +iMood Updater - Updates your internet mood (imood.com). +Copyright (C) 2003 RiSC, and SDF1 Networks +-------------------------------------------------------------------------- +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +GNU License @ http://www.gnu.org/copyleft/gpl.htm + +iMood Updater version .9 build 14, Copyright (C) 2003 RiSC, and SDF1 Networks +iMood Updater comes with ABSOLUTELY NO WARRANTY +-------------------------------------------------------------------------- +Requirements: + Mac OS X 10.2 +-------------------------------------------------------------------------- +*/ + +#import + +int main(int argc, const char *argv[]) +{ + return NSApplicationMain(argc, argv); +} + diff --git a/cmdline/README b/cmdline/README new file mode 100644 index 0000000..13b656d --- /dev/null +++ b/cmdline/README @@ -0,0 +1,36 @@ +iMood Updater 0.9 - Updates your internet mood (imood.com). +Copyright (C) 2003 RiSC, and SDF1 Networks +-------------------------------------------------------------------------- +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +GNU License @ http://www.gnu.org/copyleft/gpl.htm + +iMood Updater version 0.9, Copyright (C) 2003 RiSC, and SDF1 Networks +iMood Updater comes with ABSOLUTELY NO WARRANTY + +-------------------------------------------------------------------------- +Requirements: + - None +-------------------------------------------------------------------------- + +Known issues: + +- Must have a connection to the internet before running + +To-do list: + +- DES encryption of password being sent to iMood.com +- Better error handling +- Add personal mood diff --git a/cmdline/imoodupdater.c b/cmdline/imoodupdater.c new file mode 100644 index 0000000..35661cd --- /dev/null +++ b/cmdline/imoodupdater.c @@ -0,0 +1,93 @@ +/* +-------------------------------------------------------------------------- +iMood - Using www.imood.com's API we can change our web mood +Copyright (C) 2003 Rise In Superior Code & SDF1 Networks +-------------------------------------------------------------------------- +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +GNU License @ http://www.gnu.org/copyleft/gpl.htm + +iMood version 1.0, Copyright (C) 2003 Rise In Superior Code & SDF1 Networks +iMood comes with ABSOLUTELY NO WARRANTY +*/ + +#include +#include +#include +#include +#include +#include +#include + +void iMoodSend(char **argv) +{ + char buffy[2048]; + int dstPort, sock, result; + struct sockaddr_in name; + struct hostent *hostinfo; + + dstPort = 80; + + hostinfo=gethostbyname("my.imood.com"); + if (!hostinfo){ + herror("Error"); exit(-1); + } + + name.sin_family=AF_INET; + name.sin_port=htons(dstPort); + name.sin_addr=*(struct in_addr *)hostinfo->h_addr; + sock=socket(AF_INET, SOCK_STREAM, 0); + result=connect(sock, (struct sockaddr *)&name, sizeof(struct sockaddr_in)); + if (result != 0) { + herror("Error"); + exit(-1); + } + + sock=socket(AF_INET, SOCK_STREAM, 0); + result=connect(sock, (struct sockaddr *)&name, sizeof(struct sockaddr_in)); + if (result != 0) { + herror("Error"); + exit(-1); + } + + strcpy(buffy, "GET /updater.cgi?action=update&new_mood="); + strncat(buffy,argv[3],256); + strcat(buffy,"&face="); + strncat(buffy,argv[4],2); + strcat(buffy," HTTP/1.1\r\n"); + strcat(buffy,"Host: www2.imood.com\r\n"); + strcat(buffy, "Cookie: imood_pass="); + strncat(buffy,argv[2],256); + strcat(buffy,"; imood_user="); + strncat(buffy,argv[1],256); + strcat(buffy,"\r\n\r\n"); + + send(sock, buffy, sizeof(buffy), 0); + + return; +} + +int main(int argc, char **argv) +{ + if (argc < 4 || argc > 5){ + printf ("\r\nUsage:\r\n%s UID PW Mood FaceID\r\n", argv[0]); + printf ("FaceID:\t0-32\r\nie: imood bob@bob.com myPass happy 0\r\n\r\n"); + exit(0); + } + + iMoodSend(argv); + printf ("\r\niMood Updated\r\n"); + return 0; +} \ No newline at end of file diff --git a/python/README b/python/README new file mode 100644 index 0000000..b710e15 --- /dev/null +++ b/python/README @@ -0,0 +1,44 @@ +iMood Updater 1.52-python - Updates your internet mood (imood.com). +Copyright (C) 2003 RiSC, and SDF1 Networks +-------------------------------------------------------------------------- +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +GNU License @ http://www.gnu.org/copyleft/gpl.htm + +iMood Updater version 1.52-python, Copyright (C) 2003 RiSC, and SDF1 Networks +iMood Updater comes with ABSOLUTELY NO WARRANTY +-------------------------------------------------------------------------- +Requirements: + Python 2.2+ (python.org) + PyXML (PyXML.sf.net) + - Only if using source version +-------------------------------------------------------------------------- + +New in 1.52: + +- Added MD5 password encryption before sending to imood.com + +New in 1.51: + +- Ported over C code from the command line version +- Added error handling + +Known issues: + +- password is sent in plain text + +To-do list: + +- Add GUI diff --git a/python/imoodupdater.py b/python/imoodupdater.py new file mode 100644 index 0000000..920279d --- /dev/null +++ b/python/imoodupdater.py @@ -0,0 +1,95 @@ +""" +iMood Updater 1.52-python - Updates your internet mood (imood.com). +Copyright (C) 2003 RiSC, and SDF1 Networks +-------------------------------------------------------------------------- +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +GNU License @ http://www.gnu.org/copyleft/gpl.htm + +iMood Updater version 1.52-python, Copyright (C) 2003 RiSC, and SDF1 Networks +iMood Updater comes with ABSOLUTELY NO WARRANTY +-------------------------------------------------------------------------- +Requirements: + Python 2.2+ (python.org) + PyXML (PyXML.sf.net) + - Only if using source version +-------------------------------------------------------------------------- +""" + +from xml.dom.ext.reader import Sax2 +from whrandom import choice +import httplib, urllib, sys, getopt, crypt, random, re, string + +def GenRandStr(length=8, chars=string.uppercase + string.lowercase + string.digits + "./"): + return ''.join([choice(chars) for i in range(length)]) + +def updateMood(userID, passwd, mood, face, pMood): + params = "email=" + userID + "&crypt=1" + "&password=" + passwd + "&base=" + mood + "&face=" + face + "&personal=" + pMood + + print params + try: + tempURL = "/update.cgi" + "?" + params + h = httplib.HTTP("xml.imood.org") + h.putrequest('GET', tempURL) + h.putheader('User-Agent', 'iMood Updater(python)') + h.putheader('Connection', 'close') + h.putheader('Host', 'xml.imood.org') + h.endheaders() + except Exception, reason: + print "Error: Could not contact imood.com" + sys.exit(2) + + try: + reply, msg, hdrs = h.getreply() + data = h.getfile().read() + + reader = Sax2.Reader() + doc_node = reader.fromString(data) + result = doc_node.documentElement.getElementsByTagName("error")[ 0] + print result.firstChild.data + except Exception, reason: + print "Warning: Bad data from imood.com, mood may not have been updated" + sys.exit(2) + +usage = "Usage: %s <\"mood\"> [\"personal mood\"]\n<> are required params, [] are optional" % sys.argv[0] + +try: + opts, args = getopt.getopt(sys.argv[1:], "h", ["help"]) +except getopt.error, msg: + print msg + print "for help use --help" + sys.exit(2) +for o, a in opts: + if o in ("-h", "--help"): + print usage; + sys.exit(0) + +try: + userID = sys.argv[1] + salt = GenRandStr() + passwd= crypt.crypt(sys.argv[2], salt) + mood = sys.argv[3] + face = sys.argv[4] +except IndexError: + print usage; + sys.exit(0) + +try: + pMood = sys.argv[5] +except IndexError: + pMood = "" + +print "Updateing your iMood..." +updateMood(userID, passwd, mood, face, pMood)