├── .gitattributes
├── .gitignore
├── .gitmodules
├── COPYING.LESSER.txt
├── COPYING.txt
├── README.md
├── TondarAPI.xcodeproj
├── project.pbxproj
└── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ └── TondarAPI.xccheckout
├── TondarAPI
├── ConvertURL.h
├── ConvertURL.m
├── HYXunleiLixianAPI.h
├── HYXunleiLixianAPI.m
├── JSONKit
│ ├── JSONKit.h
│ └── JSONKit.m
├── Kuai.h
├── Kuai.m
├── LCHTTPConnection.h
├── LCHTTPConnection.m
├── NSData+Base64.h
├── NSData+Base64.m
├── NSString+Base64.h
├── NSString+Base64.m
├── NSString+RE.h
├── NSString+RE.m
├── ParseElements.h
├── ParseElements.m
├── TondarAPI-Info.plist
├── TondarAPI-Prefix.pch
├── URlEncode.h
├── URlEncode.m
├── XunleiItemInfo.h
├── XunleiItemInfo.m
├── en.lproj
│ └── InfoPlist.strings
├── md5.h
└── md5.m
├── TondarAPITests
├── TondarAPITests-Info.plist
├── TondarAPITests.h
├── TondarAPITests.m
└── en.lproj
│ └── InfoPlist.strings
└── URLTesting
├── URLTesting-Info.plist
├── URLTesting-Prefix.pch
├── URLTesting.h
├── URLTesting.m
└── en.lproj
└── InfoPlist.strings
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -crlf -diff -merge
2 |
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #xcode noise
2 | *.mode1v3
3 | *.pbxuser
4 | *.perspective
5 | *.perspectivev3
6 | *.pyc
7 | *~.nib/
8 | build/*
9 |
10 | #new in Xcode 4
11 | xcuserdata
12 |
13 | # Textmate - if you build your xcode projects with it
14 | *.tm_build_errors
15 |
16 | # old skool
17 | .svn
18 |
19 | # osx noise
20 | .DS_Store
21 | profile
22 | #.xcode
23 |
24 | *.xcodeproj/project.xcworkspace/xcuserdata/liuchao.xcuserdatad/UserInterfaceState.xcuserstate
25 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lqik2004/xunlei-lixian-api-PureObjc/06e66fc151a4173184d6c71bee1fd8431eeb312a/.gitmodules
--------------------------------------------------------------------------------
/COPYING.LESSER.txt:
--------------------------------------------------------------------------------
1 | GNU LESSER GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 |
9 | This version of the GNU Lesser General Public License incorporates
10 | the terms and conditions of version 3 of the GNU General Public
11 | License, supplemented by the additional permissions listed below.
12 |
13 | 0. Additional Definitions.
14 |
15 | As used herein, "this License" refers to version 3 of the GNU Lesser
16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU
17 | General Public License.
18 |
19 | "The Library" refers to a covered work governed by this License,
20 | other than an Application or a Combined Work as defined below.
21 |
22 | An "Application" is any work that makes use of an interface provided
23 | by the Library, but which is not otherwise based on the Library.
24 | Defining a subclass of a class defined by the Library is deemed a mode
25 | of using an interface provided by the Library.
26 |
27 | A "Combined Work" is a work produced by combining or linking an
28 | Application with the Library. The particular version of the Library
29 | with which the Combined Work was made is also called the "Linked
30 | Version".
31 |
32 | The "Minimal Corresponding Source" for a Combined Work means the
33 | Corresponding Source for the Combined Work, excluding any source code
34 | for portions of the Combined Work that, considered in isolation, are
35 | based on the Application, and not on the Linked Version.
36 |
37 | The "Corresponding Application Code" for a Combined Work means the
38 | object code and/or source code for the Application, including any data
39 | and utility programs needed for reproducing the Combined Work from the
40 | Application, but excluding the System Libraries of the Combined Work.
41 |
42 | 1. Exception to Section 3 of the GNU GPL.
43 |
44 | You may convey a covered work under sections 3 and 4 of this License
45 | without being bound by section 3 of the GNU GPL.
46 |
47 | 2. Conveying Modified Versions.
48 |
49 | If you modify a copy of the Library, and, in your modifications, a
50 | facility refers to a function or data to be supplied by an Application
51 | that uses the facility (other than as an argument passed when the
52 | facility is invoked), then you may convey a copy of the modified
53 | version:
54 |
55 | a) under this License, provided that you make a good faith effort to
56 | ensure that, in the event an Application does not supply the
57 | function or data, the facility still operates, and performs
58 | whatever part of its purpose remains meaningful, or
59 |
60 | b) under the GNU GPL, with none of the additional permissions of
61 | this License applicable to that copy.
62 |
63 | 3. Object Code Incorporating Material from Library Header Files.
64 |
65 | The object code form of an Application may incorporate material from
66 | a header file that is part of the Library. You may convey such object
67 | code under terms of your choice, provided that, if the incorporated
68 | material is not limited to numerical parameters, data structure
69 | layouts and accessors, or small macros, inline functions and templates
70 | (ten or fewer lines in length), you do both of the following:
71 |
72 | a) Give prominent notice with each copy of the object code that the
73 | Library is used in it and that the Library and its use are
74 | covered by this License.
75 |
76 | b) Accompany the object code with a copy of the GNU GPL and this license
77 | document.
78 |
79 | 4. Combined Works.
80 |
81 | You may convey a Combined Work under terms of your choice that,
82 | taken together, effectively do not restrict modification of the
83 | portions of the Library contained in the Combined Work and reverse
84 | engineering for debugging such modifications, if you also do each of
85 | the following:
86 |
87 | a) Give prominent notice with each copy of the Combined Work that
88 | the Library is used in it and that the Library and its use are
89 | covered by this License.
90 |
91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license
92 | document.
93 |
94 | c) For a Combined Work that displays copyright notices during
95 | execution, include the copyright notice for the Library among
96 | these notices, as well as a reference directing the user to the
97 | copies of the GNU GPL and this license document.
98 |
99 | d) Do one of the following:
100 |
101 | 0) Convey the Minimal Corresponding Source under the terms of this
102 | License, and the Corresponding Application Code in a form
103 | suitable for, and under terms that permit, the user to
104 | recombine or relink the Application with a modified version of
105 | the Linked Version to produce a modified Combined Work, in the
106 | manner specified by section 6 of the GNU GPL for conveying
107 | Corresponding Source.
108 |
109 | 1) Use a suitable shared library mechanism for linking with the
110 | Library. A suitable mechanism is one that (a) uses at run time
111 | a copy of the Library already present on the user's computer
112 | system, and (b) will operate properly with a modified version
113 | of the Library that is interface-compatible with the Linked
114 | Version.
115 |
116 | e) Provide Installation Information, but only if you would otherwise
117 | be required to provide such information under section 6 of the
118 | GNU GPL, and only to the extent that such information is
119 | necessary to install and execute a modified version of the
120 | Combined Work produced by recombining or relinking the
121 | Application with a modified version of the Linked Version. (If
122 | you use option 4d0, the Installation Information must accompany
123 | the Minimal Corresponding Source and Corresponding Application
124 | Code. If you use option 4d1, you must provide the Installation
125 | Information in the manner specified by section 6 of the GNU GPL
126 | for conveying Corresponding Source.)
127 |
128 | 5. Combined Libraries.
129 |
130 | You may place library facilities that are a work based on the
131 | Library side by side in a single library together with other library
132 | facilities that are not Applications and are not covered by this
133 | License, and convey such a combined library under terms of your
134 | choice, if you do both of the following:
135 |
136 | a) Accompany the combined library with a copy of the same work based
137 | on the Library, uncombined with any other library facilities,
138 | conveyed under the terms of this License.
139 |
140 | b) Give prominent notice with the combined library that part of it
141 | is a work based on the Library, and explaining where to find the
142 | accompanying uncombined form of the same work.
143 |
144 | 6. Revised Versions of the GNU Lesser General Public License.
145 |
146 | The Free Software Foundation may publish revised and/or new versions
147 | of the GNU Lesser General Public License from time to time. Such new
148 | versions will be similar in spirit to the present version, but may
149 | differ in detail to address new problems or concerns.
150 |
151 | Each version is given a distinguishing version number. If the
152 | Library as you received it specifies that a certain numbered version
153 | of the GNU Lesser General Public License "or any later version"
154 | applies to it, you have the option of following the terms and
155 | conditions either of that published version or of any later version
156 | published by the Free Software Foundation. If the Library as you
157 | received it does not specify a version number of the GNU Lesser
158 | General Public License, you may choose any version of the GNU Lesser
159 | General Public License ever published by the Free Software Foundation.
160 |
161 | If the Library as you received it specifies that a proxy can decide
162 | whether future versions of the GNU Lesser General Public License shall
163 | apply, that proxy's public statement of acceptance of any version is
164 | permanent authorization for you to choose that version for the
165 | Library.
--------------------------------------------------------------------------------
/COPYING.txt:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | #迅雷离线API (TondarAPI)
2 | ***************
3 | 本项目旨在提供一个纯由Objective-C写成的迅雷离线API,方便在Mac OS X和iOS上开发相应项目。
4 | **TondarAPI已经通过了iOS/Mac OS X兼容性测试**
5 | ###名称释义
6 | **Tondar**为波斯语(Persian),意为闪电
7 | ###功能概述
8 | * 迅雷离线账户登陆
9 | * 获取任务列表(返回返回每个任务的详细信息,参见XunleiItemInfo)
10 | * 任务类型识别
11 | * 获取BT任务列表(返回返回每个任务的详细信息,参见XunleiItemInfo)
12 | * http/ftp/thunder/ed2k/magnet等下载连接类型支持
13 | * 删除任务
14 | * 添加云转码任务(包括选择不同清晰度)
15 | * 获取云转码任务列表
16 | * 删除云转码任务
17 | * 云点播
18 | * 一键添加到迅雷快传
19 | * 对迅雷,旋风,Flashget多种专有连接的下载支持
20 |
21 | ###TODO
22 | * 完善获取“保留时间”方法
23 | * 增加对正在下载任务的进度获取
24 | * 支持批量任务添加
25 |
26 | ******************
27 | ###使用迅雷离线API的项目
28 | * 迅雷离线 for iOS
29 | * fakeThunder 2 (Developing)
30 | * [TurboX](https://github.com/lqik2004/TurboX)
31 |
32 | 如果你使用了迅雷离线API,可以和我联系添加到这里
33 |
34 | ******************
35 | ###要求
36 | **系统**:iOS 5.0及以上(支持ARC)和Mac OX 10.7 Lion及以上
37 | **Xcode**:4.3及其以上
38 | [**JSONKit**](https://github.com/johnezang/JSONKit/)
39 | ******************
40 | ###源文件说明
41 | ####依赖的开源库
42 | 迅雷离线API依赖的开源库有:[**JSONKit**](https://github.com/johnezang/JSONKit/)
43 |
44 | [**JSONKit**](https://github.com/johnezang/JSONKit/) 处理JSON的开源库,详细情况可以查看项目主页
45 |
46 | #####开源库的使用######
47 | 具体方法就不写了,Google或者到各个项目主页很容易就可以查到。
48 | 需要注意的是在启用了ARC环境下如果使用不开启ARC的库,可以找到Target->Build Phases->Compile Sources->找到需要关闭ARC的.m文件,然后加入**-fno-objc-arc**
49 | 
50 | 关于开源库的使用,当时为了开发的方便加入了三个开源库能够让我用最快的时间开发出来,把主要精力放在写正则上,现在iOS和Mac OS X对JSON和正则的支持也很不错,所以可能会去掉这两个开源库,用起来方便一些。
51 |
52 | ####API结构说明
53 | 迅雷离线API包含了10个文件
54 | 对外调用需要以下文件:
55 | HYXunleiLixianAPI,XunleiItemInfo 和Kuai
56 | HYXunleiLixianAPI 提供了获取任务列表,添加任务删除任务等功能
57 | XunleiItemInfo 提供了任务返回信息(包含任务名称,dcid等)
58 | Kuai中对外调用为其中的KuaiItemInfo类,包含了从迅雷快传提取任务的各种信息
59 | *******************
60 | ###更新日志
61 | * 2013-9-27 修改了部分Bug,增加了对BT文件的支持
62 | * 2012-10-8 v0.6.2 去掉了对regexKitLite的依赖
63 | * 2012-10-8 v0.6.1 去掉了对ASIHTTP的依赖
64 | * 2012-8-22 v0.5 fix some bugs && 增加了对迅雷,旋风,Flashget专有下载链接格式的支持
65 | * 2012-8-21 v0.4.1 fix some bugs && update README
66 | * 2012-8-20 v0.4 released!,增加了迅雷快传
67 | * 2012-8-19 重写了接口
68 |
69 | *******************
70 | ###反馈问题
71 | 有任何问题可以和lqik2004#gmail.com进行联系
72 | 或者到我的博客[http://res0w.com](http://res0w.com)进行留言
73 | 也可以Follow我的Twitter:[@lqik2004](https://twitter.com/lqik2004)
74 | ********************
75 | ###许可证
76 | *在适当的时候我可能会更改许可证为MIT*
77 | 本项目采用[LGPL](http://www.gnu.org/copyleft/lesser.html)许可
78 | 
--------------------------------------------------------------------------------
/TondarAPI.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 020E1F4B15DCF40B00FF99ED /* HYXunleiLixianAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 020E1F4915DCF40B00FF99ED /* HYXunleiLixianAPI.h */; settings = {ATTRIBUTES = (Public, ); }; };
11 | 020E1F4C15DCF40B00FF99ED /* HYXunleiLixianAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 020E1F4A15DCF40B00FF99ED /* HYXunleiLixianAPI.m */; };
12 | 020E1F5015DCF41500FF99ED /* md5.h in Headers */ = {isa = PBXBuildFile; fileRef = 020E1F4E15DCF41400FF99ED /* md5.h */; };
13 | 020E1F5115DCF41500FF99ED /* md5.m in Sources */ = {isa = PBXBuildFile; fileRef = 020E1F4F15DCF41500FF99ED /* md5.m */; };
14 | 020E1F5415DCF42300FF99ED /* ParseElements.h in Headers */ = {isa = PBXBuildFile; fileRef = 020E1F5215DCF42100FF99ED /* ParseElements.h */; };
15 | 020E1F5515DCF42300FF99ED /* ParseElements.m in Sources */ = {isa = PBXBuildFile; fileRef = 020E1F5315DCF42200FF99ED /* ParseElements.m */; };
16 | 020E1F5815DCF45F00FF99ED /* URlEncode.h in Headers */ = {isa = PBXBuildFile; fileRef = 020E1F5615DCF45E00FF99ED /* URlEncode.h */; };
17 | 020E1F5915DCF45F00FF99ED /* URlEncode.m in Sources */ = {isa = PBXBuildFile; fileRef = 020E1F5715DCF45F00FF99ED /* URlEncode.m */; };
18 | 020E1F5C15DCF46B00FF99ED /* XunleiItemInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 020E1F5A15DCF46A00FF99ED /* XunleiItemInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
19 | 020E1F5D15DCF46B00FF99ED /* XunleiItemInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 020E1F5B15DCF46A00FF99ED /* XunleiItemInfo.m */; };
20 | 020E1F7115DCF5A900FF99ED /* JSONKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 020E1F6F15DCF5A900FF99ED /* JSONKit.h */; };
21 | 020E1F7215DCF5A900FF99ED /* JSONKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 020E1F7015DCF5A900FF99ED /* JSONKit.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
22 | 02C066B115DCF700008AF890 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02C066B015DCF700008AF890 /* SystemConfiguration.framework */; };
23 | 02C066B315DCF70E008AF890 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 02C066B215DCF70E008AF890 /* libz.dylib */; };
24 | 02C066B515DCF80B008AF890 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02C066B415DCF80B008AF890 /* CFNetwork.framework */; };
25 | 02F155BC15C547220054EF51 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02F155BB15C547220054EF51 /* Cocoa.framework */; };
26 | 02F155C615C547220054EF51 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 02F155C415C547220054EF51 /* InfoPlist.strings */; };
27 | 02F155D215C547220054EF51 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02F155D115C547220054EF51 /* SenTestingKit.framework */; };
28 | 02F155D315C547220054EF51 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02F155BB15C547220054EF51 /* Cocoa.framework */; };
29 | 02F155D615C547220054EF51 /* TondarAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02F155B815C547220054EF51 /* TondarAPI.framework */; };
30 | 02F155DC15C547220054EF51 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 02F155DA15C547220054EF51 /* InfoPlist.strings */; };
31 | 02F155DF15C547220054EF51 /* TondarAPITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 02F155DE15C547220054EF51 /* TondarAPITests.m */; };
32 | A81275021622B2A2002A92F4 /* LCHTTPConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = A81275001622B2A2002A92F4 /* LCHTTPConnection.h */; };
33 | A81275031622B2A2002A92F4 /* LCHTTPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = A81275011622B2A2002A92F4 /* LCHTTPConnection.m */; };
34 | A81275041622B2A2002A92F4 /* LCHTTPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = A81275011622B2A2002A92F4 /* LCHTTPConnection.m */; };
35 | A81275051622B2A2002A92F4 /* LCHTTPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = A81275011622B2A2002A92F4 /* LCHTTPConnection.m */; };
36 | A81275111622F0AF002A92F4 /* NSString+RE.h in Headers */ = {isa = PBXBuildFile; fileRef = A812750F1622F0AF002A92F4 /* NSString+RE.h */; };
37 | A81275121622F0AF002A92F4 /* NSString+RE.m in Sources */ = {isa = PBXBuildFile; fileRef = A81275101622F0AF002A92F4 /* NSString+RE.m */; };
38 | A81275131622F0AF002A92F4 /* NSString+RE.m in Sources */ = {isa = PBXBuildFile; fileRef = A81275101622F0AF002A92F4 /* NSString+RE.m */; };
39 | A81275141622F0AF002A92F4 /* NSString+RE.m in Sources */ = {isa = PBXBuildFile; fileRef = A81275101622F0AF002A92F4 /* NSString+RE.m */; };
40 | A83FEE7D15E3E23900FD8907 /* NSData+Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = A83FEE7915E3E23900FD8907 /* NSData+Base64.h */; };
41 | A83FEE7E15E3E23900FD8907 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = A83FEE7A15E3E23900FD8907 /* NSData+Base64.m */; };
42 | A83FEE7F15E3E23900FD8907 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = A83FEE7A15E3E23900FD8907 /* NSData+Base64.m */; };
43 | A83FEE8015E3E23900FD8907 /* NSString+Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = A83FEE7B15E3E23900FD8907 /* NSString+Base64.h */; };
44 | A83FEE8115E3E23900FD8907 /* NSString+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = A83FEE7C15E3E23900FD8907 /* NSString+Base64.m */; };
45 | A83FEE8215E3E23900FD8907 /* NSString+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = A83FEE7C15E3E23900FD8907 /* NSString+Base64.m */; };
46 | A83FEE8715E3E2AA00FD8907 /* ConvertURL.h in Headers */ = {isa = PBXBuildFile; fileRef = A83FEE8515E3E2AA00FD8907 /* ConvertURL.h */; };
47 | A83FEE8815E3E2AA00FD8907 /* ConvertURL.m in Sources */ = {isa = PBXBuildFile; fileRef = A83FEE8615E3E2AA00FD8907 /* ConvertURL.m */; };
48 | A83FEE8915E3E2AA00FD8907 /* ConvertURL.m in Sources */ = {isa = PBXBuildFile; fileRef = A83FEE8615E3E2AA00FD8907 /* ConvertURL.m */; };
49 | A83FEE9015E3E5EF00FD8907 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02F155D115C547220054EF51 /* SenTestingKit.framework */; };
50 | A83FEE9A15E3E5EF00FD8907 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = A83FEE9815E3E5EF00FD8907 /* InfoPlist.strings */; };
51 | A83FEE9D15E3E5EF00FD8907 /* URLTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = A83FEE9C15E3E5EF00FD8907 /* URLTesting.m */; };
52 | A83FEEA315E3E7A100FD8907 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A83FEEA215E3E7A100FD8907 /* Cocoa.framework */; };
53 | A88FDA9C15E22E1800BCB116 /* Kuai.h in Headers */ = {isa = PBXBuildFile; fileRef = A88FDA9A15E22E1800BCB116 /* Kuai.h */; };
54 | A88FDA9D15E22E1800BCB116 /* Kuai.m in Sources */ = {isa = PBXBuildFile; fileRef = A88FDA9B15E22E1800BCB116 /* Kuai.m */; };
55 | A88FDA9E15E22E1800BCB116 /* Kuai.m in Sources */ = {isa = PBXBuildFile; fileRef = A88FDA9B15E22E1800BCB116 /* Kuai.m */; };
56 | /* End PBXBuildFile section */
57 |
58 | /* Begin PBXContainerItemProxy section */
59 | 02F155D415C547220054EF51 /* PBXContainerItemProxy */ = {
60 | isa = PBXContainerItemProxy;
61 | containerPortal = 02F155AE15C547220054EF51 /* Project object */;
62 | proxyType = 1;
63 | remoteGlobalIDString = 02F155B715C547220054EF51;
64 | remoteInfo = TondarAPI;
65 | };
66 | /* End PBXContainerItemProxy section */
67 |
68 | /* Begin PBXFileReference section */
69 | 020E1F4915DCF40B00FF99ED /* HYXunleiLixianAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HYXunleiLixianAPI.h; sourceTree = ""; };
70 | 020E1F4A15DCF40B00FF99ED /* HYXunleiLixianAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HYXunleiLixianAPI.m; sourceTree = ""; };
71 | 020E1F4E15DCF41400FF99ED /* md5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = md5.h; sourceTree = ""; };
72 | 020E1F4F15DCF41500FF99ED /* md5.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = md5.m; sourceTree = ""; };
73 | 020E1F5215DCF42100FF99ED /* ParseElements.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParseElements.h; sourceTree = ""; };
74 | 020E1F5315DCF42200FF99ED /* ParseElements.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ParseElements.m; sourceTree = ""; };
75 | 020E1F5615DCF45E00FF99ED /* URlEncode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = URlEncode.h; sourceTree = ""; };
76 | 020E1F5715DCF45F00FF99ED /* URlEncode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = URlEncode.m; sourceTree = ""; };
77 | 020E1F5A15DCF46A00FF99ED /* XunleiItemInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XunleiItemInfo.h; sourceTree = ""; };
78 | 020E1F5B15DCF46A00FF99ED /* XunleiItemInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XunleiItemInfo.m; sourceTree = ""; };
79 | 020E1F6F15DCF5A900FF99ED /* JSONKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSONKit.h; path = JSONKit/JSONKit.h; sourceTree = ""; };
80 | 020E1F7015DCF5A900FF99ED /* JSONKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JSONKit.m; path = JSONKit/JSONKit.m; sourceTree = ""; };
81 | 02C066B015DCF700008AF890 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
82 | 02C066B215DCF70E008AF890 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
83 | 02C066B415DCF80B008AF890 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/CFNetwork.framework; sourceTree = DEVELOPER_DIR; };
84 | 02F155B815C547220054EF51 /* TondarAPI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TondarAPI.framework; sourceTree = BUILT_PRODUCTS_DIR; };
85 | 02F155BB15C547220054EF51 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
86 | 02F155BE15C547220054EF51 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
87 | 02F155BF15C547220054EF51 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
88 | 02F155C015C547220054EF51 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
89 | 02F155C315C547220054EF51 /* TondarAPI-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TondarAPI-Info.plist"; sourceTree = ""; };
90 | 02F155C515C547220054EF51 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
91 | 02F155C715C547220054EF51 /* TondarAPI-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TondarAPI-Prefix.pch"; sourceTree = ""; };
92 | 02F155D015C547220054EF51 /* TondarAPITests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TondarAPITests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
93 | 02F155D115C547220054EF51 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
94 | 02F155D915C547220054EF51 /* TondarAPITests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TondarAPITests-Info.plist"; sourceTree = ""; };
95 | 02F155DB15C547220054EF51 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
96 | 02F155DD15C547220054EF51 /* TondarAPITests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TondarAPITests.h; sourceTree = ""; };
97 | 02F155DE15C547220054EF51 /* TondarAPITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TondarAPITests.m; sourceTree = ""; };
98 | A81275001622B2A2002A92F4 /* LCHTTPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LCHTTPConnection.h; sourceTree = ""; };
99 | A81275011622B2A2002A92F4 /* LCHTTPConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LCHTTPConnection.m; sourceTree = ""; };
100 | A812750F1622F0AF002A92F4 /* NSString+RE.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+RE.h"; sourceTree = ""; };
101 | A81275101622F0AF002A92F4 /* NSString+RE.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+RE.m"; sourceTree = ""; };
102 | A83FEE7915E3E23900FD8907 /* NSData+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+Base64.h"; sourceTree = ""; };
103 | A83FEE7A15E3E23900FD8907 /* NSData+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+Base64.m"; sourceTree = ""; };
104 | A83FEE7B15E3E23900FD8907 /* NSString+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Base64.h"; sourceTree = ""; };
105 | A83FEE7C15E3E23900FD8907 /* NSString+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Base64.m"; sourceTree = ""; };
106 | A83FEE8515E3E2AA00FD8907 /* ConvertURL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConvertURL.h; sourceTree = ""; };
107 | A83FEE8615E3E2AA00FD8907 /* ConvertURL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ConvertURL.m; sourceTree = ""; };
108 | A83FEE8F15E3E5EF00FD8907 /* URLTesting.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = URLTesting.octest; sourceTree = BUILT_PRODUCTS_DIR; };
109 | A83FEE9115E3E5EF00FD8907 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; };
110 | A83FEE9315E3E5EF00FD8907 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
111 | A83FEE9715E3E5EF00FD8907 /* URLTesting-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "URLTesting-Info.plist"; sourceTree = ""; };
112 | A83FEE9915E3E5EF00FD8907 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
113 | A83FEE9B15E3E5EF00FD8907 /* URLTesting.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = URLTesting.h; sourceTree = ""; };
114 | A83FEE9C15E3E5EF00FD8907 /* URLTesting.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = URLTesting.m; sourceTree = ""; };
115 | A83FEE9E15E3E5EF00FD8907 /* URLTesting-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "URLTesting-Prefix.pch"; sourceTree = ""; };
116 | A83FEEA215E3E7A100FD8907 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Cocoa.framework; sourceTree = DEVELOPER_DIR; };
117 | A88FDA9A15E22E1800BCB116 /* Kuai.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Kuai.h; sourceTree = ""; };
118 | A88FDA9B15E22E1800BCB116 /* Kuai.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Kuai.m; sourceTree = ""; };
119 | /* End PBXFileReference section */
120 |
121 | /* Begin PBXFrameworksBuildPhase section */
122 | 02F155B415C547220054EF51 /* Frameworks */ = {
123 | isa = PBXFrameworksBuildPhase;
124 | buildActionMask = 2147483647;
125 | files = (
126 | 02C066B515DCF80B008AF890 /* CFNetwork.framework in Frameworks */,
127 | 02C066B315DCF70E008AF890 /* libz.dylib in Frameworks */,
128 | 02C066B115DCF700008AF890 /* SystemConfiguration.framework in Frameworks */,
129 | 02F155BC15C547220054EF51 /* Cocoa.framework in Frameworks */,
130 | );
131 | runOnlyForDeploymentPostprocessing = 0;
132 | };
133 | 02F155CC15C547220054EF51 /* Frameworks */ = {
134 | isa = PBXFrameworksBuildPhase;
135 | buildActionMask = 2147483647;
136 | files = (
137 | 02F155D215C547220054EF51 /* SenTestingKit.framework in Frameworks */,
138 | 02F155D315C547220054EF51 /* Cocoa.framework in Frameworks */,
139 | 02F155D615C547220054EF51 /* TondarAPI.framework in Frameworks */,
140 | );
141 | runOnlyForDeploymentPostprocessing = 0;
142 | };
143 | A83FEE8B15E3E5EF00FD8907 /* Frameworks */ = {
144 | isa = PBXFrameworksBuildPhase;
145 | buildActionMask = 2147483647;
146 | files = (
147 | A83FEEA315E3E7A100FD8907 /* Cocoa.framework in Frameworks */,
148 | A83FEE9015E3E5EF00FD8907 /* SenTestingKit.framework in Frameworks */,
149 | );
150 | runOnlyForDeploymentPostprocessing = 0;
151 | };
152 | /* End PBXFrameworksBuildPhase section */
153 |
154 | /* Begin PBXGroup section */
155 | 020E1F7315DCF5AB00FF99ED /* JSONKit */ = {
156 | isa = PBXGroup;
157 | children = (
158 | 020E1F6F15DCF5A900FF99ED /* JSONKit.h */,
159 | 020E1F7015DCF5A900FF99ED /* JSONKit.m */,
160 | );
161 | name = JSONKit;
162 | sourceTree = "";
163 | };
164 | 026EB2D515C54C5F0005909F /* Utility */ = {
165 | isa = PBXGroup;
166 | children = (
167 | A812750E1622F097002A92F4 /* LCRegexKit */,
168 | A83FEE8415E3E23D00FD8907 /* Base64 */,
169 | 02C066BF15DCFB22008AF890 /* LCHTTPConnection */,
170 | 020E1F7315DCF5AB00FF99ED /* JSONKit */,
171 | );
172 | name = Utility;
173 | sourceTree = "";
174 | };
175 | 026EB2DA15C550E60005909F /* Tondar */ = {
176 | isa = PBXGroup;
177 | children = (
178 | 020E1F4915DCF40B00FF99ED /* HYXunleiLixianAPI.h */,
179 | 020E1F4A15DCF40B00FF99ED /* HYXunleiLixianAPI.m */,
180 | 020E1F4E15DCF41400FF99ED /* md5.h */,
181 | 020E1F4F15DCF41500FF99ED /* md5.m */,
182 | 020E1F5215DCF42100FF99ED /* ParseElements.h */,
183 | 020E1F5315DCF42200FF99ED /* ParseElements.m */,
184 | 020E1F5615DCF45E00FF99ED /* URlEncode.h */,
185 | 020E1F5715DCF45F00FF99ED /* URlEncode.m */,
186 | 020E1F5A15DCF46A00FF99ED /* XunleiItemInfo.h */,
187 | 020E1F5B15DCF46A00FF99ED /* XunleiItemInfo.m */,
188 | A88FDA9A15E22E1800BCB116 /* Kuai.h */,
189 | A88FDA9B15E22E1800BCB116 /* Kuai.m */,
190 | A83FEE8515E3E2AA00FD8907 /* ConvertURL.h */,
191 | A83FEE8615E3E2AA00FD8907 /* ConvertURL.m */,
192 | );
193 | name = Tondar;
194 | sourceTree = "";
195 | };
196 | 02C066BF15DCFB22008AF890 /* LCHTTPConnection */ = {
197 | isa = PBXGroup;
198 | children = (
199 | A81275001622B2A2002A92F4 /* LCHTTPConnection.h */,
200 | A81275011622B2A2002A92F4 /* LCHTTPConnection.m */,
201 | );
202 | name = LCHTTPConnection;
203 | sourceTree = "";
204 | };
205 | 02F155AC15C547220054EF51 = {
206 | isa = PBXGroup;
207 | children = (
208 | 02F155C115C547220054EF51 /* TondarAPI */,
209 | 02F155D715C547220054EF51 /* TondarAPITests */,
210 | A83FEE9515E3E5EF00FD8907 /* URLTesting */,
211 | 02F155BA15C547220054EF51 /* Frameworks */,
212 | 02F155B915C547220054EF51 /* Products */,
213 | );
214 | sourceTree = "";
215 | };
216 | 02F155B915C547220054EF51 /* Products */ = {
217 | isa = PBXGroup;
218 | children = (
219 | 02F155B815C547220054EF51 /* TondarAPI.framework */,
220 | 02F155D015C547220054EF51 /* TondarAPITests.octest */,
221 | A83FEE8F15E3E5EF00FD8907 /* URLTesting.octest */,
222 | );
223 | name = Products;
224 | sourceTree = "";
225 | };
226 | 02F155BA15C547220054EF51 /* Frameworks */ = {
227 | isa = PBXGroup;
228 | children = (
229 | A83FEEA215E3E7A100FD8907 /* Cocoa.framework */,
230 | 02C066B215DCF70E008AF890 /* libz.dylib */,
231 | 02C066B415DCF80B008AF890 /* CFNetwork.framework */,
232 | 02C066B015DCF700008AF890 /* SystemConfiguration.framework */,
233 | 02F155BB15C547220054EF51 /* Cocoa.framework */,
234 | 02F155D115C547220054EF51 /* SenTestingKit.framework */,
235 | A83FEE9115E3E5EF00FD8907 /* UIKit.framework */,
236 | A83FEE9315E3E5EF00FD8907 /* Foundation.framework */,
237 | 02F155BD15C547220054EF51 /* Other Frameworks */,
238 | );
239 | name = Frameworks;
240 | sourceTree = "";
241 | };
242 | 02F155BD15C547220054EF51 /* Other Frameworks */ = {
243 | isa = PBXGroup;
244 | children = (
245 | 02F155BE15C547220054EF51 /* AppKit.framework */,
246 | 02F155BF15C547220054EF51 /* CoreData.framework */,
247 | 02F155C015C547220054EF51 /* Foundation.framework */,
248 | );
249 | name = "Other Frameworks";
250 | sourceTree = "";
251 | };
252 | 02F155C115C547220054EF51 /* TondarAPI */ = {
253 | isa = PBXGroup;
254 | children = (
255 | 026EB2DA15C550E60005909F /* Tondar */,
256 | 026EB2D515C54C5F0005909F /* Utility */,
257 | 02F155C215C547220054EF51 /* Supporting Files */,
258 | );
259 | path = TondarAPI;
260 | sourceTree = "";
261 | };
262 | 02F155C215C547220054EF51 /* Supporting Files */ = {
263 | isa = PBXGroup;
264 | children = (
265 | 02F155C315C547220054EF51 /* TondarAPI-Info.plist */,
266 | 02F155C415C547220054EF51 /* InfoPlist.strings */,
267 | 02F155C715C547220054EF51 /* TondarAPI-Prefix.pch */,
268 | );
269 | name = "Supporting Files";
270 | sourceTree = "";
271 | };
272 | 02F155D715C547220054EF51 /* TondarAPITests */ = {
273 | isa = PBXGroup;
274 | children = (
275 | 02F155DD15C547220054EF51 /* TondarAPITests.h */,
276 | 02F155DE15C547220054EF51 /* TondarAPITests.m */,
277 | 02F155D815C547220054EF51 /* Supporting Files */,
278 | );
279 | path = TondarAPITests;
280 | sourceTree = "";
281 | };
282 | 02F155D815C547220054EF51 /* Supporting Files */ = {
283 | isa = PBXGroup;
284 | children = (
285 | 02F155D915C547220054EF51 /* TondarAPITests-Info.plist */,
286 | 02F155DA15C547220054EF51 /* InfoPlist.strings */,
287 | );
288 | name = "Supporting Files";
289 | sourceTree = "";
290 | };
291 | A812750E1622F097002A92F4 /* LCRegexKit */ = {
292 | isa = PBXGroup;
293 | children = (
294 | A812750F1622F0AF002A92F4 /* NSString+RE.h */,
295 | A81275101622F0AF002A92F4 /* NSString+RE.m */,
296 | );
297 | name = LCRegexKit;
298 | sourceTree = "";
299 | };
300 | A83FEE8415E3E23D00FD8907 /* Base64 */ = {
301 | isa = PBXGroup;
302 | children = (
303 | A83FEE7915E3E23900FD8907 /* NSData+Base64.h */,
304 | A83FEE7A15E3E23900FD8907 /* NSData+Base64.m */,
305 | A83FEE7B15E3E23900FD8907 /* NSString+Base64.h */,
306 | A83FEE7C15E3E23900FD8907 /* NSString+Base64.m */,
307 | );
308 | name = Base64;
309 | sourceTree = "";
310 | };
311 | A83FEE9515E3E5EF00FD8907 /* URLTesting */ = {
312 | isa = PBXGroup;
313 | children = (
314 | A83FEE9B15E3E5EF00FD8907 /* URLTesting.h */,
315 | A83FEE9C15E3E5EF00FD8907 /* URLTesting.m */,
316 | A83FEE9615E3E5EF00FD8907 /* Supporting Files */,
317 | );
318 | path = URLTesting;
319 | sourceTree = "";
320 | };
321 | A83FEE9615E3E5EF00FD8907 /* Supporting Files */ = {
322 | isa = PBXGroup;
323 | children = (
324 | A83FEE9715E3E5EF00FD8907 /* URLTesting-Info.plist */,
325 | A83FEE9815E3E5EF00FD8907 /* InfoPlist.strings */,
326 | A83FEE9E15E3E5EF00FD8907 /* URLTesting-Prefix.pch */,
327 | );
328 | name = "Supporting Files";
329 | sourceTree = "";
330 | };
331 | /* End PBXGroup section */
332 |
333 | /* Begin PBXHeadersBuildPhase section */
334 | 02F155B515C547220054EF51 /* Headers */ = {
335 | isa = PBXHeadersBuildPhase;
336 | buildActionMask = 2147483647;
337 | files = (
338 | 020E1F4B15DCF40B00FF99ED /* HYXunleiLixianAPI.h in Headers */,
339 | 020E1F5C15DCF46B00FF99ED /* XunleiItemInfo.h in Headers */,
340 | 020E1F5015DCF41500FF99ED /* md5.h in Headers */,
341 | 020E1F5415DCF42300FF99ED /* ParseElements.h in Headers */,
342 | 020E1F5815DCF45F00FF99ED /* URlEncode.h in Headers */,
343 | 020E1F7115DCF5A900FF99ED /* JSONKit.h in Headers */,
344 | A88FDA9C15E22E1800BCB116 /* Kuai.h in Headers */,
345 | A83FEE7D15E3E23900FD8907 /* NSData+Base64.h in Headers */,
346 | A83FEE8015E3E23900FD8907 /* NSString+Base64.h in Headers */,
347 | A83FEE8715E3E2AA00FD8907 /* ConvertURL.h in Headers */,
348 | A81275021622B2A2002A92F4 /* LCHTTPConnection.h in Headers */,
349 | A81275111622F0AF002A92F4 /* NSString+RE.h in Headers */,
350 | );
351 | runOnlyForDeploymentPostprocessing = 0;
352 | };
353 | /* End PBXHeadersBuildPhase section */
354 |
355 | /* Begin PBXNativeTarget section */
356 | 02F155B715C547220054EF51 /* TondarAPI */ = {
357 | isa = PBXNativeTarget;
358 | buildConfigurationList = 02F155E215C547220054EF51 /* Build configuration list for PBXNativeTarget "TondarAPI" */;
359 | buildPhases = (
360 | 02F155B315C547220054EF51 /* Sources */,
361 | 02F155B415C547220054EF51 /* Frameworks */,
362 | 02F155B515C547220054EF51 /* Headers */,
363 | 02F155B615C547220054EF51 /* Resources */,
364 | );
365 | buildRules = (
366 | );
367 | dependencies = (
368 | );
369 | name = TondarAPI;
370 | productName = TondarAPI;
371 | productReference = 02F155B815C547220054EF51 /* TondarAPI.framework */;
372 | productType = "com.apple.product-type.framework";
373 | };
374 | 02F155CF15C547220054EF51 /* TondarAPITests */ = {
375 | isa = PBXNativeTarget;
376 | buildConfigurationList = 02F155E515C547220054EF51 /* Build configuration list for PBXNativeTarget "TondarAPITests" */;
377 | buildPhases = (
378 | 02F155CB15C547220054EF51 /* Sources */,
379 | 02F155CC15C547220054EF51 /* Frameworks */,
380 | 02F155CD15C547220054EF51 /* Resources */,
381 | 02F155CE15C547220054EF51 /* ShellScript */,
382 | );
383 | buildRules = (
384 | );
385 | dependencies = (
386 | 02F155D515C547220054EF51 /* PBXTargetDependency */,
387 | );
388 | name = TondarAPITests;
389 | productName = TondarAPITests;
390 | productReference = 02F155D015C547220054EF51 /* TondarAPITests.octest */;
391 | productType = "com.apple.product-type.bundle";
392 | };
393 | A83FEE8E15E3E5EF00FD8907 /* URLTesting */ = {
394 | isa = PBXNativeTarget;
395 | buildConfigurationList = A83FEE9F15E3E5EF00FD8907 /* Build configuration list for PBXNativeTarget "URLTesting" */;
396 | buildPhases = (
397 | A83FEE8A15E3E5EF00FD8907 /* Sources */,
398 | A83FEE8B15E3E5EF00FD8907 /* Frameworks */,
399 | A83FEE8C15E3E5EF00FD8907 /* Resources */,
400 | A83FEE8D15E3E5EF00FD8907 /* ShellScript */,
401 | );
402 | buildRules = (
403 | );
404 | dependencies = (
405 | );
406 | name = URLTesting;
407 | productName = URLTesting;
408 | productReference = A83FEE8F15E3E5EF00FD8907 /* URLTesting.octest */;
409 | productType = "com.apple.product-type.bundle";
410 | };
411 | /* End PBXNativeTarget section */
412 |
413 | /* Begin PBXProject section */
414 | 02F155AE15C547220054EF51 /* Project object */ = {
415 | isa = PBXProject;
416 | attributes = {
417 | LastUpgradeCheck = 0440;
418 | ORGANIZATIONNAME = MartianZ;
419 | };
420 | buildConfigurationList = 02F155B115C547220054EF51 /* Build configuration list for PBXProject "TondarAPI" */;
421 | compatibilityVersion = "Xcode 3.2";
422 | developmentRegion = English;
423 | hasScannedForEncodings = 0;
424 | knownRegions = (
425 | en,
426 | );
427 | mainGroup = 02F155AC15C547220054EF51;
428 | productRefGroup = 02F155B915C547220054EF51 /* Products */;
429 | projectDirPath = "";
430 | projectRoot = "";
431 | targets = (
432 | 02F155B715C547220054EF51 /* TondarAPI */,
433 | 02F155CF15C547220054EF51 /* TondarAPITests */,
434 | A83FEE8E15E3E5EF00FD8907 /* URLTesting */,
435 | );
436 | };
437 | /* End PBXProject section */
438 |
439 | /* Begin PBXResourcesBuildPhase section */
440 | 02F155B615C547220054EF51 /* Resources */ = {
441 | isa = PBXResourcesBuildPhase;
442 | buildActionMask = 2147483647;
443 | files = (
444 | 02F155C615C547220054EF51 /* InfoPlist.strings in Resources */,
445 | );
446 | runOnlyForDeploymentPostprocessing = 0;
447 | };
448 | 02F155CD15C547220054EF51 /* Resources */ = {
449 | isa = PBXResourcesBuildPhase;
450 | buildActionMask = 2147483647;
451 | files = (
452 | 02F155DC15C547220054EF51 /* InfoPlist.strings in Resources */,
453 | );
454 | runOnlyForDeploymentPostprocessing = 0;
455 | };
456 | A83FEE8C15E3E5EF00FD8907 /* Resources */ = {
457 | isa = PBXResourcesBuildPhase;
458 | buildActionMask = 2147483647;
459 | files = (
460 | A83FEE9A15E3E5EF00FD8907 /* InfoPlist.strings in Resources */,
461 | );
462 | runOnlyForDeploymentPostprocessing = 0;
463 | };
464 | /* End PBXResourcesBuildPhase section */
465 |
466 | /* Begin PBXShellScriptBuildPhase section */
467 | 02F155CE15C547220054EF51 /* ShellScript */ = {
468 | isa = PBXShellScriptBuildPhase;
469 | buildActionMask = 2147483647;
470 | files = (
471 | );
472 | inputPaths = (
473 | );
474 | outputPaths = (
475 | );
476 | runOnlyForDeploymentPostprocessing = 0;
477 | shellPath = /bin/sh;
478 | shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
479 | };
480 | A83FEE8D15E3E5EF00FD8907 /* ShellScript */ = {
481 | isa = PBXShellScriptBuildPhase;
482 | buildActionMask = 2147483647;
483 | files = (
484 | );
485 | inputPaths = (
486 | );
487 | outputPaths = (
488 | );
489 | runOnlyForDeploymentPostprocessing = 0;
490 | shellPath = /bin/sh;
491 | shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
492 | };
493 | /* End PBXShellScriptBuildPhase section */
494 |
495 | /* Begin PBXSourcesBuildPhase section */
496 | 02F155B315C547220054EF51 /* Sources */ = {
497 | isa = PBXSourcesBuildPhase;
498 | buildActionMask = 2147483647;
499 | files = (
500 | 020E1F4C15DCF40B00FF99ED /* HYXunleiLixianAPI.m in Sources */,
501 | 020E1F5115DCF41500FF99ED /* md5.m in Sources */,
502 | 020E1F5515DCF42300FF99ED /* ParseElements.m in Sources */,
503 | 020E1F5915DCF45F00FF99ED /* URlEncode.m in Sources */,
504 | 020E1F5D15DCF46B00FF99ED /* XunleiItemInfo.m in Sources */,
505 | 020E1F7215DCF5A900FF99ED /* JSONKit.m in Sources */,
506 | A88FDA9D15E22E1800BCB116 /* Kuai.m in Sources */,
507 | A83FEE7E15E3E23900FD8907 /* NSData+Base64.m in Sources */,
508 | A83FEE8115E3E23900FD8907 /* NSString+Base64.m in Sources */,
509 | A83FEE8815E3E2AA00FD8907 /* ConvertURL.m in Sources */,
510 | A81275031622B2A2002A92F4 /* LCHTTPConnection.m in Sources */,
511 | A81275121622F0AF002A92F4 /* NSString+RE.m in Sources */,
512 | );
513 | runOnlyForDeploymentPostprocessing = 0;
514 | };
515 | 02F155CB15C547220054EF51 /* Sources */ = {
516 | isa = PBXSourcesBuildPhase;
517 | buildActionMask = 2147483647;
518 | files = (
519 | 02F155DF15C547220054EF51 /* TondarAPITests.m in Sources */,
520 | A88FDA9E15E22E1800BCB116 /* Kuai.m in Sources */,
521 | A83FEE7F15E3E23900FD8907 /* NSData+Base64.m in Sources */,
522 | A83FEE8215E3E23900FD8907 /* NSString+Base64.m in Sources */,
523 | A83FEE8915E3E2AA00FD8907 /* ConvertURL.m in Sources */,
524 | A81275041622B2A2002A92F4 /* LCHTTPConnection.m in Sources */,
525 | A81275131622F0AF002A92F4 /* NSString+RE.m in Sources */,
526 | );
527 | runOnlyForDeploymentPostprocessing = 0;
528 | };
529 | A83FEE8A15E3E5EF00FD8907 /* Sources */ = {
530 | isa = PBXSourcesBuildPhase;
531 | buildActionMask = 2147483647;
532 | files = (
533 | A83FEE9D15E3E5EF00FD8907 /* URLTesting.m in Sources */,
534 | A81275051622B2A2002A92F4 /* LCHTTPConnection.m in Sources */,
535 | A81275141622F0AF002A92F4 /* NSString+RE.m in Sources */,
536 | );
537 | runOnlyForDeploymentPostprocessing = 0;
538 | };
539 | /* End PBXSourcesBuildPhase section */
540 |
541 | /* Begin PBXTargetDependency section */
542 | 02F155D515C547220054EF51 /* PBXTargetDependency */ = {
543 | isa = PBXTargetDependency;
544 | target = 02F155B715C547220054EF51 /* TondarAPI */;
545 | targetProxy = 02F155D415C547220054EF51 /* PBXContainerItemProxy */;
546 | };
547 | /* End PBXTargetDependency section */
548 |
549 | /* Begin PBXVariantGroup section */
550 | 02F155C415C547220054EF51 /* InfoPlist.strings */ = {
551 | isa = PBXVariantGroup;
552 | children = (
553 | 02F155C515C547220054EF51 /* en */,
554 | );
555 | name = InfoPlist.strings;
556 | sourceTree = "";
557 | };
558 | 02F155DA15C547220054EF51 /* InfoPlist.strings */ = {
559 | isa = PBXVariantGroup;
560 | children = (
561 | 02F155DB15C547220054EF51 /* en */,
562 | );
563 | name = InfoPlist.strings;
564 | sourceTree = "";
565 | };
566 | A83FEE9815E3E5EF00FD8907 /* InfoPlist.strings */ = {
567 | isa = PBXVariantGroup;
568 | children = (
569 | A83FEE9915E3E5EF00FD8907 /* en */,
570 | );
571 | name = InfoPlist.strings;
572 | sourceTree = "";
573 | };
574 | /* End PBXVariantGroup section */
575 |
576 | /* Begin XCBuildConfiguration section */
577 | 02F155E015C547220054EF51 /* Debug */ = {
578 | isa = XCBuildConfiguration;
579 | buildSettings = {
580 | ALWAYS_SEARCH_USER_PATHS = NO;
581 | ARCHS = "$(ARCHS_STANDARD_64_BIT)";
582 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
583 | CLANG_ENABLE_OBJC_ARC = YES;
584 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
585 | COPY_PHASE_STRIP = NO;
586 | GCC_C_LANGUAGE_STANDARD = gnu99;
587 | GCC_DYNAMIC_NO_PIC = NO;
588 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
589 | GCC_OPTIMIZATION_LEVEL = 0;
590 | GCC_PREPROCESSOR_DEFINITIONS = (
591 | "DEBUG=1",
592 | "$(inherited)",
593 | );
594 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
595 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
596 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
597 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
598 | GCC_WARN_UNUSED_VARIABLE = YES;
599 | MACOSX_DEPLOYMENT_TARGET = 10.8;
600 | ONLY_ACTIVE_ARCH = YES;
601 | SDKROOT = macosx10.7;
602 | };
603 | name = Debug;
604 | };
605 | 02F155E115C547220054EF51 /* Release */ = {
606 | isa = XCBuildConfiguration;
607 | buildSettings = {
608 | ALWAYS_SEARCH_USER_PATHS = NO;
609 | ARCHS = "$(ARCHS_STANDARD_64_BIT)";
610 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
611 | CLANG_ENABLE_OBJC_ARC = YES;
612 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
613 | COPY_PHASE_STRIP = YES;
614 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
615 | GCC_C_LANGUAGE_STANDARD = gnu99;
616 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
617 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
618 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
619 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
620 | GCC_WARN_UNUSED_VARIABLE = YES;
621 | MACOSX_DEPLOYMENT_TARGET = 10.8;
622 | SDKROOT = macosx10.7;
623 | };
624 | name = Release;
625 | };
626 | 02F155E315C547220054EF51 /* Debug */ = {
627 | isa = XCBuildConfiguration;
628 | buildSettings = {
629 | COMBINE_HIDPI_IMAGES = YES;
630 | DYLIB_COMPATIBILITY_VERSION = 1;
631 | DYLIB_CURRENT_VERSION = 1;
632 | FRAMEWORK_VERSION = A;
633 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
634 | GCC_PREFIX_HEADER = "TondarAPI/TondarAPI-Prefix.pch";
635 | INFOPLIST_FILE = "TondarAPI/TondarAPI-Info.plist";
636 | OTHER_LDFLAGS = "-licucore";
637 | PRODUCT_NAME = "$(TARGET_NAME)";
638 | SDKROOT = macosx;
639 | WRAPPER_EXTENSION = framework;
640 | };
641 | name = Debug;
642 | };
643 | 02F155E415C547220054EF51 /* Release */ = {
644 | isa = XCBuildConfiguration;
645 | buildSettings = {
646 | COMBINE_HIDPI_IMAGES = YES;
647 | DYLIB_COMPATIBILITY_VERSION = 1;
648 | DYLIB_CURRENT_VERSION = 1;
649 | FRAMEWORK_VERSION = A;
650 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
651 | GCC_PREFIX_HEADER = "TondarAPI/TondarAPI-Prefix.pch";
652 | INFOPLIST_FILE = "TondarAPI/TondarAPI-Info.plist";
653 | OTHER_LDFLAGS = "-licucore";
654 | PRODUCT_NAME = "$(TARGET_NAME)";
655 | SDKROOT = macosx;
656 | WRAPPER_EXTENSION = framework;
657 | };
658 | name = Release;
659 | };
660 | 02F155E615C547220054EF51 /* Debug */ = {
661 | isa = XCBuildConfiguration;
662 | buildSettings = {
663 | COMBINE_HIDPI_IMAGES = YES;
664 | FRAMEWORK_SEARCH_PATHS = "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"";
665 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
666 | GCC_PREFIX_HEADER = "TondarAPI/TondarAPI-Prefix.pch";
667 | INFOPLIST_FILE = "TondarAPITests/TondarAPITests-Info.plist";
668 | PRODUCT_NAME = "$(TARGET_NAME)";
669 | SDKROOT = macosx;
670 | WRAPPER_EXTENSION = octest;
671 | };
672 | name = Debug;
673 | };
674 | 02F155E715C547220054EF51 /* Release */ = {
675 | isa = XCBuildConfiguration;
676 | buildSettings = {
677 | COMBINE_HIDPI_IMAGES = YES;
678 | FRAMEWORK_SEARCH_PATHS = "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"";
679 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
680 | GCC_PREFIX_HEADER = "TondarAPI/TondarAPI-Prefix.pch";
681 | INFOPLIST_FILE = "TondarAPITests/TondarAPITests-Info.plist";
682 | PRODUCT_NAME = "$(TARGET_NAME)";
683 | SDKROOT = macosx;
684 | WRAPPER_EXTENSION = octest;
685 | };
686 | name = Release;
687 | };
688 | A83FEEA015E3E5EF00FD8907 /* Debug */ = {
689 | isa = XCBuildConfiguration;
690 | buildSettings = {
691 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
692 | FRAMEWORK_SEARCH_PATHS = "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"";
693 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
694 | GCC_PREFIX_HEADER = "URLTesting/URLTesting-Prefix.pch";
695 | GCC_VERSION = "";
696 | INFOPLIST_FILE = "URLTesting/URLTesting-Info.plist";
697 | PRODUCT_NAME = "$(TARGET_NAME)";
698 | SDKROOT = macosx;
699 | WRAPPER_EXTENSION = octest;
700 | };
701 | name = Debug;
702 | };
703 | A83FEEA115E3E5EF00FD8907 /* Release */ = {
704 | isa = XCBuildConfiguration;
705 | buildSettings = {
706 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
707 | FRAMEWORK_SEARCH_PATHS = "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"";
708 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
709 | GCC_PREFIX_HEADER = "URLTesting/URLTesting-Prefix.pch";
710 | GCC_VERSION = "";
711 | INFOPLIST_FILE = "URLTesting/URLTesting-Info.plist";
712 | PRODUCT_NAME = "$(TARGET_NAME)";
713 | SDKROOT = macosx;
714 | VALIDATE_PRODUCT = YES;
715 | WRAPPER_EXTENSION = octest;
716 | };
717 | name = Release;
718 | };
719 | /* End XCBuildConfiguration section */
720 |
721 | /* Begin XCConfigurationList section */
722 | 02F155B115C547220054EF51 /* Build configuration list for PBXProject "TondarAPI" */ = {
723 | isa = XCConfigurationList;
724 | buildConfigurations = (
725 | 02F155E015C547220054EF51 /* Debug */,
726 | 02F155E115C547220054EF51 /* Release */,
727 | );
728 | defaultConfigurationIsVisible = 0;
729 | defaultConfigurationName = Release;
730 | };
731 | 02F155E215C547220054EF51 /* Build configuration list for PBXNativeTarget "TondarAPI" */ = {
732 | isa = XCConfigurationList;
733 | buildConfigurations = (
734 | 02F155E315C547220054EF51 /* Debug */,
735 | 02F155E415C547220054EF51 /* Release */,
736 | );
737 | defaultConfigurationIsVisible = 0;
738 | defaultConfigurationName = Release;
739 | };
740 | 02F155E515C547220054EF51 /* Build configuration list for PBXNativeTarget "TondarAPITests" */ = {
741 | isa = XCConfigurationList;
742 | buildConfigurations = (
743 | 02F155E615C547220054EF51 /* Debug */,
744 | 02F155E715C547220054EF51 /* Release */,
745 | );
746 | defaultConfigurationIsVisible = 0;
747 | defaultConfigurationName = Release;
748 | };
749 | A83FEE9F15E3E5EF00FD8907 /* Build configuration list for PBXNativeTarget "URLTesting" */ = {
750 | isa = XCConfigurationList;
751 | buildConfigurations = (
752 | A83FEEA015E3E5EF00FD8907 /* Debug */,
753 | A83FEEA115E3E5EF00FD8907 /* Release */,
754 | );
755 | defaultConfigurationIsVisible = 0;
756 | defaultConfigurationName = Release;
757 | };
758 | /* End XCConfigurationList section */
759 | };
760 | rootObject = 02F155AE15C547220054EF51 /* Project object */;
761 | }
762 |
--------------------------------------------------------------------------------
/TondarAPI.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/TondarAPI.xcodeproj/project.xcworkspace/xcshareddata/TondarAPI.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | E2D89815-26B8-4FBD-BB13-78F6DDDC24BE
9 | IDESourceControlProjectName
10 | TondarAPI
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | 46CBEF68-C28D-4FC4-A44F-A3A9224BC2D2
14 | https://github.com/xuxulll/xunlei-lixian-api-PureObjc.git
15 |
16 | IDESourceControlProjectPath
17 | TondarAPI.xcodeproj/project.xcworkspace
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | 46CBEF68-C28D-4FC4-A44F-A3A9224BC2D2
21 | ../..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/xuxulll/xunlei-lixian-api-PureObjc.git
25 | IDESourceControlProjectVersion
26 | 110
27 | IDESourceControlProjectWCCIdentifier
28 | 46CBEF68-C28D-4FC4-A44F-A3A9224BC2D2
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | 46CBEF68-C28D-4FC4-A44F-A3A9224BC2D2
36 | IDESourceControlWCCName
37 | xunlei-lixian-api-PureObjc
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/TondarAPI/ConvertURL.h:
--------------------------------------------------------------------------------
1 | //
2 | // ConvertURL.h
3 | // TondarAPI
4 | //
5 | // Created by liuchao on 8/21/12.
6 | // Copyright (c) 2012 MartianZ. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ConvertURL : NSObject
12 | -(NSString*) thunderURLEncode:(NSString*) urlString;
13 | -(NSString*) thunderURLDecode:(NSString*) urlString;
14 | -(NSString*) qqURLEncode:(NSString*) urlString;
15 | -(NSString*) qqURLDecode:(NSString*) encodedString;
16 | -(NSString*) flashgetURLEncode:(NSString*) urlString;
17 | -(NSString*) flashgetURLDecode:(NSString*) encodedString;
18 | //一个通用方法,可以转换thunder,qq,flashget几种
19 | -(NSString*) urlUnmask:(NSString*) urlString;
20 | @end
21 |
--------------------------------------------------------------------------------
/TondarAPI/ConvertURL.m:
--------------------------------------------------------------------------------
1 | //
2 | // ConvertURL.m
3 | // TondarAPI
4 | //
5 | // Created by liuchao on 8/21/12.
6 | // Copyright (c) 2012 MartianZ. All rights reserved.
7 | //
8 |
9 | #import "ConvertURL.h"
10 | #import "NSString+Base64.h"
11 | #import "NSData+Base64.h"
12 |
13 | @implementation ConvertURL
14 |
15 | -(NSString*) thunderURLEncode:(NSString*) urlString{
16 | //set up data
17 | NSString *t=[NSString stringWithFormat:@"AA%@ZZ",urlString];
18 | NSData *inputData = [t dataUsingEncoding:NSUTF8StringEncoding];
19 |
20 | //encode
21 | NSString *encodedString = [inputData base64EncodedString];
22 | NSString *url=[NSString stringWithFormat:@"thunder://%@",encodedString];
23 | return url;
24 | }
25 | -(NSString*) thunderURLDecode:(NSString*) encodedString{
26 | NSString* returnString=nil;
27 | if ([encodedString hasPrefix:@"thunder://"]) {
28 | NSData *outputData = [NSData dataWithBase64EncodedString:[encodedString substringFromIndex:10]];
29 | NSString *outputString = [[NSString alloc] initWithData:outputData encoding:NSUTF8StringEncoding];
30 | if([outputString hasPrefix:@"AA"]&&[outputString hasSuffix:@"ZZ"]){
31 | returnString=[outputString substringWithRange:NSMakeRange(2, outputString.length-4)];
32 | }
33 | }
34 | return returnString;
35 | }
36 |
37 | -(NSString*) qqURLEncode:(NSString*) urlString{
38 | //set up data;
39 | NSData *inputData = [urlString dataUsingEncoding:NSUTF8StringEncoding];
40 |
41 | //encode
42 | NSString *encodedString = [inputData base64EncodedString];
43 | NSString *url=[NSString stringWithFormat:@"qqdl://%@",encodedString];
44 | return url;
45 | }
46 | -(NSString*) qqURLDecode:(NSString*) encodedString{
47 | NSString* returnString=nil;
48 | if ([encodedString hasPrefix:@"qqdl://"]) {
49 | NSData *outputData = [NSData dataWithBase64EncodedString:[encodedString substringFromIndex:7]];
50 | NSString *outputString = [[NSString alloc] initWithData:outputData encoding:NSUTF8StringEncoding];
51 | returnString=outputString;
52 | }
53 | return returnString;
54 | }
55 | -(NSString*) flashgetURLEncode:(NSString*) urlString{
56 | //set up data
57 | NSString *t=[NSString stringWithFormat:@"[FLASHGET]%@[FLASHGET]",urlString];
58 | NSData *inputData = [t dataUsingEncoding:NSUTF8StringEncoding];
59 |
60 | //encode
61 | NSString *encodedString = [inputData base64EncodedString];
62 | NSString *url=[NSString stringWithFormat:@"Flashget://%@",encodedString];
63 | return url;
64 | }
65 | -(NSString*) flashgetURLDecode:(NSString*) encodedString{
66 | NSString* returnString=nil;
67 | if ([encodedString hasPrefix:@"Flashget://"]) {
68 | NSData *outputData = [NSData dataWithBase64EncodedString:[encodedString substringFromIndex:11]];
69 | NSString *outputString = [[NSString alloc] initWithData:outputData encoding:NSUTF8StringEncoding];
70 | if([outputString hasPrefix:@"[FLASHGET]"]&&[outputString hasSuffix:@"[FLASHGET]"]){
71 | returnString=[outputString substringWithRange:NSMakeRange(10, outputString.length-20)];
72 | }
73 | }
74 | return returnString;
75 | }
76 |
77 | -(NSString*) urlUnmask:(NSString*) urlString{
78 | NSString* returnString=nil;
79 | if([urlString hasPrefix:@"thunder://"]){
80 | returnString=[self thunderURLDecode:urlString];
81 | }else if ([urlString hasPrefix:@"qqdl://"]){
82 | returnString=[self qqURLDecode:urlString];
83 | }else if ([urlString hasPrefix:@"Flashget://"]){
84 | returnString=[self flashgetURLDecode:urlString];
85 | }else{
86 | returnString=urlString;
87 | }
88 | return returnString;
89 | }
90 |
91 | @end
92 |
--------------------------------------------------------------------------------
/TondarAPI/HYXunleiLixianAPI.h:
--------------------------------------------------------------------------------
1 | //
2 | // HWXunleiLixianAPI.h
3 | // XunleiLixian-API
4 | //
5 | // Created by Liu Chao on 6/10/12.
6 | // Copyright (c) 2012 HwaYing. All rights reserved.
7 | //
8 | /*This file is part of XunleiLixian-API.
9 |
10 | XunleiLixian-API is free software: you can redistribute it and/or modify
11 | it under the terms of the GNU General Public License as published by
12 | the Free Software Foundation, either version 3 of the License, or
13 | (at your option) any later version.
14 |
15 | Foobar is distributed in the hope that it will be useful,
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | GNU General Public License for more details.
19 |
20 | You should have received a copy of the GNU General Public License
21 | along with Foobar. If not, see .
22 | */
23 |
24 | #import
25 | @class XunleiItemInfo;
26 | @class KuaiItemInfo;
27 | typedef enum{
28 | QMiddleQuality=1,
29 | QLowQuality=2,
30 | QHighQuality=3
31 | }YUNZHUANMAQuality;
32 |
33 | @interface HYXunleiLixianAPI : NSObject
34 | -(XunleiItemInfo *) getTaskWithTaskID:(NSString*) aTaskID;
35 | #pragma mark - Cookies Methods
36 | -(NSString *) cookieValueWithName:(NSString *)aName;
37 | -(NSHTTPCookie *) setCookieWithKey:(NSString *) key Value:(NSString *) value;
38 | -(BOOL) hasCookie:(NSString*) aKey;
39 | #pragma mark - Login/LogOut Methods
40 | //Login
41 | -(BOOL) loginWithUsername:(NSString *) aName Password:(NSString *) aPassword;
42 | -(BOOL) isLogin;
43 | -(void) logOut;
44 | #pragma mark - UserID,UserNmae
45 | //UserID,UserName
46 | -(NSString *)userID;
47 | -(NSString *)userName;
48 | #pragma mark - GDriveID
49 | //GdriveID是一个关键Cookie,在下载文件的时候需要用它进行验证
50 | -(NSString*)GDriveID;
51 | -(BOOL) isGDriveIDInCookie;
52 | -(void) setGdriveID:(NSString*) gdriveid;
53 | #pragma mark - Referer
54 | //获得Referer
55 | -(NSString*) refererWithStringFormat;
56 | -(NSURL*) refererWithURLFormat;
57 |
58 |
59 | #pragma mark - Task
60 | //获得不同下载状态的任务列表
61 | -(NSMutableArray*) readAllCompleteTasks;
62 | -(NSMutableArray*) readCompleteTasksWithPage:(NSUInteger) pg;
63 |
64 | -(NSMutableArray*) readAllDownloadingTasks;
65 | -(NSMutableArray*) readDownloadingTasksWithPage:(NSUInteger) pg;
66 | /* //Some Problems Tempremoved*/
67 | -(NSMutableArray *) readAllOutofDateTasks;
68 | -(NSMutableArray *) readOutofDateTasksWithPage:(NSUInteger) pg;
69 |
70 | -(NSMutableArray*) readAllDeletedTasks;
71 | -(NSMutableArray*) readDeletedTasksWithPage:(NSUInteger) pg;
72 |
73 | #pragma mark - BT Task
74 | //BT任务列表
75 | -(NSMutableArray *) readSingleBTTaskListWithTaskID:(NSString *) taskid hashID:(NSString *)dcid andPageNumber:(NSUInteger) pg;
76 | -(NSMutableArray *) readAllBTTaskListWithTaskID:(NSString *) taskid hashID:(NSString *)dcid;
77 | #pragma mark - Add Task
78 | //添加任务
79 | -(NSString *) addMegnetTask:(NSString *) url;
80 | -(NSString *) addNormalTask:(NSString *)url;
81 | #pragma mark - Delete Task
82 | //删除任务
83 | -(BOOL) deleteTasksByIDArray:(NSArray *)ids;
84 | -(BOOL) deleteSingleTaskByID:(NSString*) id;
85 | -(BOOL) deleteSingleTaskByXunleiItemInfo:(XunleiItemInfo*) aInfo;
86 | -(BOOL) deleteTasksByXunleiItemInfoArray:(NSArray *)ids;
87 | #pragma mark - Pause Task
88 | -(BOOL) pauseMultiTasksByTaskID:(NSArray*) ids;
89 | -(BOOL) pauseTaskWithID:(NSString*) taskID;
90 | -(BOOL) pauseTask:(XunleiItemInfo*) info;
91 | -(BOOL) pauseMutiTasksByTaskItemInfo:(NSArray*) infos;
92 | #pragma mark - ReStart Task
93 | -(BOOL) restartTask:(XunleiItemInfo*) info;
94 | -(BOOL) restartMutiTasksByTaskItemInfo:(NSArray*) infos;
95 | #pragma mark - Rename Task
96 | //TO DO
97 | #pragma mark - YunZhuanMa Task
98 | //云转码任务列表
99 | -(NSMutableArray*) readAllYunTasks;
100 | -(NSMutableArray *) readYunTasksWithPage:(NSUInteger) pg retIfHasNextPage:(BOOL *) hasNextPageBool;
101 | //添加任务到云转码
102 | -(BOOL) addYunTaskWithFileSize:(NSString*) size downloadURL:(NSString*) url dcid:(NSString*) cid fileName:(NSString*) aName Quality:(YUNZHUANMAQuality) q;
103 | //云转码删除任务
104 | -(BOOL) deleteYunTaskByID:(NSString*) anId;
105 | -(BOOL) deleteYunTasksByIDArray:(NSArray *)ids;
106 |
107 | #pragma mark - Xunlei KuaiChuan ...迅雷快传
108 | //通过提供KuaiItemInfo来直接创建迅雷离线地址,KuaiItemInfo可以通过getKuaiItemInfos:获得
109 | -(NSString*) generateXunleiURLStringByKuaiItemInfo:(KuaiItemInfo*) info;
110 | //生成KuaiItemInfoArray
111 | -(NSArray*) getKuaiItemInfos:(NSURL*) kuaiURL;
112 | //添加快传页面的连接到迅雷离线
113 | -(BOOL) addAllKuaiTasksToLixianByURL:(NSURL*) kuaiURL;
114 | // 添加BT任务
115 | - (NSString *)addBTTask:(NSString *)filePath selection:(NSArray *)array hasFetchedFileList:(NSDictionary *)dataField;
116 | - (NSDictionary *)fetchBTFileList:(NSString *)filePath;
117 | - (NSString *)fileSize:(float)size; //一个根据length返回文件大小的方法
118 | @end
119 |
--------------------------------------------------------------------------------
/TondarAPI/HYXunleiLixianAPI.m:
--------------------------------------------------------------------------------
1 | //
2 | // HWXunleiLixianAPI.m
3 | // XunleiLixian-API
4 | //
5 | // Created by Liu Chao on 6/10/12.
6 | // Copyright (c) 2012 HwaYing. All rights reserved.
7 | //
8 | /*This file is part of XunleiLixian-API.
9 |
10 | XunleiLixian-API is free software: you can redistribute it and/or modify
11 | it under the terms of the GNU General Public License as published by
12 | the Free Software Foundation, either version 3 of the License, or
13 | (at your option) any later version.
14 |
15 | Foobar is distributed in the hope that it will be useful,
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | GNU General Public License for more details.
19 |
20 | You should have received a copy of the GNU General Public License
21 | along with Foobar. If not, see .
22 | */
23 |
24 |
25 | #import "HYXunleiLixianAPI.h"
26 | #import "md5.h"
27 | #import "ParseElements.h"
28 | #import "JSONKit.h"
29 | #import "NSString+RE.h"
30 | #import "URlEncode.h"
31 | #import "XunleiItemInfo.h"
32 | #import "Kuai.h"
33 | #import "ConvertURL.h"
34 | #import "LCHTTPConnection.h"
35 |
36 | typedef enum {
37 | TLTAll,
38 | TLTDownloadding,
39 | TLTComplete,
40 | TLTOutofDate,
41 | TLTDeleted
42 | } TaskListType;
43 |
44 | @implementation HYXunleiLixianAPI
45 |
46 | #define LoginURL @"http://login.xunlei.com/sec2login/"
47 | #define DEFAULT_USER_AGENT @"User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.106 Safari/535.2"
48 | #define DEFAULT_REFERER @"http://lixian.vip.xunlei.com/"
49 |
50 | #pragma mark - Login/LogOut Methods
51 | /**
52 | * 登陆方法
53 | */
54 | -(BOOL) loginWithUsername:(NSString *) aName Password:(NSString *) aPassword{
55 | NSString *vCode=[self _verifyCode:aName];
56 | if ([vCode compare:@"0"]==NSOrderedSame) {
57 | return NO;
58 | }
59 | NSString *enPassword=[self _encodePassword:aPassword withVerifyCode:vCode];
60 |
61 | //第一步登陆,验证用户名密码
62 | NSURL *url = [NSURL URLWithString:LoginURL];
63 | LCHTTPConnection *request=[LCHTTPConnection new];
64 | [request setPostValue:aName forKey:@"u"];
65 | [request setPostValue:enPassword forKey:@"p"];
66 | [request setPostValue:vCode forKey:@"verifycode"];
67 | [request setPostValue:@"0" forKey:@"login_enable"];
68 | [request setPostValue:@"720" forKey:@"login_hour"];
69 | [request post:[url absoluteString]];
70 | //把response中的Cookie添加到CookieStorage
71 | [self _addResponseCookietoCookieStorage:[request responseCookies]];
72 |
73 | //完善所需要的cookies,并收到302响应跳转
74 | NSString *timeStamp=[self _currentTimeString];
75 | NSURL *redirectUrl = [NSURL URLWithString:[NSString stringWithFormat:@"http://dynamic.cloud.vip.xunlei.com/login?cachetime=%@&cachetime=%@&from=0",timeStamp,timeStamp]];
76 | LCHTTPConnection* redirectURLrequest = [LCHTTPConnection new];
77 | [redirectURLrequest get:[redirectUrl absoluteString]];
78 | //把response中的Cookie添加到CookieStorage
79 | [self _addResponseCookietoCookieStorage:[redirectURLrequest responseCookies]];
80 | //验证是否登陆成功
81 | NSString *userid=[self userID];
82 | if(userid.length>1){
83 | return YES;
84 | }else {
85 | return NO;
86 | }
87 | }
88 |
89 | //加密密码
90 | -(NSString *) _encodePassword:(NSString *) aPassword withVerifyCode:(NSString *) aVerifyCode{
91 | NSString *enPwd_tmp=[md5 md5HexDigestwithString:([md5 md5HexDigestwithString:aPassword])];
92 | NSString *upperVerifyCode=[aVerifyCode uppercaseString];
93 | //join the two strings
94 | enPwd_tmp=[NSString stringWithFormat:@"%@%@",enPwd_tmp,upperVerifyCode];
95 | NSString *pwd=[md5 md5HexDigestwithString:enPwd_tmp];
96 | NSLog(@"%@",pwd);
97 | return pwd;
98 | }
99 |
100 | //获取验证码
101 | -(NSString *) _verifyCode:(NSString *) aUserName{
102 | NSHTTPCookieStorage *cookieJar=[NSHTTPCookieStorage sharedHTTPCookieStorage];
103 | [cookieJar setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
104 | NSString *currentTime=[self _currentTimeString];
105 | //NSLog(@"%@",currentTime);
106 | NSString *checkUrlString=[NSString stringWithFormat:@"http://login.xunlei.com/check?u=%@&cachetime=%@",aUserName,currentTime];
107 |
108 | LCHTTPConnection *request=[LCHTTPConnection new];
109 | [request get:checkUrlString];
110 | //把response中的Cookie添加到CookieStorage
111 | [self _addResponseCookietoCookieStorage:[request responseCookies]];
112 |
113 | NSString *vCode;
114 | vCode=[self cookieValueWithName:@"check_result"];
115 | //判断是否取得合法VerifyCode
116 | NSRange range;
117 | range=[vCode rangeOfString:@":"];
118 | if(range.location==NSNotFound){
119 | NSLog(@"Maybe something wrong when get verifyCode");
120 | return 0;
121 | }else {
122 | vCode=[[vCode componentsSeparatedByString:@":"] objectAtIndex:1];
123 | NSLog(@"%@",vCode);
124 |
125 | }
126 | return vCode;
127 | }
128 |
129 |
130 | /*
131 | *迅雷的登陆会过期,有时需要检验一下是否登陆。
132 | *现在采用的方法比较“重”,效率可能会低一些,但更稳妥直接
133 | *现在备选的两种方法,第一同样访问taskPage然后检查页面大小判断是否真的登陆
134 | *第二种方法检查Cookies,但是还未找到判断哪个Cookie
135 | */
136 | -(BOOL) isLogin{
137 | BOOL result=NO;
138 | if([self _tasksWithStatus:TLTComplete]){
139 | NSLog(@"Thunder Login Successfully");
140 | result=YES;
141 | }
142 | return result;
143 | }
144 |
145 | /*
146 | *有两种方法可以实现logout
147 | *第一种清空Cookies,第二种访问http://dynamic.vip.xunlei.com/login/indexlogin_contr/logout/,本方法采用了第一种速度快,现在也没发现什么问题。
148 | */
149 | -(void)logOut{
150 | NSArray* keys=@[@"vip_isvip",@"lx_sessionid",@"vip_level",@"lx_login",@"dl_enable",@"in_xl",@"ucid",@"lixian_section",@"sessionid",@"usrname",@"nickname",@"usernewno",@"userid",@"gdriveid"];
151 | for(NSString* i in keys){
152 | [self setCookieWithKey:i Value:@""];
153 | }
154 | }
155 |
156 | #pragma mark - GDriveID
157 | //GdriveID是一个关键Cookie,在下载文件的时候需要用它进行验证
158 | -(NSString*)GDriveID{
159 | return [self cookieValueWithName:@"gdriveid"];
160 | }
161 | -(BOOL) isGDriveIDInCookie{
162 | BOOL result=NO;
163 | if([self GDriveID]){
164 | result=YES;
165 | }
166 | return result;
167 | }
168 |
169 | -(void) setGdriveID:(NSString*) gdriveid{
170 | [self setCookieWithKey:@"gdriveid" Value:gdriveid];
171 | }
172 |
173 |
174 | #pragma mark - Referer
175 | //获得Referer
176 | -(NSString*) refererWithStringFormat{
177 | NSString* urlString=[NSString stringWithFormat:@"http://dynamic.cloud.vip.xunlei.com/user_task?userid=%@",[self userID]];
178 | return urlString;
179 | }
180 | -(NSURL*) refererWithURLFormat{
181 | return [NSURL URLWithString:[self refererWithStringFormat]];
182 | }
183 |
184 | #pragma mark - Cookies Methods
185 | //从cookies中取得指定名称的值
186 | -(NSString *) cookieValueWithName:(NSString *)aName{
187 | NSHTTPCookieStorage *cookieJar = [NSHTTPCookieStorage sharedHTTPCookieStorage];
188 | NSString *value=nil;
189 | for(NSHTTPCookie *cookie in [cookieJar cookies]){
190 | if([cookie.domain hasSuffix:@".xunlei.com"]){
191 | // NSLog(@"%@",cookie);
192 | if([aName isEqualToString:@"gdriveid"] && [cookie.domain hasSuffix:@".xunlei.com"] && [cookie.name compare:aName]==NSOrderedSame){
193 | value=cookie.value;
194 | }
195 | if([cookie.name compare:aName]==NSOrderedSame){
196 | value=cookie.value;
197 | // NSLog(@"%@:%@",aName,value);
198 | }}
199 | }
200 | return value;
201 | }
202 |
203 | //设置Cookies
204 | -(NSHTTPCookie *) setCookieWithKey:(NSString *) key Value:(NSString *) value{
205 | //创建一个cookie
206 | NSMutableDictionary *properties = [NSMutableDictionary dictionary];
207 | [properties setObject:value forKey:NSHTTPCookieValue];
208 | [properties setObject:key forKey:NSHTTPCookieName];
209 | [properties setObject:@".vip.xunlei.com" forKey:NSHTTPCookieDomain];
210 | [properties setObject:@"/" forKey:NSHTTPCookiePath];
211 | [properties setObject:[[NSDate date] dateByAddingTimeInterval:2629743] forKey:NSHTTPCookieExpires];
212 | //这里是关键,不要写成@"FALSE",而是应该直接写成TRUE 或者 FALSE,否则会默认为TRUE
213 | [properties setValue:FALSE forKey:NSHTTPCookieSecure];
214 | NSHTTPCookie *cookie = [[NSHTTPCookie alloc] initWithProperties:properties];
215 | NSHTTPCookieStorage *cookieStorage=[NSHTTPCookieStorage sharedHTTPCookieStorage];
216 | [cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
217 | [cookieStorage setCookie:cookie];
218 |
219 | return cookie;
220 | }
221 | //查询Cookie是否存在
222 | -(BOOL) hasCookie:(NSString*) aKey{
223 | BOOL result=NO;
224 | if([self cookieValueWithName:aKey]){
225 | result=YES;
226 | }
227 | return result;
228 | }
229 |
230 |
231 | #pragma mark - UserID,UserNmae
232 | //获取当前UserID
233 | -(NSString *)userID{
234 | return ([self cookieValueWithName:@"userid"]);
235 | }
236 |
237 | -(NSString *)userName{
238 | return ([self cookieValueWithName:@"usernewno"]);
239 | }
240 |
241 |
242 |
243 |
244 | #pragma mark - Public Normal Task Methods
245 | //获取主任务页内容
246 | //公共方法
247 | -(NSMutableArray*) readAllCompleteTasks{
248 | return [self _readAllTasksWithStat:TLTComplete];
249 | }
250 | -(NSMutableArray*) readCompleteTasksWithPage:(NSUInteger) pg{
251 | return [self _tasksWithStatus:TLTComplete andPage:pg retIfHasNextPage:NULL];
252 | }
253 | -(NSMutableArray*) readAllDownloadingTasks{
254 | return [self _readAllTasksWithStat:TLTDownloadding];
255 | }
256 | -(NSMutableArray*) readDownloadingTasksWithPage:(NSUInteger) pg{
257 | return [self _tasksWithStatus:TLTDownloadding andPage:pg retIfHasNextPage:NULL];
258 | }
259 | -(NSMutableArray *) readAllOutofDateTasks{
260 | return [self _readAllTasksWithStat:TLTOutofDate];
261 | }
262 | -(NSMutableArray *) readOutofDateTasksWithPage:(NSUInteger) pg{
263 | return [self _tasksWithStatus:TLTOutofDate andPage:pg retIfHasNextPage:NULL];
264 | }
265 | -(NSMutableArray*) readAllDeletedTasks{
266 | return [self _readAllTasksWithStat:TLTDeleted];
267 | }
268 | -(NSMutableArray*) readDeletedTasksWithPage:(NSUInteger) pg{
269 | return [self _tasksWithStatus:TLTDeleted andPage:pg retIfHasNextPage:NULL];
270 | }
271 | #pragma mark - Private Normal Task Methods
272 | //私有方法
273 | -(NSMutableArray *) _tasksWithStatus:(TaskListType) listType{
274 | NSString* userid=[self userID];
275 | NSURL *url;
276 | switch (listType) {
277 | case TLTAll:
278 | url=[NSURL URLWithString:[NSString stringWithFormat:@"http://dynamic.cloud.vip.xunlei.com/user_task?userid=%@&st=0",userid]];
279 | break;
280 | case TLTComplete:
281 | url=[NSURL URLWithString:[NSString stringWithFormat:@"http://dynamic.cloud.vip.xunlei.com/user_task?userid=%@&st=2",userid]];
282 | break;
283 | case TLTDownloadding:
284 | url=[NSURL URLWithString:[NSString stringWithFormat:@"http://dynamic.cloud.vip.xunlei.com/user_task?userid=%@&st=1",userid]];
285 | break;
286 | case TLTOutofDate:
287 | url=[NSURL URLWithString:[NSString stringWithFormat:@"http://dynamic.cloud.vip.xunlei.com/user_history?type=1&userid=%@",userid]];
288 | break;
289 | case TLTDeleted:
290 | url=[NSURL URLWithString:[NSString stringWithFormat:@"http://dynamic.cloud.vip.xunlei.com/user_history?type=0userid=%@",userid]];
291 | break;
292 | default:
293 | break;
294 | }
295 | return [self _tasksWithURL:url retIfHasNextPage:NULL listType:listType];
296 | }
297 | -(NSMutableArray *) _tasksWithStatus:(TaskListType) listType andPage:(NSUInteger) pg retIfHasNextPage:(BOOL *) hasNextPage{
298 | NSString* userid=[self userID];
299 | NSURL *url;
300 | switch (listType) {
301 | case TLTAll:
302 | url=[NSURL URLWithString:[NSString stringWithFormat:@"http://dynamic.cloud.vip.xunlei.com/user_task?userid=%@&st=0&p=%lu",userid,(unsigned long)pg]];
303 | break;
304 | case TLTComplete:
305 | url=[NSURL URLWithString:[NSString stringWithFormat:@"http://dynamic.cloud.vip.xunlei.com/user_task?userid=%@&st=2&p=%lu",userid,(unsigned long)pg]];
306 | break;
307 | case TLTDownloadding:
308 | url=[NSURL URLWithString:[NSString stringWithFormat:@"http://dynamic.cloud.vip.xunlei.com/user_task?userid=%@&st=1&p=%lu",userid,(unsigned long)pg]];
309 | break;
310 | case TLTOutofDate:
311 | url=[NSURL URLWithString:[NSString stringWithFormat:@"http://dynamic.cloud.vip.xunlei.com/user_history?type=1&userid=%@&p=%lu",userid,(unsigned long)pg]];
312 | break;
313 | case TLTDeleted:
314 | url=[NSURL URLWithString:[NSString stringWithFormat:@"http://dynamic.cloud.vip.xunlei.com/user_history?type=0&userid=%@&p=%lu",userid,(unsigned long)pg]];
315 | break;
316 | default:
317 | break;
318 | }
319 | NSLog(@"%@",url);
320 | return [self _tasksWithURL:url retIfHasNextPage:hasNextPage listType:listType];
321 | }
322 | -(NSMutableArray *) _readAllTasksWithStat:(TaskListType) listType{
323 | NSUInteger pg=1;
324 | BOOL hasNP=NO;
325 | NSMutableArray *allTaskArray=[NSMutableArray arrayWithCapacity:0];
326 | NSMutableArray *mArray=nil;
327 | do {
328 | mArray=[self _tasksWithStatus:listType andPage:pg retIfHasNextPage:&hasNP];
329 | [allTaskArray addObjectsFromArray:mArray];
330 | pg++;
331 | } while (hasNP);
332 | return allTaskArray;
333 | }
334 | //只适用于“已过期”,“已删除”任务
335 |
336 | //通用方法
337 | -(NSURL*) _getNextPageURL:(NSString *) currentPageData{
338 | NSString *tmp=[ParseElements nextPageSubURL:currentPageData];
339 | NSURL *url=nil;
340 | if(tmp){
341 | NSString *u=[NSString stringWithFormat:@"http://dynamic.cloud.vip.xunlei.com%@",tmp];
342 | url=[NSURL URLWithString:u];
343 | }
344 | return url;
345 | }
346 | -(BOOL) _hasNextPage:(NSString*) currrentPageData{
347 | BOOL result=NO;
348 | if([self _getNextPageURL:currrentPageData]){
349 | result=YES;
350 | }
351 | return result;
352 | }
353 | -(NSMutableArray *) _tasksWithURL:(NSURL *) taskURL retIfHasNextPage:(BOOL *) hasNextPageBool listType:(TaskListType) listtype{
354 | NSString *siteData;
355 | //初始化返回Array
356 | NSMutableArray *elements=[[NSMutableArray alloc] initWithCapacity:0];
357 | //设置lx_nf_all Cookie
358 | //不得不喷一下这个东西了,不设置这个Cookie,返回网页有问题,不是没有内容,而是他妈的不全,太傻逼了,浪费了我一个小时的时间
359 | //而且这个东西只是再查询“已经删除”和“已经过期”才会用,如果在非这两种状态下使用这个Cookies也会出现显示网页不全的问题。
360 | //迅雷离线的网页怎么做的,飘忽不定
361 | if(listtype==TLTOutofDate||listtype==TLTDeleted){
362 | [self setCookieWithKey:@"lx_nf_all" Value:@"page_check_all%3Dhistory%26fltask_all_guoqi%3D1%26class_check%3D0%26page_check%3Dtask%26fl_page_id%3D0%26class_check_new%3D0%26set_tab_status%3D11"];
363 | }else{
364 | [self setCookieWithKey:@"lx_nf_all" Value:@""];
365 | }
366 |
367 | if(![self cookieValueWithName:@"lx_login"]){
368 | //完善所需要的cookies,并收到302响应跳转
369 | NSString *timeStamp=[self _currentTimeString];
370 | NSURL *redirectUrl = [NSURL URLWithString:[NSString stringWithFormat:@"http://dynamic.cloud.vip.xunlei.com/login?cachetime=%@&cachetime=%@&from=0",timeStamp,timeStamp]];
371 | LCHTTPConnection* redirectURLrequest = [LCHTTPConnection new];
372 | [redirectURLrequest get:[redirectUrl absoluteString]];
373 | //获取task页面内容
374 | LCHTTPConnection *request=[LCHTTPConnection new];
375 | siteData=[request get:[taskURL absoluteString]];
376 | }else {
377 | //获取task页面内容
378 | LCHTTPConnection *request=[LCHTTPConnection new];
379 | siteData=[request get:[taskURL absoluteString]];
380 | }
381 | // NSLog(@"data:%@",siteData);
382 | //当得到返回数据且得到真实可用的列表信息(不是502等错误页面)时进行下一步
383 | NSString *gdriveid=[ParseElements GDriveID:siteData];
384 | if (siteData&&(gdriveid.length>0)) {
385 | //设置Gdriveid
386 | [self setGdriveID:gdriveid];
387 | /*
388 | *===============
389 | *Parse Html
390 | *===============
391 | */
392 | //检查是否还有下一页
393 | if(hasNextPageBool){
394 | *hasNextPageBool=[self _hasNextPage:siteData];
395 | }
396 | NSString *re1=@"
amongst other things";
56 | NSRegularExpression *nameExpression = [NSRegularExpression regularExpressionWithPattern:regex options:NSRegularExpressionSearch error:nil];
57 |
58 | NSArray *matches = [nameExpression matchesInString:self
59 | options:0
60 | range:NSMakeRange(0, [self length])];
61 | for (NSTextCheckingResult *match in matches) {
62 | NSRange matchRange = [match rangeAtIndex:capture];
63 | NSString *matchString = @"";
64 | @try {
65 | matchString=[self substringWithRange:matchRange];
66 | }
67 | @catch (NSException *exception) {
68 | // NSLog(@"found exception!!");
69 | result=nil;
70 | }
71 | @finally {
72 | }
73 | // NSLog(@"%@", matchString);
74 | result=matchString;
75 | break;
76 | }
77 | return result;
78 | }
79 | @end
80 |
--------------------------------------------------------------------------------
/TondarAPI/ParseElements.h:
--------------------------------------------------------------------------------
1 | //
2 | // PhraseElements.h
3 | // XunleiLixian-API
4 | //
5 | // Created by Liu Chao on 6/10/12.
6 | // Copyright (c) 2012 HwaYing. All rights reserved.
7 | //
8 | /*This file is part of XunleiLixian-API.
9 |
10 | XunleiLixian-API is free software: you can redistribute it and/or modify
11 | it under the terms of the GNU General Public License as published by
12 | the Free Software Foundation, either version 3 of the License, or
13 | (at your option) any later version.
14 |
15 | Foobar is distributed in the hope that it will be useful,
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | GNU General Public License for more details.
19 |
20 | You should have received a copy of the GNU General Public License
21 | along with Foobar. If not, see .
22 | */
23 |
24 | /*
25 | 这个文件中的方法几乎不需要手动调用
26 | 正常的情况下你不需要使用任何其中的方法
27 | */
28 |
29 | #import
30 |
31 | @interface ParseElements : NSObject
32 |
33 | +(NSArray *) taskPageData:(NSString *)orignData;
34 |
35 | +(NSString *) taskName:(NSString *)taskContent;
36 | +(NSString *) taskSize:(NSString *)taskContent;
37 | +(NSString *) taskLoadProcess:(NSString *)taskContent;
38 | +(NSString *) taskRetainDays:(NSString *)taskContent;
39 | +(NSString *) taskAddTime:(NSString *)taskContent;
40 | +(NSString *) taskDownlaodNormalURL:(NSString *)taskContent;
41 | +(NSString *) GDriveID:(NSString *) orignData;
42 | +(NSString *) taskType:(NSString *)taskContent;
43 | +(NSString *) DCID:(NSString *)taskContent;
44 | +(NSString *) GCID:(NSString *)taskDownLoadURL;
45 | +(NSMutableDictionary *)taskInfo:(NSString *)taskContent;
46 | +(NSString*) nextPageSubURL:(NSString *) currentPageData;
47 | @end
48 |
--------------------------------------------------------------------------------
/TondarAPI/ParseElements.m:
--------------------------------------------------------------------------------
1 | //
2 | // PhraseElements.m
3 | // XunleiLixian-API
4 | //
5 | // Created by Liu Chao on 6/10/12.
6 | // Copyright (c) 2012 HwaYing. All rights reserved.
7 | //
8 | /*This file is part of XunleiLixian-API.
9 |
10 | XunleiLixian-API is free software: you can redistribute it and/or modify
11 | it under the terms of the GNU General Public License as published by
12 | the Free Software Foundation, either version 3 of the License, or
13 | (at your option) any later version.
14 |
15 | Foobar is distributed in the hope that it will be useful,
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | GNU General Public License for more details.
19 |
20 | You should have received a copy of the GNU General Public License
21 | along with Foobar. If not, see .
22 | */
23 |
24 |
25 | #import "ParseElements.h"
26 | #import "NSString+RE.h"
27 |
28 | @implementation ParseElements
29 |
30 | +(NSArray *) taskPageData:(NSString *)orignData{
31 | //获得已经完成和已经过期Task列表汇总信息
32 | NSString *listBoxRex=@"