|
From: <arn...@us...> - 2008-04-29 19:09:12
|
Revision: 1228
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1228&view=rev
Author: arnetheduck
Date: 2008-04-29 12:09:02 -0700 (Tue, 29 Apr 2008)
Log Message:
-----------
automanage searchresult memory
Modified Paths:
--------------
dcplusplus/trunk/dcpp/ClientManager.cpp
dcplusplus/trunk/dcpp/DirectoryListing.cpp
dcplusplus/trunk/dcpp/QueueManager.cpp
dcplusplus/trunk/dcpp/QueueManager.h
dcplusplus/trunk/dcpp/SearchManager.cpp
dcplusplus/trunk/dcpp/SearchManager.h
dcplusplus/trunk/dcpp/SearchManagerListener.h
dcplusplus/trunk/dcpp/ShareManager.cpp
dcplusplus/trunk/dcpp/ShareManager.h
dcplusplus/trunk/dcpp/forward.h
dcplusplus/trunk/win32/SearchFrame.cpp
dcplusplus/trunk/win32/SearchFrame.h
Added Paths:
-----------
dcplusplus/trunk/dcpp/SearchResult.cpp
dcplusplus/trunk/dcpp/SearchResult.h
Property Changed:
----------------
dcplusplus/trunk/
Property changes on: dcplusplus/trunk
___________________________________________________________________
Name: bzr:revision-info
- timestamp: 2008-04-25 12:28:10.062000036 +0200
committer: eMTee
properties:
branch-nick: dcplusplus
+ timestamp: 2008-04-26 16:00:33.614000082 +0200
committer: Jacek Sieka <arn...@gm...>
properties:
branch-nick: dcplusplus
Name: bzr:file-ids
-
+ dcpp/SearchResult.cpp searchresult.cpp-20080426140015-fr3xaldbtci8l80c-1
dcpp/SearchResult.h searchresult.h-20080426140015-fr3xaldbtci8l80c-2
Name: bzr:revision-id:v3-trunk1
- 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn
1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn
1029 zouzou123gen-20080323221249-0su72zaj13e706mk
1030 arn...@gm...-20080324140623-muba1dl46m000o8c
1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6
1032 arn...@gm...-20080324153706-siidja05n84i00b1
1033 arn...@gm...-20080324153823-lhn3awurnu77riln
1034 arn...@gm...-20080324165650-zapppziji67yf5a2
1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2
1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3
1037 arn...@gm...-20080325100659-8fqy6q65itmghlep
1038 zouzou123gen-20080325175216-s297sdiucukfvijh
1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087
1040 arn...@gm...-20080325211747-nwwy1eb33r071sca
1041 arn...@gm...-20080326084110-qbselrjckku275xi
1042 zouzou123gen-20080326123631-35642mgbk2i4ty32
1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r
1044 arn...@gm...-20080326162031-il0nyms30w0mky43
1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv
1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g
1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv
1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q
1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz
1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf
1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd
1052 arn...@gm...-20080327120639-um3tukdt374rwvgm
1053 zouzou123gen-20080327130703-6vtek6uxy3vua543
1054 arn...@gm...-20080327215831-dmg5mkufskabwkro
1055 arn...@gm...-20080327231459-cdztcv25alsuyqmf
1056 arn...@gm...-20080328085925-gceybsr53oml1p24
1057 arn...@gm...-20080328200512-1sjuu6bcnl2dyd2a
1058 arn...@gm...-20080328210347-bussqjrm5mfswh7o
1059 arn...@gm...-20080329055630-braiir1dskv7a4qm
1060 arn...@gm...-20080329061558-rck8dz60wpj3c5ja
1061 arn...@gm...-20080329081253-if6o5jn329mbzfpl
1062 arn...@gm...-20080329081619-cb4x930j8sp55cs0
1063 arn...@gm...-20080329103216-hgjzo7ra2zixbztd
1064 arn...@gm...-20080329124042-q3aw4iodmo5kafyp
1065 arn...@gm...-20080329124926-2je1z18p0272zpua
1066 arn...@gm...-20080329150901-ehj9t32en7eps2dp
1067 zouzou123gen-20080329153653-36xlvpik2ns9r84r
1068 zouzou123gen-20080329162703-51xr8hg073pg7wq5
1069 zouzou123gen-20080329234706-8ddipdqu0xeudkql
1070 arn...@gm...-20080330081232-ubqr1171ewalrd4q
1071 zouzou123gen-20080330131607-yppbs3mgyjef1cux
1072 zouzou123gen-20080330134835-yv1nogy77ib1uehd
1073 zouzou123gen-20080331124549-alyw7vugdn30piqy
1074 zouzou123gen-20080331135108-q8frtqsin5bosfzm
1075 zouzou123gen-20080331140757-u94q52yccl5lsifk
1076 zouzou123gen-20080331152513-ue1x5qhigcw51348
1077 arn...@gm...-20080331184436-a8g6chibmg8nswls
1078 arn...@gm...-20080331220648-81485k28qmwruwz6
1079 zouzou123gen-20080401081001-2yjn07cf8s5sxr3a
1080 zouzou123gen-20080401081247-f3p4hdjojnd460jw
1081 zouzou123gen-20080401084117-24a454g8o0x656kg
1082 zouzou123gen-20080401133146-jabb5i8870fg6f66
1083 zouzou123gen-20080401154610-mxdqoo5bksru93e6
1084 arn...@gm...-20080401185530-lqj4tflt5ldmx46f
1085 arn...@gm...-20080401212616-ffl7m0xm8gt15knk
1086 arn...@gm...-20080402084515-ofmnwihzv159jton
1087 arn...@gm...-20080402133105-y70soi38owzl76i9
1088 arn...@gm...-20080402142417-rn2dbkx19wfz3vae
1089 arn...@gm...-20080402144459-u3z3hqvl8aqjc4a0
1090 zouzou123gen-20080402145051-zi8tmvy8u3r2mzu8
1091 arn...@gm...-20080402152137-f397uz1yp9qjvfwh
1092 zouzou123gen-20080402170355-29wda40wk3cy7lu5
1093 arn...@gm...-20080402180628-ipos9li0c4bsmq1h
1094 arn...@gm...-20080402181235-s2a6f4ww4lzayl46
1095 arn...@gm...-20080402193851-6mu64vgep6tijith
1096 arn...@gm...-20080402203810-86zpxsx69q83zf3r
1097 arn...@gm...-20080402204331-so2e8n892o23pejr
1098 poy-20080402224153-225qylr2cfwhqrg7
1099 mrmikejj-20080403125112-o8polh8rkn62umyh
1100 arn...@gm...-20080403125139-8xub76j1xazhfxna
1101 po...@12...-20080403140544-13kockkjho883nb4
1102 po...@12...-20080403143012-bxghtoodiolugpbs
1103 arn...@gm...-20080403190809-bbi4bz5rfcvjnt20
1104 arn...@gm...-20080403205410-czxru1vcg1s4wcws
1105 arn...@gm...-20080403213124-54spdrwszgyimd90
1106 po...@12...-20080404002406-aj74x5tngi6mmmj1
1107 arn...@gm...-20080404122415-mjy07qzbaxyhagra
1108 po...@12...-20080404145445-84lyk5tyy3b3br14
1109 po...@12...-20080404231417-v4v8x7u3f0hm0ejc
1110 po...@12...-20080405001107-14d1ojjof8xhvcj8
1111 arn...@gm...-20080405071929-jmnrul21sxx04kky
1112 arn...@gm...-20080405080105-9qbda7be0pi7y1ai
1113 po...@12...-20080405154555-yuj2n5kyndfjlpsf
1114 po...@12...-20080405220250-8y09d0samsj8ja94
1115 po...@12...-20080406134101-4860ytb61sbu3yhg
1116 po...@12...-20080406155849-2wzxzuzs5m8zpk0g
1117 po...@12...-20080406164835-bv5dydhm3qqydsty
1118 arn...@gm...-20080406210237-c7tyfgiz2sjgv044
1119 po...@12...-20080407114423-4yajg1rffidq76bj
1120 arn...@gm...-20080407194826-c42t4bjzw4vflejn
1121 po...@12...-20080407214303-o7ul1bvcn6gvaoc9
1122 po...@12...-20080407220647-r7f3em92til5j67s
1123 po...@12...-20080408212439-54t3bqlhvw1nu4xc
1124 arn...@gm...-20080409193708-y6erfzwrcb1seet3
1125 arn...@gm...-20080409195827-ub6t2s3wdf28nfpz
1126 po...@12...-20080409215055-1zmqhhm2859878c1
1127 arn...@gm...-20080410102447-l4es4cbukkqwcnpc
1128 arn...@gm...-20080410214118-b70g50tl27cq9q29
1129 arn...@gm...-20080411074730-w1pu78qigtx87lx3
1130 arn...@gm...-20080411090724-kwdj9pg9hrv1xhwb
1131 po...@12...-20080411153057-tn7zhxqk0z7ceref
1132 arn...@gm...-20080411200946-ierqlg8v9vzj18n2
1133 arn...@gm...-20080411201718-ecshulwd7ic0wdci
1134 arn...@gm...-20080411204047-jc9vzcsf32j38dvc
1135 arn...@gm...-20080411205445-ojuz2a29yq8ww37j
1136 arn...@gm...-20080411214746-r420xmdgo35pkweb
1137 po...@12...-20080412010723-cibh8r0itlzqyt3f
1138 arn...@gm...-20080412200504-6qfeqnsghxgrk775
1139 arn...@gm...-20080413095435-2pkfb407hk8j54te
1140 arn...@gm...-20080413133927-zw2tpz8o8p3izyix
1141 arn...@gm...-20080413165025-ug342rxtq4blxck5
1142 arn...@gm...-20080413182618-6ihabn0tii6gb2m2
1143 arn...@gm...-20080413184517-9p08tedakta1h762
1144 arn...@gm...-20080413193655-kc98lx7kpzo42q43
1145 arn...@gm...-20080414132947-pguvkuzvyadukssc
1146 arn...@gm...-20080414133544-pxwxm9kcvw0k0vf3
1147 po...@12...-20080414174341-hw1im7ysymscpiq0
1148 arn...@gm...-20080414181459-5gu852lneflgf5d6
1149 po...@12...-20080414205719-d80e75fsl8zzi6je
1150 arn...@gm...-20080414211616-835ve71r1qdlbhb4
1151 arn...@gm...-20080415080409-4cid9q7opng8ijav
1152 arn...@gm...-20080415124540-roduj23x442jeefn
1153 arn...@gm...-20080415141450-cld2ym4s50uu31q7
1154 po...@12...-20080415143018-4emcs3u1fquzsu1f
1155 arn...@gm...-20080415174958-wfqu5kga5pe39xvc
1156 po...@12...-20080415182942-2ux0yn8immkrz7ch
1157 po...@12...-20080415185700-gdgpyn414bf4behz
1158 po...@12...-20080415202535-cvevdgrawpilji5b
1159 po...@12...-20080415214801-lgb1429qdm4ti6ub
1160 po...@12...-20080416123247-6dw18ea0lk4m5q8q
1161 po...@12...-20080416135834-6mtzcfy7pzxqfnq0
1162 po...@12...-20080416181626-0ex66f1lv1maf38l
1163 arn...@gm...-20080416183603-yxbj16t2nd8rdzzd
1164 arn...@gm...-20080416200700-wncbhytfixz9b15u
1165 po...@12...-20080416200941-5oigemky43sz6r87
1166 arn...@gm...-20080416204550-0dx3qhxasdkdohx1
1167 arn...@gm...-20080416211510-3ilsym0bom7u2cer
1168 tom@athlon-20080417125238-0hhhchg951y7p83w
1169 arn...@gm...-20080418203137-e6szrje3fje5dgh9
1170 arn...@gm...-20080419164722-vyjrwwvglxr4yxuu
1171 arn...@gm...-20080419164802-o2boulbfrea4e0dx
1172 arn...@gm...-20080419165129-zj3axn731fo84vd5
1173 po...@12...-20080419172806-2qspfwerslo10rd2
1174 arn...@gm...-20080419212304-3wjafor82amtvik3
1175 arn...@gm...-20080419212347-t5oze1b59dk7vkiv
1176 arn...@gm...-20080420133104-h16loa3kvzrpkxiv
1177 po...@12...-20080420141642-z9mgyje16kkfy11z
1178 arn...@gm...-20080420173012-we22yoyvldt8u1az
1179 arn...@gm...-20080420173645-l296bgbr60wj267s
1180 arn...@gm...-20080420181134-ypu4ik21vc9ma1u9
1181 arn...@gm...-20080420192935-g59ddftmp35o6wdq
1182 arn...@gm...-20080420194530-qbyih90fixp3jevq
1183 arn...@gm...-20080420200905-mc0wa2egjt6k0783
1184 po...@12...-20080421110151-tm3apquwg3p4otyv
1185 po...@12...-20080421111032-2mwe6we5llzbqfj1
1186 arn...@gm...-20080421112743-av3pdgtq20m91f8c
1187 arn...@gm...-20080421122035-2ygc85ppjs7rhswn
1188 arn...@gm...-20080421194323-clug9p9pkjkgc0cw
1189 arn...@gm...-20080422063343-blx6k6y2ydxtbkjy
1190 po...@12...-20080422102607-kb3rl7h4i6alv3oo
1191 po...@12...-20080422143053-gsqp7dlvq1vwkahf
1192 arn...@gm...-20080423181453-79vl70wtqix7zxhf
1193 arn...@gm...-20080423184105-mp2f385vndp22m8f
1194 arn...@gm...-20080423185140-vz1vp66h0xzrxv6m
1195 arn...@gm...-20080423191309-bxflhitmwd36vix3
1196 arn...@gm...-20080423191718-3sc2ek2axdtc0b6e
1197 po...@12...-20080423223740-naz9ch6wp525yonb
1198 administrator@user315-m-20080424114244-eu0vcezrvqz7sf8t
1199 administrator@user315-m-20080424121241-ta23vg7isv4346qw
1200 po...@12...-20080424210032-97omp80p01ag7tlr
1201 arn...@gm...-20080424212827-v52bn9nu74id6fjx
1202 emtee-20080425102810-x4gbuupquvl3vja0
+ 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn
1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn
1029 zouzou123gen-20080323221249-0su72zaj13e706mk
1030 arn...@gm...-20080324140623-muba1dl46m000o8c
1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6
1032 arn...@gm...-20080324153706-siidja05n84i00b1
1033 arn...@gm...-20080324153823-lhn3awurnu77riln
1034 arn...@gm...-20080324165650-zapppziji67yf5a2
1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2
1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3
1037 arn...@gm...-20080325100659-8fqy6q65itmghlep
1038 zouzou123gen-20080325175216-s297sdiucukfvijh
1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087
1040 arn...@gm...-20080325211747-nwwy1eb33r071sca
1041 arn...@gm...-20080326084110-qbselrjckku275xi
1042 zouzou123gen-20080326123631-35642mgbk2i4ty32
1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r
1044 arn...@gm...-20080326162031-il0nyms30w0mky43
1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv
1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g
1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv
1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q
1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz
1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf
1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd
1052 arn...@gm...-20080327120639-um3tukdt374rwvgm
1053 zouzou123gen-20080327130703-6vtek6uxy3vua543
1054 arn...@gm...-20080327215831-dmg5mkufskabwkro
1055 arn...@gm...-20080327231459-cdztcv25alsuyqmf
1056 arn...@gm...-20080328085925-gceybsr53oml1p24
1057 arn...@gm...-20080328200512-1sjuu6bcnl2dyd2a
1058 arn...@gm...-20080328210347-bussqjrm5mfswh7o
1059 arn...@gm...-20080329055630-braiir1dskv7a4qm
1060 arn...@gm...-20080329061558-rck8dz60wpj3c5ja
1061 arn...@gm...-20080329081253-if6o5jn329mbzfpl
1062 arn...@gm...-20080329081619-cb4x930j8sp55cs0
1063 arn...@gm...-20080329103216-hgjzo7ra2zixbztd
1064 arn...@gm...-20080329124042-q3aw4iodmo5kafyp
1065 arn...@gm...-20080329124926-2je1z18p0272zpua
1066 arn...@gm...-20080329150901-ehj9t32en7eps2dp
1067 zouzou123gen-20080329153653-36xlvpik2ns9r84r
1068 zouzou123gen-20080329162703-51xr8hg073pg7wq5
1069 zouzou123gen-20080329234706-8ddipdqu0xeudkql
1070 arn...@gm...-20080330081232-ubqr1171ewalrd4q
1071 zouzou123gen-20080330131607-yppbs3mgyjef1cux
1072 zouzou123gen-20080330134835-yv1nogy77ib1uehd
1073 zouzou123gen-20080331124549-alyw7vugdn30piqy
1074 zouzou123gen-20080331135108-q8frtqsin5bosfzm
1075 zouzou123gen-20080331140757-u94q52yccl5lsifk
1076 zouzou123gen-20080331152513-ue1x5qhigcw51348
1077 arn...@gm...-20080331184436-a8g6chibmg8nswls
1078 arn...@gm...-20080331220648-81485k28qmwruwz6
1079 zouzou123gen-20080401081001-2yjn07cf8s5sxr3a
1080 zouzou123gen-20080401081247-f3p4hdjojnd460jw
1081 zouzou123gen-20080401084117-24a454g8o0x656kg
1082 zouzou123gen-20080401133146-jabb5i8870fg6f66
1083 zouzou123gen-20080401154610-mxdqoo5bksru93e6
1084 arn...@gm...-20080401185530-lqj4tflt5ldmx46f
1085 arn...@gm...-20080401212616-ffl7m0xm8gt15knk
1086 arn...@gm...-20080402084515-ofmnwihzv159jton
1087 arn...@gm...-20080402133105-y70soi38owzl76i9
1088 arn...@gm...-20080402142417-rn2dbkx19wfz3vae
1089 arn...@gm...-20080402144459-u3z3hqvl8aqjc4a0
1090 zouzou123gen-20080402145051-zi8tmvy8u3r2mzu8
1091 arn...@gm...-20080402152137-f397uz1yp9qjvfwh
1092 zouzou123gen-20080402170355-29wda40wk3cy7lu5
1093 arn...@gm...-20080402180628-ipos9li0c4bsmq1h
1094 arn...@gm...-20080402181235-s2a6f4ww4lzayl46
1095 arn...@gm...-20080402193851-6mu64vgep6tijith
1096 arn...@gm...-20080402203810-86zpxsx69q83zf3r
1097 arn...@gm...-20080402204331-so2e8n892o23pejr
1098 poy-20080402224153-225qylr2cfwhqrg7
1099 mrmikejj-20080403125112-o8polh8rkn62umyh
1100 arn...@gm...-20080403125139-8xub76j1xazhfxna
1101 po...@12...-20080403140544-13kockkjho883nb4
1102 po...@12...-20080403143012-bxghtoodiolugpbs
1103 arn...@gm...-20080403190809-bbi4bz5rfcvjnt20
1104 arn...@gm...-20080403205410-czxru1vcg1s4wcws
1105 arn...@gm...-20080403213124-54spdrwszgyimd90
1106 po...@12...-20080404002406-aj74x5tngi6mmmj1
1107 arn...@gm...-20080404122415-mjy07qzbaxyhagra
1108 po...@12...-20080404145445-84lyk5tyy3b3br14
1109 po...@12...-20080404231417-v4v8x7u3f0hm0ejc
1110 po...@12...-20080405001107-14d1ojjof8xhvcj8
1111 arn...@gm...-20080405071929-jmnrul21sxx04kky
1112 arn...@gm...-20080405080105-9qbda7be0pi7y1ai
1113 po...@12...-20080405154555-yuj2n5kyndfjlpsf
1114 po...@12...-20080405220250-8y09d0samsj8ja94
1115 po...@12...-20080406134101-4860ytb61sbu3yhg
1116 po...@12...-20080406155849-2wzxzuzs5m8zpk0g
1117 po...@12...-20080406164835-bv5dydhm3qqydsty
1118 arn...@gm...-20080406210237-c7tyfgiz2sjgv044
1119 po...@12...-20080407114423-4yajg1rffidq76bj
1120 arn...@gm...-20080407194826-c42t4bjzw4vflejn
1121 po...@12...-20080407214303-o7ul1bvcn6gvaoc9
1122 po...@12...-20080407220647-r7f3em92til5j67s
1123 po...@12...-20080408212439-54t3bqlhvw1nu4xc
1124 arn...@gm...-20080409193708-y6erfzwrcb1seet3
1125 arn...@gm...-20080409195827-ub6t2s3wdf28nfpz
1126 po...@12...-20080409215055-1zmqhhm2859878c1
1127 arn...@gm...-20080410102447-l4es4cbukkqwcnpc
1128 arn...@gm...-20080410214118-b70g50tl27cq9q29
1129 arn...@gm...-20080411074730-w1pu78qigtx87lx3
1130 arn...@gm...-20080411090724-kwdj9pg9hrv1xhwb
1131 po...@12...-20080411153057-tn7zhxqk0z7ceref
1132 arn...@gm...-20080411200946-ierqlg8v9vzj18n2
1133 arn...@gm...-20080411201718-ecshulwd7ic0wdci
1134 arn...@gm...-20080411204047-jc9vzcsf32j38dvc
1135 arn...@gm...-20080411205445-ojuz2a29yq8ww37j
1136 arn...@gm...-20080411214746-r420xmdgo35pkweb
1137 po...@12...-20080412010723-cibh8r0itlzqyt3f
1138 arn...@gm...-20080412200504-6qfeqnsghxgrk775
1139 arn...@gm...-20080413095435-2pkfb407hk8j54te
1140 arn...@gm...-20080413133927-zw2tpz8o8p3izyix
1141 arn...@gm...-20080413165025-ug342rxtq4blxck5
1142 arn...@gm...-20080413182618-6ihabn0tii6gb2m2
1143 arn...@gm...-20080413184517-9p08tedakta1h762
1144 arn...@gm...-20080413193655-kc98lx7kpzo42q43
1145 arn...@gm...-20080414132947-pguvkuzvyadukssc
1146 arn...@gm...-20080414133544-pxwxm9kcvw0k0vf3
1147 po...@12...-20080414174341-hw1im7ysymscpiq0
1148 arn...@gm...-20080414181459-5gu852lneflgf5d6
1149 po...@12...-20080414205719-d80e75fsl8zzi6je
1150 arn...@gm...-20080414211616-835ve71r1qdlbhb4
1151 arn...@gm...-20080415080409-4cid9q7opng8ijav
1152 arn...@gm...-20080415124540-roduj23x442jeefn
1153 arn...@gm...-20080415141450-cld2ym4s50uu31q7
1154 po...@12...-20080415143018-4emcs3u1fquzsu1f
1155 arn...@gm...-20080415174958-wfqu5kga5pe39xvc
1156 po...@12...-20080415182942-2ux0yn8immkrz7ch
1157 po...@12...-20080415185700-gdgpyn414bf4behz
1158 po...@12...-20080415202535-cvevdgrawpilji5b
1159 po...@12...-20080415214801-lgb1429qdm4ti6ub
1160 po...@12...-20080416123247-6dw18ea0lk4m5q8q
1161 po...@12...-20080416135834-6mtzcfy7pzxqfnq0
1162 po...@12...-20080416181626-0ex66f1lv1maf38l
1163 arn...@gm...-20080416183603-yxbj16t2nd8rdzzd
1164 arn...@gm...-20080416200700-wncbhytfixz9b15u
1165 po...@12...-20080416200941-5oigemky43sz6r87
1166 arn...@gm...-20080416204550-0dx3qhxasdkdohx1
1167 arn...@gm...-20080416211510-3ilsym0bom7u2cer
1168 tom@athlon-20080417125238-0hhhchg951y7p83w
1169 arn...@gm...-20080418203137-e6szrje3fje5dgh9
1170 arn...@gm...-20080419164722-vyjrwwvglxr4yxuu
1171 arn...@gm...-20080419164802-o2boulbfrea4e0dx
1172 arn...@gm...-20080419165129-zj3axn731fo84vd5
1173 po...@12...-20080419172806-2qspfwerslo10rd2
1174 arn...@gm...-20080419212304-3wjafor82amtvik3
1175 arn...@gm...-20080419212347-t5oze1b59dk7vkiv
1176 arn...@gm...-20080420133104-h16loa3kvzrpkxiv
1177 po...@12...-20080420141642-z9mgyje16kkfy11z
1178 arn...@gm...-20080420173012-we22yoyvldt8u1az
1179 arn...@gm...-20080420173645-l296bgbr60wj267s
1180 arn...@gm...-20080420181134-ypu4ik21vc9ma1u9
1181 arn...@gm...-20080420192935-g59ddftmp35o6wdq
1182 arn...@gm...-20080420194530-qbyih90fixp3jevq
1183 arn...@gm...-20080420200905-mc0wa2egjt6k0783
1184 po...@12...-20080421110151-tm3apquwg3p4otyv
1185 po...@12...-20080421111032-2mwe6we5llzbqfj1
1186 arn...@gm...-20080421112743-av3pdgtq20m91f8c
1187 arn...@gm...-20080421122035-2ygc85ppjs7rhswn
1188 arn...@gm...-20080421194323-clug9p9pkjkgc0cw
1189 arn...@gm...-20080422063343-blx6k6y2ydxtbkjy
1190 po...@12...-20080422102607-kb3rl7h4i6alv3oo
1191 po...@12...-20080422143053-gsqp7dlvq1vwkahf
1192 arn...@gm...-20080423181453-79vl70wtqix7zxhf
1193 arn...@gm...-20080423184105-mp2f385vndp22m8f
1194 arn...@gm...-20080423185140-vz1vp66h0xzrxv6m
1195 arn...@gm...-20080423191309-bxflhitmwd36vix3
1196 arn...@gm...-20080423191718-3sc2ek2axdtc0b6e
1197 po...@12...-20080423223740-naz9ch6wp525yonb
1198 administrator@user315-m-20080424114244-eu0vcezrvqz7sf8t
1199 administrator@user315-m-20080424121241-ta23vg7isv4346qw
1200 po...@12...-20080424210032-97omp80p01ag7tlr
1201 arn...@gm...-20080424212827-v52bn9nu74id6fjx
1202 emtee-20080425102810-x4gbuupquvl3vja0
1203 arn...@gm...-20080426140033-767pxugmoex9ptgd
Modified: dcplusplus/trunk/dcpp/ClientManager.cpp
===================================================================
--- dcplusplus/trunk/dcpp/ClientManager.cpp 2008-04-29 19:07:03 UTC (rev 1227)
+++ dcplusplus/trunk/dcpp/ClientManager.cpp 2008-04-29 19:09:02 UTC (rev 1228)
@@ -29,6 +29,7 @@
#include "SimpleXML.h"
#include "UserCommand.h"
#include "LogManager.h"
+#include "SearchResult.h"
#include "AdcHub.h"
#include "NmdcHub.h"
@@ -342,7 +343,7 @@
return;
}
- SearchResult::List l;
+ SearchResultList l;
ShareManager::getInstance()->search(l, aString, aSearchType, aSize, aFileType, aClient, isPassive ? 5 : 10);
// dcdebug("Found %d items (%s)\n", l.size(), aString.c_str());
if(l.size() > 0) {
@@ -350,14 +351,12 @@
string name = aSeeker.substr(4);
// Good, we have a passive seeker, those are easier...
string str;
- for(SearchResult::Iter i = l.begin(); i != l.end(); ++i) {
- SearchResult* sr = *i;
+ for(SearchResultList::const_iterator i = l.begin(); i != l.end(); ++i) {
+ const SearchResultPtr& sr = *i;
str += sr->toSR(*aClient);
str[str.length()-1] = 5;
str += name;
str += '|';
-
- sr->decRef();
}
if(str.size() > 0)
@@ -378,10 +377,9 @@
if(port == 0)
port = 412;
- for(SearchResult::Iter i = l.begin(); i != l.end(); ++i) {
- SearchResult* sr = *i;
+ for(SearchResultList::const_iterator i = l.begin(); i != l.end(); ++i) {
+ const SearchResultPtr& sr = *i;
udp.writeTo(ip, port, sr->toSR(*aClient));
- sr->decRef();
}
} catch(const SocketException& /* e */) {
dcdebug("Search caught error\n");
Modified: dcplusplus/trunk/dcpp/DirectoryListing.cpp
===================================================================
--- dcplusplus/trunk/dcpp/DirectoryListing.cpp 2008-04-29 19:07:03 UTC (rev 1227)
+++ dcplusplus/trunk/dcpp/DirectoryListing.cpp 2008-04-29 19:09:02 UTC (rev 1228)
@@ -22,7 +22,6 @@
#include "DirectoryListing.h"
#include "QueueManager.h"
-#include "SearchManager.h"
#include "ClientManager.h"
#include "StringTokenizer.h"
Modified: dcplusplus/trunk/dcpp/QueueManager.cpp
===================================================================
--- dcplusplus/trunk/dcpp/QueueManager.cpp 2008-04-29 19:07:03 UTC (rev 1227)
+++ dcplusplus/trunk/dcpp/QueueManager.cpp 2008-04-29 19:09:02 UTC (rev 1228)
@@ -35,6 +35,7 @@
#include "Transfer.h"
#include "UserConnection.h"
#include "version.h"
+#include "SearchResult.h"
#include <limits>
@@ -1388,7 +1389,7 @@
}
// SearchManagerListener
-void QueueManager::on(SearchManagerListener::SR, SearchResult* sr) throw() {
+void QueueManager::on(SearchManagerListener::SR, const SearchResultPtr& sr) throw() {
bool added = false;
bool wantConnection = false;
Modified: dcplusplus/trunk/dcpp/QueueManager.h
===================================================================
--- dcplusplus/trunk/dcpp/QueueManager.h 2008-04-29 19:07:03 UTC (rev 1227)
+++ dcplusplus/trunk/dcpp/QueueManager.h 2008-04-29 19:09:02 UTC (rev 1228)
@@ -245,7 +245,7 @@
virtual void on(TimerManagerListener::Minute, uint32_t aTick) throw();
// SearchManagerListener
- virtual void on(SearchManagerListener::SR, SearchResult*) throw();
+ virtual void on(SearchManagerListener::SR, const SearchResultPtr&) throw();
// ClientManagerListener
virtual void on(ClientManagerListener::UserConnected, const UserPtr& aUser) throw();
Modified: dcplusplus/trunk/dcpp/SearchManager.cpp
===================================================================
--- dcplusplus/trunk/dcpp/SearchManager.cpp 2008-04-29 19:07:03 UTC (rev 1227)
+++ dcplusplus/trunk/dcpp/SearchManager.cpp 2008-04-29 19:09:02 UTC (rev 1228)
@@ -24,51 +24,10 @@
#include "ClientManager.h"
#include "ShareManager.h"
+#include "SearchResult.h"
namespace dcpp {
-SearchResult::SearchResult(Types aType, int64_t aSize, const string& aFile, const TTHValue& aTTH) :
- file(aFile), user(ClientManager::getInstance()->getMe()), size(aSize), type(aType), slots(SETTING(SLOTS)),
- freeSlots(UploadManager::getInstance()->getFreeSlots()),
- tth(aTTH), ref(1) { }
-
-string SearchResult::toSR(const Client& c) const {
- // File: "$SR %s %s%c%s %d/%d%c%s (%s)|"
- // Directory: "$SR %s %s %d/%d%c%s (%s)|"
- string tmp;
- tmp.reserve(128);
- tmp.append("$SR ", 4);
- tmp.append(Text::fromUtf8(c.getMyNick(), c.getEncoding()));
- tmp.append(1, ' ');
- string acpFile = Text::fromUtf8(file, c.getEncoding());
- if(type == TYPE_FILE) {
- tmp.append(acpFile);
- tmp.append(1, '\x05');
- tmp.append(Util::toString(size));
- } else {
- tmp.append(acpFile, 0, acpFile.length() - 1);
- }
- tmp.append(1, ' ');
- tmp.append(Util::toString(freeSlots));
- tmp.append(1, '/');
- tmp.append(Util::toString(slots));
- tmp.append(1, '\x05');
- tmp.append("TTH:" + getTTH().toBase32());
- tmp.append(" (", 2);
- tmp.append(c.getIpPort());
- tmp.append(")|", 2);
- return tmp;
-}
-
-AdcCommand SearchResult::toRES(char type) const {
- AdcCommand cmd(AdcCommand::CMD_RES, type);
- cmd.addParam("SI", Util::toString(size));
- cmd.addParam("SL", Util::toString(freeSlots));
- cmd.addParam("FN", Util::toAdcFile(file));
- cmd.addParam("TR", getTTH().toBase32());
- return cmd;
-}
-
SearchManager::SearchManager() :
socket(NULL),
port(0),
@@ -89,8 +48,6 @@
}
}
-
-
void SearchManager::search(const string& aName, int64_t aSize, TypeModes aTypeMode /* = TYPE_ANY */, SizeModes aSizeMode /* = SIZE_ATLEAST */, const string& aToken /* = Util::emptyString */) {
if(okToSearch()) {
ClientManager::getInstance()->search(aSizeMode, aSize, aTypeMode, aName, aToken);
@@ -105,20 +62,6 @@
}
}
-string SearchResult::getFileName() const {
- if(getType() == TYPE_FILE)
- return Util::getFileName(getFile());
-
- if(getFile().size() < 2)
- return getFile();
-
- string::size_type i = getFile().rfind('\\', getFile().length() - 2);
- if(i == string::npos)
- return getFile();
-
- return getFile().substr(i + 1);
-}
-
void SearchManager::listen() throw(SocketException) {
disconnect();
@@ -272,10 +215,10 @@
}
- SearchResult* sr = new SearchResult(user, type, slots, freeSlots, size,
- file, hubName, url, remoteIp, TTHValue(tth), Util::emptyString);
+ SearchResultPtr sr(new SearchResult(user, type, slots, freeSlots, size,
+ file, hubName, url, remoteIp, TTHValue(tth), Util::emptyString));
fire(SearchManagerListener::SR(), sr);
- sr->decRef();
+
} else if(x.compare(1, 4, "RES ") == 0 && x[x.length() - 1] == 0x0a) {
AdcCommand c(x.substr(0, x.length()-1));
if(c.getParameters().empty())
@@ -334,10 +277,9 @@
if(type == SearchResult::TYPE_FILE && tth.empty())
return;
/// @todo Something about the slots
- SearchResult* sr = new SearchResult(from, type, 0, freeSlots, size,
- file, hubName, hub, remoteIp, TTHValue(tth), token);
+ SearchResultPtr sr(new SearchResult(from, type, 0, freeSlots, size,
+ file, hubName, hub, remoteIp, TTHValue(tth), token));
fire(SearchManagerListener::SR(), sr);
- sr->decRef();
}
}
@@ -350,7 +292,7 @@
if(!p)
return;
- SearchResult::List results;
+ SearchResultList results;
ShareManager::getInstance()->search(results, adc.getParameters(), 10);
string token;
@@ -360,12 +302,11 @@
if(results.empty())
return;
- for(SearchResult::Iter i = results.begin(); i != results.end(); ++i) {
+ for(SearchResultList::const_iterator i = results.begin(); i != results.end(); ++i) {
AdcCommand cmd = (*i)->toRES(AdcCommand::TYPE_UDP);
if(!token.empty())
cmd.addParam("TO", token);
ClientManager::getInstance()->send(cmd, from);
- (*i)->decRef();
}
}
Modified: dcplusplus/trunk/dcpp/SearchManager.h
===================================================================
--- dcplusplus/trunk/dcpp/SearchManager.h 2008-04-29 19:07:03 UTC (rev 1227)
+++ dcplusplus/trunk/dcpp/SearchManager.h 2008-04-29 19:09:02 UTC (rev 1228)
@@ -16,8 +16,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#if !defined(SEARCH_MANAGER_H)
-#define SEARCH_MANAGER_H
+#ifndef DCPLUSPLUS_DCPP_SEARCH_MANAGER_H
+#define DCPLUSPLUS_DCPP_SEARCH_MANAGER_H
#include "SettingsManager.h"
@@ -26,8 +26,6 @@
#include "Thread.h"
#include "Client.h"
#include "Singleton.h"
-#include "FastAlloc.h"
-#include "MerkleTree.h"
#include "SearchManagerListener.h"
#include "TimerManager.h"
@@ -38,74 +36,6 @@
class SearchManager;
class SocketException;
-class SearchResult : public FastAlloc<SearchResult> {
-public:
-
- enum Types {
- TYPE_FILE,
- TYPE_DIRECTORY
- };
-
- typedef SearchResult* Ptr;
- typedef vector<Ptr> List;
- typedef List::iterator Iter;
-
- SearchResult(Types aType, int64_t aSize, const string& name, const TTHValue& aTTH);
-
- SearchResult(const UserPtr& aUser, Types aType, int aSlots, int aFreeSlots,
- int64_t aSize, const string& aFile, const string& aHubName,
- const string& aHubURL, const string& ip, TTHValue aTTH, const string& aToken) :
- file(aFile), hubName(aHubName), hubURL(aHubURL), user(aUser),
- size(aSize), type(aType), slots(aSlots), freeSlots(aFreeSlots), IP(ip),
- tth(aTTH), token(aToken), ref(1) { }
-
- string getFileName() const;
- string toSR(const Client& client) const;
- AdcCommand toRES(char type) const;
-
- UserPtr& getUser() { return user; }
- string getSlotString() const { return Util::toString(getFreeSlots()) + '/' + Util::toString(getSlots()); }
-
- const string& getFile() const { return file; }
- const string& getHubURL() const { return hubURL; }
- const string& getHubName() const { return hubName; }
- int64_t getSize() const { return size; }
- Types getType() const { return type; }
- int getSlots() const { return slots; }
- int getFreeSlots() const { return freeSlots; }
- TTHValue getTTH() const { return tth; }
- const string& getIP() const { return IP; }
- const string& getToken() const { return token; }
-
- void incRef() { Thread::safeInc(ref); }
- void decRef() {
- if(Thread::safeDec(ref) == 0)
- delete this;
- }
-
-private:
- friend class SearchManager;
-
- SearchResult();
- ~SearchResult() { }
-
- SearchResult(const SearchResult& rhs);
-
- string file;
- string hubName;
- string hubURL;
- UserPtr user;
- int64_t size;
- Types type;
- int slots;
- int freeSlots;
- string IP;
- TTHValue tth;
- string token;
-
- volatile long ref;
-};
-
class SearchManager : public Speaker<SearchManagerListener>, public Singleton<SearchManager>, public Thread
{
public:
Modified: dcplusplus/trunk/dcpp/SearchManagerListener.h
===================================================================
--- dcplusplus/trunk/dcpp/SearchManagerListener.h 2008-04-29 19:07:03 UTC (rev 1227)
+++ dcplusplus/trunk/dcpp/SearchManagerListener.h 2008-04-29 19:09:02 UTC (rev 1228)
@@ -16,20 +16,20 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#if !defined(SEARCH_MANAGER_LISTENER_H)
-#define SEARCH_MANAGER_LISTENER_H
+#ifndef DCPLUSPLUS_DCPP_SEARCH_MANAGER_LISTENER_H
+#define DCPLUSPLUS_DCPP_SEARCH_MANAGER_LISTENER_H
+#include "forward.h"
+
namespace dcpp {
-class SearchResult;
-
class SearchManagerListener {
public:
virtual ~SearchManagerListener() { }
template<int I> struct X { enum { TYPE = I }; };
typedef X<0> SR;
- virtual void on(SR, SearchResult*) throw() = 0;
+ virtual void on(SR, const SearchResultPtr&) throw() = 0;
};
} // namespace dcpp
Added: dcplusplus/trunk/dcpp/SearchResult.cpp
===================================================================
--- dcplusplus/trunk/dcpp/SearchResult.cpp (rev 0)
+++ dcplusplus/trunk/dcpp/SearchResult.cpp 2008-04-29 19:09:02 UTC (rev 1228)
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2001-2008 Jacek Sieka, arnetheduck on gmail point com
+ *
+ * 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.
+ */
+
+#include "stdinc.h"
+#include "DCPlusPlus.h"
+
+#include "SearchResult.h"
+#include "UploadManager.h"
+#include "Text.h"
+#include "User.h"
+#include "ClientManager.h"
+#include "Client.h"
+
+namespace dcpp {
+
+SearchResult::SearchResult(const UserPtr& aUser, Types aType, int aSlots, int aFreeSlots,
+ int64_t aSize, const string& aFile, const string& aHubName,
+ const string& aHubURL, const string& ip, TTHValue aTTH, const string& aToken) :
+file(aFile), hubName(aHubName), hubURL(aHubURL), user(aUser),
+ size(aSize), type(aType), slots(aSlots), freeSlots(aFreeSlots), IP(ip),
+ tth(aTTH), token(aToken) { }
+
+SearchResult::SearchResult(Types aType, int64_t aSize, const string& aFile, const TTHValue& aTTH) :
+ file(aFile), user(ClientManager::getInstance()->getMe()), size(aSize), type(aType), slots(SETTING(SLOTS)),
+ freeSlots(UploadManager::getInstance()->getFreeSlots()),
+ tth(aTTH) { }
+
+string SearchResult::toSR(const Client& c) const {
+ // File: "$SR %s %s%c%s %d/%d%c%s (%s)|"
+ // Directory: "$SR %s %s %d/%d%c%s (%s)|"
+ string tmp;
+ tmp.reserve(128);
+ tmp.append("$SR ", 4);
+ tmp.append(Text::fromUtf8(c.getMyNick(), c.getEncoding()));
+ tmp.append(1, ' ');
+ string acpFile = Text::fromUtf8(file, c.getEncoding());
+ if(type == TYPE_FILE) {
+ tmp.append(acpFile);
+ tmp.append(1, '\x05');
+ tmp.append(Util::toString(size));
+ } else {
+ tmp.append(acpFile, 0, acpFile.length() - 1);
+ }
+ tmp.append(1, ' ');
+ tmp.append(Util::toString(freeSlots));
+ tmp.append(1, '/');
+ tmp.append(Util::toString(slots));
+ tmp.append(1, '\x05');
+ tmp.append("TTH:" + getTTH().toBase32());
+ tmp.append(" (", 2);
+ tmp.append(c.getIpPort());
+ tmp.append(")|", 2);
+ return tmp;
+}
+
+AdcCommand SearchResult::toRES(char type) const {
+ AdcCommand cmd(AdcCommand::CMD_RES, type);
+ cmd.addParam("SI", Util::toString(size));
+ cmd.addParam("SL", Util::toString(freeSlots));
+ cmd.addParam("FN", Util::toAdcFile(file));
+ cmd.addParam("TR", getTTH().toBase32());
+ return cmd;
+}
+
+string SearchResult::getFileName() const {
+ if(getType() == TYPE_FILE)
+ return Util::getFileName(getFile());
+
+ if(getFile().size() < 2)
+ return getFile();
+
+ string::size_type i = getFile().rfind('\\', getFile().length() - 2);
+ if(i == string::npos)
+ return getFile();
+
+ return getFile().substr(i + 1);
+}
+
+}
Added: dcplusplus/trunk/dcpp/SearchResult.h
===================================================================
--- dcplusplus/trunk/dcpp/SearchResult.h (rev 0)
+++ dcplusplus/trunk/dcpp/SearchResult.h 2008-04-29 19:09:02 UTC (rev 1228)
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2001-2008 Jacek Sieka, arnetheduck on gmail point com
+ *
+ * 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.
+ */
+
+#ifndef DCPLUSPLUS_DCPP_SEARCHRESULT_H
+#define DCPLUSPLUS_DCPP_SEARCHRESULT_H
+
+#include "forward.h"
+#include "FastAlloc.h"
+#include "MerkleTree.h"
+#include "AdcCommand.h"
+#include "Pointer.h"
+
+namespace dcpp {
+
+class SearchManager;
+
+class SearchResult : public FastAlloc<SearchResult>, public intrusive_ptr_base {
+public:
+ enum Types {
+ TYPE_FILE,
+ TYPE_DIRECTORY
+ };
+
+ SearchResult(Types aType, int64_t aSize, const string& name, const TTHValue& aTTH);
+
+ SearchResult(const UserPtr& aUser, Types aType, int aSlots, int aFreeSlots,
+ int64_t aSize, const string& aFile, const string& aHubName,
+ const string& aHubURL, const string& ip, TTHValue aTTH, const string& aToken);
+
+ string getFileName() const;
+ string toSR(const Client& client) const;
+ AdcCommand toRES(char type) const;
+
+ UserPtr& getUser() { return user; }
+ string getSlotString() const { return Util::toString(getFreeSlots()) + '/' + Util::toString(getSlots()); }
+
+ const string& getFile() const { return file; }
+ const string& getHubURL() const { return hubURL; }
+ const string& getHubName() const { return hubName; }
+ int64_t getSize() const { return size; }
+ Types getType() const { return type; }
+ int getSlots() const { return slots; }
+ int getFreeSlots() const { return freeSlots; }
+ TTHValue getTTH() const { return tth; }
+ const string& getIP() const { return IP; }
+ const string& getToken() const { return token; }
+
+private:
+ friend class SearchManager;
+
+ SearchResult();
+ virtual ~SearchResult() throw() { }
+
+ SearchResult(const SearchResult& rhs);
+
+ string file;
+ string hubName;
+ string hubURL;
+ UserPtr user;
+ int64_t size;
+ Types type;
+ int slots;
+ int freeSlots;
+ string IP;
+ TTHValue tth;
+ string token;
+};
+
+}
+
+#endif
Modified: dcplusplus/trunk/dcpp/ShareManager.cpp
===================================================================
--- dcplusplus/trunk/dcpp/ShareManager.cpp 2008-04-29 19:07:03 UTC (rev 1227)
+++ dcplusplus/trunk/dcpp/ShareManager.cpp 2008-04-29 19:09:02 UTC (rev 1228)
@@ -36,6 +36,7 @@
#include "UserConnection.h"
#include "Download.h"
#include "HashBloom.h"
+#include "SearchResult.h"
#ifndef _WIN32
#include <sys/types.h>
@@ -1175,7 +1176,7 @@
* has been matched in the directory name. This new stringlist should also be used in all descendants,
* but not the parents...
*/
-void ShareManager::Directory::search(SearchResult::List& aResults, StringSearch::List& aStrings, int aSearchType, int64_t aSize, int aFileType, Client* aClient, StringList::size_type maxResults) const throw() {
+void ShareManager::Directory::search(SearchResultList& aResults, StringSearch::List& aStrings, int aSearchType, int64_t aSize, int aFileType, Client* aClient, StringList::size_type maxResults) const throw() {
// Skip everything if there's nothing to find here (doh! =)
if(!hasType(aFileType))
return;
@@ -1201,7 +1202,7 @@
if( (cur->empty()) &&
(((aFileType == SearchManager::TYPE_ANY) && sizeOk) || (aFileType == SearchManager::TYPE_DIRECTORY)) ) {
// We satisfied all the search words! Add the directory...(NMDC searches don't support directory size)
- SearchResult* sr = new SearchResult(SearchResult::TYPE_DIRECTORY, 0, getFullName(), TTHValue());
+ SearchResultPtr sr(new SearchResult(SearchResult::TYPE_DIRECTORY, 0, getFullName(), TTHValue()));
aResults.push_back(sr);
ShareManager::getInstance()->setHits(ShareManager::getInstance()->getHits()+1);
}
@@ -1223,7 +1224,7 @@
// Check file type...
if(checkType(i->getName(), aFileType)) {
- SearchResult* sr = new SearchResult(SearchResult::TYPE_FILE, i->getSize(), getFullName() + i->getName(), i->getTTH());
+ SearchResultPtr sr(new SearchResult(SearchResult::TYPE_FILE, i->getSize(), getFullName() + i->getName(), i->getTTH()));
aResults.push_back(sr);
ShareManager::getInstance()->setHits(ShareManager::getInstance()->getHits()+1);
if(aResults.size() >= maxResults) {
@@ -1238,15 +1239,15 @@
}
}
-void ShareManager::search(SearchResult::List& results, const string& aString, int aSearchType, int64_t aSize, int aFileType, Client* aClient, StringList::size_type maxResults) throw() {
+void ShareManager::search(SearchResultList& results, const string& aString, int aSearchType, int64_t aSize, int aFileType, Client* aClient, StringList::size_type maxResults) throw() {
Lock l(cs);
if(aFileType == SearchManager::TYPE_TTH) {
if(aString.compare(0, 4, "TTH:") == 0) {
TTHValue tth(aString.substr(4));
HashFileMap::const_iterator i = tthIndex.find(tth);
if(i != tthIndex.end()) {
- SearchResult* sr = new SearchResult(SearchResult::TYPE_FILE, i->second->getSize(),
- i->second->getParent()->getFullName() + i->second->getName(), i->second->getTTH());
+ SearchResultPtr sr(new SearchResult(SearchResult::TYPE_FILE, i->second->getSize(),
+ i->second->getParent()->getFullName() + i->second->getName(), i->second->getTTH()));
results.push_back(sr);
ShareManager::getInstance()->addHits(1);
@@ -1308,7 +1309,7 @@
}
}
-void ShareManager::Directory::search(SearchResult::List& aResults, AdcSearch& aStrings, StringList::size_type maxResults) const throw() {
+void ShareManager::Directory::search(SearchResultList& aResults, AdcSearch& aStrings, StringList::size_type maxResults) const throw() {
StringSearch::List* cur = aStrings.include;
StringSearch::List* old = aStrings.include;
@@ -1331,7 +1332,7 @@
bool sizeOk = (aStrings.gt == 0);
if( cur->empty() && aStrings.ext.empty() && sizeOk ) {
// We satisfied all the search words! Add the directory...
- SearchResult* sr = new SearchResult(SearchResult::TYPE_DIRECTORY, getSize(), getFullName(), TTHValue());
+ SearchResultPtr sr(new SearchResult(SearchResult::TYPE_DIRECTORY, getSize(), getFullName(), TTHValue()));
aResults.push_back(sr);
ShareManager::getInstance()->setHits(ShareManager::getInstance()->getHits()+1);
}
@@ -1358,8 +1359,8 @@
// Check file type...
if(aStrings.hasExt(i->getName())) {
- SearchResult* sr = new SearchResult(SearchResult::TYPE_FILE,
- i->getSize(), getFullName() + i->getName(), i->getTTH());
+ SearchResultPtr sr(new SearchResult(SearchResult::TYPE_FILE,
+ i->getSize(), getFullName() + i->getName(), i->getTTH()));
aResults.push_back(sr);
ShareManager::getInstance()->addHits(1);
if(aResults.size() >= maxResults) {
@@ -1375,7 +1376,7 @@
aStrings.include = old;
}
-void ShareManager::search(SearchResult::List& results, const StringList& params, StringList::size_type maxResults) throw() {
+void ShareManager::search(SearchResultList& results, const StringList& params, StringList::size_type maxResults) throw() {
AdcSearch srch(params);
Lock l(cs);
@@ -1383,9 +1384,9 @@
if(srch.hasRoot) {
HashFileMap::const_iterator i = tthIndex.find(srch.root);
if(i != tthIndex.end()) {
- SearchResult* sr = new SearchResult(SearchResult::TYPE_FILE,
+ SearchResultPtr sr(new SearchResult(SearchResult::TYPE_FILE,
i->second->getSize(), i->second->getParent()->getFullName() + i->second->getName(),
- i->second->getTTH());
+ i->second->getTTH()));
results.push_back(sr);
addHits(1);
}
Modified: dcplusplus/trunk/dcpp/ShareManager.h
===================================================================
--- dcplusplus/trunk/dcpp/ShareManager.h 2008-04-29 19:07:03 UTC (rev 1227)
+++ dcplusplus/trunk/dcpp/ShareManager.h 2008-04-29 19:09:02 UTC (rev 1228)
@@ -63,8 +63,8 @@
void refresh(bool dirs = false, bool aUpdate = true, bool block = false) throw();
void setDirty() { xmlDirty = true; }
- void search(SearchResult::List& l, const string& aString, int aSearchType, int64_t aSize, int aFileType, Client* aClient, StringList::size_type maxResults) throw();
- void search(SearchResult::List& l, const StringList& params, StringList::size_type maxResults) throw();
+ void search(SearchResultList& l, const string& aString, int aSearchType, int64_t aSize, int aFileType, Client* aClient, StringList::size_type maxResults) throw();
+ void search(SearchResultList& l, const StringList& params, StringList::size_type maxResults) throw();
StringPairList getDirectories() const throw();
@@ -171,8 +171,8 @@
int64_t getSize() const throw();
- void search(SearchResult::List& aResults, StringSearch::List& aStrings, int aSearchType, int64_t aSize, int aFileType, Client* aClient, StringList::size_type maxResults) const throw();
- void search(SearchResult::List& aResults, AdcSearch& aStrings, StringList::size_type maxResults) const throw();
+ void search(SearchResultList& aResults, StringSearch::List& aStrings, int aSearchType, int64_t aSize, int aFileType, Client* aClient, StringList::size_type maxResults) const throw();
+ void search(SearchResultList& aResults, AdcSearch& aStrings, StringList::size_type maxResults) const throw();
void toXml(OutputStream& xmlFile, string& indent, string& tmp2, bool fullList) const;
void filesToXml(OutputStream& xmlFile, string& indent, string& tmp2) const;
Modified: dcplusplus/trunk/dcpp/forward.h
===================================================================
--- dcplusplus/trunk/dcpp/forward.h 2008-04-29 19:07:03 UTC (rev 1227)
+++ dcplusplus/trunk/dcpp/forward.h 2008-04-29 19:09:02 UTC (rev 1228)
@@ -70,6 +70,10 @@
class QueueItem;
+class SearchResult;
+typedef boost::intrusive_ptr<SearchResult> SearchResultPtr;
+typedef std::vector<SearchResultPtr> SearchResultList;
+
class ServerSocket;
class Socket;
Modified: dcplusplus/trunk/win32/SearchFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/SearchFrame.cpp 2008-04-29 19:07:03 UTC (rev 1227)
+++ dcplusplus/trunk/win32/SearchFrame.cpp 2008-04-29 19:09:02 UTC (rev 1228)
@@ -556,11 +556,11 @@
case SPEAK_ADD_RESULT:
{
SearchInfo* si = reinterpret_cast<SearchInfo*>(lParam);
- SearchResult* sr = si->sr;
+ const SearchResultPtr& sr = si->sr;
// Check previous search results for dupes
for(int i = 0, j = results->size(); i < j; ++i) {
SearchInfo* si2 = results->getData(i);
- SearchResult* sr2 = si2->sr;
+ const SearchResultPtr& sr2 = si2->sr;
if((sr->getUser()->getCID() == sr2->getUser()->getCID()) && (sr->getFile() == sr2->getFile())) {
delete si;
return 0;
@@ -683,7 +683,7 @@
int i = results->getNext(-1, LVNI_SELECTED);
dcassert(i != -1);
SearchInfo* si = results->getData(i);
- SearchResult* sr = si->sr;
+ const SearchResultPtr& sr = si->sr;
if(sr->getType() == SearchResult::TYPE_FILE) {
tstring target = Text::toT(SETTING(DOWNLOAD_DIRECTORY)) + si->columns[COLUMN_FILENAME];
@@ -829,7 +829,7 @@
}
}
-void SearchFrame::on(SearchManagerListener::SR, SearchResult* aResult) throw() {
+void SearchFrame::on(SearchManagerListener::SR, const SearchResultPtr& aResult) throw() {
// Check that this is really a relevant search result...
{
Lock l(cs);
@@ -1069,7 +1069,7 @@
int sel = -1;
while((sel = results->getNext(sel, LVNI_SELECTED)) != -1) {
- SearchResult* sr = results->getData(sel)->sr;
+ const SearchResultPtr& sr = results->getData(sel)->sr;
if(!sr->getUser()->isOnline())
continue;
Modified: dcplusplus/trunk/win32/SearchFrame.h
===================================================================
--- dcplusplus/trunk/win32/SearchFrame.h 2008-04-29 19:07:03 UTC (rev 1227)
+++ dcplusplus/trunk/win32/SearchFrame.h 2008-04-29 19:09:02 UTC (rev 1228)
@@ -23,6 +23,7 @@
#include "TypedTable.h"
#include "AspectUserCommand.h"
+#include <dcpp/SearchResult.h>
#include <dcpp/SearchManager.h>
#include <dcpp/ClientManagerListener.h>
@@ -83,11 +84,11 @@
class SearchInfo : public UserInfoBase {
public:
- SearchInfo(SearchResult* aSR) : UserInfoBase(aSR->getUser()), sr(aSR) {
- sr->incRef(); update();
+ SearchInfo(const SearchResultPtr& aSR) : UserInfoBase(aSR->getUser()), sr(aSR) {
+ update();
}
~SearchInfo() {
- sr->decRef();
+
}
void getList();
@@ -127,7 +128,7 @@
void update();
- SearchResult* sr;
+ SearchResultPtr sr;
tstring columns[COLUMN_LAST];
};
@@ -249,7 +250,7 @@
WidgetResultsPtr getUserList() { return results; }
// SearchManagerListener
- virtual void on(SearchManagerListener::SR, SearchResult* aResult) throw();
+ virtual void on(SearchManagerListener::SR, const SearchResultPtr& aResult) throw();
// ClientManagerListener
virtual void on(ClientConnected, Client* c) throw() { speak(SPEAK_HUB_ADDED, c); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|