Merge lp:~dobey/libubuntuone/system-oauth into lp:libubuntuone

Proposed by dobey on 2012-04-05
Status: Merged
Approved by: dobey on 2012-04-05
Approved revision: 151
Merged at revision: 150
Proposed branch: lp:~dobey/libubuntuone/system-oauth
Merge into: lp:libubuntuone
Diff against target: 3524 lines (+837/-2488)
19 files modified
COPYING (+654/-461)
COPYING.GPL (+0/-339)
COPYING.LIB (+165/-0)
Makefile.am (+0/-2)
configure.ac (+1/-1)
libubuntuoneui/Makefile.am (+2/-5)
libubuntuoneui/oauth.c (+0/-961)
libubuntuoneui/oauth.h (+0/-539)
libubuntuoneui/u1-codec-installer.c (+2/-2)
libubuntuoneui/u1-codec-installer.h (+2/-2)
libubuntuoneui/u1-music-store.c (+3/-3)
libubuntuoneui/u1-music-store.h (+2/-2)
libubuntuoneui/u1-request-chrome.c (+2/-2)
libubuntuoneui/u1-request-chrome.h (+2/-2)
libubuntuoneui/xmalloc.c (+0/-151)
libubuntuoneui/xmalloc.h (+0/-12)
po/POTFILES.in (+0/-1)
po/POTFILES.skip (+0/-1)
tests/test-music-store.c (+2/-2)
To merge this branch: bzr merge lp:~dobey/libubuntuone/system-oauth
Reviewer Review Type Date Requested Status
Diego Sarmentero (community) Approve on 2012-04-05
Eric Casteleijn (community) 2012-04-05 Approve on 2012-04-05
Review via email: mp+100977@code.launchpad.net

Commit message

Build against a system liboauth rather than shipping old copies
Replace the COPYING files in the correct manner, with the LGPLv3 copy
Fix all the license headers to properly refer to LGPLv3 and Canonical Ltd.

To post a comment you must log in.
Eric Casteleijn (thisfred) wrote :

Looking good

review: Approve
Diego Sarmentero (diegosarmentero) wrote :

+1

review: Approve
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (9.1 KiB)

The attempt to merge lp:~dobey/libubuntuone/system-oauth into lp:libubuntuone failed. Below is the output from the failed tests.

/usr/bin/gnome-autogen.sh
checking for autoconf >= 2.53...
  testing autoconf2.50... not found.
  testing autoconf... found 2.68
checking for automake >= 1.6...
  testing automake-1.11... found 1.11.3
checking for libtool >= 1.5...
  testing libtoolize... found 2.4.2
checking for glib-gettext >= 2.2.0...
  testing glib-gettextize... found 2.32.0
checking for intltool >= 0.30...
  testing intltoolize... found 0.50.2
checking for pkg-config >= 0.14.0...
  testing pkg-config... found 0.26
checking for gtk-doc >= 1.0...
  testing gtkdocize... found 1.18
Checking for required M4 macros...
Checking for forbidden M4 macros...
Processing ./configure.ac
Running libtoolize...
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: You should add the contents of the following files to `aclocal.m4':
libtoolize: `/usr/share/aclocal/libtool.m4'
libtoolize: `/usr/share/aclocal/ltoptions.m4'
libtoolize: `/usr/share/aclocal/ltversion.m4'
libtoolize: `/usr/share/aclocal/ltsugar.m4'
libtoolize: `/usr/share/aclocal/lt~obsolete.m4'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
Running glib-gettextize... Ignore non-fatal messages.
Copying file mkinstalldirs
Copying file po/Makefile.in.in

Please add the files
  codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4
  progtest.m4
from the /aclocal directory to your autoconf macro directory
or directly to your aclocal.m4 file.
You will also need config.guess and config.sub, which you can get from
ftp://ftp.gnu.org/pub/gnu/config/.

Running intltoolize...
Running gtkdocize...
Running aclocal-1.11...
Running autoconf...
Running autoheader...
Running automake-1.11...
Running ./configure --enable-gtk-doc --enable-debug ...
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for...

Read more...

lp:~dobey/libubuntuone/system-oauth updated on 2012-04-05
151. By dobey on 2012-04-05

Forgot to remove this too

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'COPYING'
--- COPYING 2010-02-16 23:02:24 +0000
+++ COPYING 2012-04-05 18:42:22 +0000
@@ -1,481 +1,674 @@
1 GNU LIBRARY GENERAL PUBLIC LICENSE1 GNU GENERAL PUBLIC LICENSE
2 Version 2, June 19912 Version 3, 29 June 2007
33
4 Copyright (C) 1991 Free Software Foundation, Inc.4 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
6 Everyone is permitted to copy and distribute verbatim copies5 Everyone is permitted to copy and distribute verbatim copies
7 of this license document, but changing it is not allowed.6 of this license document, but changing it is not allowed.
87
9[This is the first released version of the library GPL. It is8 Preamble
10 numbered 2 because it goes with version 2 of the ordinary GPL.]9
1110 The GNU General Public License is a free, copyleft license for
12 Preamble11software and other kinds of works.
1312
14 The licenses for most software are designed to take away your13 The licenses for most software and other practical works are designed
15freedom to share and change it. By contrast, the GNU General Public14to take away your freedom to share and change the works. By contrast,
16Licenses are intended to guarantee your freedom to share and change15the GNU General Public License is intended to guarantee your freedom to
17free software--to make sure the software is free for all its users.16share and change all versions of a program--to make sure it remains free
1817software for all its users. We, the Free Software Foundation, use the
19 This license, the Library General Public License, applies to some18GNU General Public License for most of our software; it applies also to
20specially designated Free Software Foundation software, and to any19any other work released this way by its authors. You can apply it to
21other libraries whose authors decide to use it. You can use it for20your programs, too.
22your libraries, too.
2321
24 When we speak of free software, we are referring to freedom, not22 When we speak of free software, we are referring to freedom, not
25price. Our General Public Licenses are designed to make sure that you23price. Our General Public Licenses are designed to make sure that you
26have the freedom to distribute copies of free software (and charge for24have the freedom to distribute copies of free software (and charge for
27this service if you wish), that you receive source code or can get it
28if you want it, that you can change the software or use pieces of it
29in new free programs; and that you know you can do these things.
30
31 To protect your rights, we need to make restrictions that forbid
32anyone to deny you these rights or to ask you to surrender the rights.
33These restrictions translate to certain responsibilities for you if
34you distribute copies of the library, or if you modify it.
35
36 For example, if you distribute copies of the library, whether gratis
37or for a fee, you must give the recipients all the rights that we gave
38you. You must make sure that they, too, receive or can get the source
39code. If you link a program with the library, you must provide
40complete object files to the recipients so that they can relink them
41with the library, after making changes to the library and recompiling
42it. And you must show them these terms so they know their rights.
43
44 Our method of protecting your rights has two steps: (1) copyright
45the library, and (2) offer you this license which gives you legal
46permission to copy, distribute and/or modify the library.
47
48 Also, for each distributor's protection, we want to make certain
49that everyone understands that there is no warranty for this free
50library. If the library is modified by someone else and passed on, we
51want its recipients to know that what they have is not the original
52version, so that any problems introduced by others will not reflect on
53the original authors' reputations.
54
5525
56 Finally, any free program is threatened constantly by software26them if you wish), that you receive source code or can get it if you
57patents. We wish to avoid the danger that companies distributing free27want it, that you can change the software or use pieces of it in new
58software will individually obtain patent licenses, thus in effect28free programs, and that you know you can do these things.
59transforming the program into proprietary software. To prevent this,29
60we have made it clear that any patent must be licensed for everyone's30 To protect your rights, we need to prevent others from denying you
61free use or not licensed at all.31these rights or asking you to surrender the rights. Therefore, you have
6232certain responsibilities if you distribute copies of the software, or if
63 Most GNU software, including some libraries, is covered by the ordinary33you modify it: responsibilities to respect the freedom of others.
64GNU General Public License, which was designed for utility programs. This34
65license, the GNU Library General Public License, applies to certain35 For example, if you distribute copies of such a program, whether
66designated libraries. This license is quite different from the ordinary36gratis or for a fee, you must pass on to the recipients the same
67one; be sure to read it in full, and don't assume that anything in it is37freedoms that you received. You must make sure that they, too, receive
68the same as in the ordinary license.38or can get the source code. And you must show them these terms so they
6939know their rights.
70 The reason we have a separate public license for some libraries is that40
71they blur the distinction we usually make between modifying or adding to a41 Developers that use the GNU GPL protect your rights with two steps:
72program and simply using it. Linking a program with a library, without42(1) assert copyright on the software, and (2) offer you this License
73changing the library, is in some sense simply using the library, and is43giving you legal permission to copy, distribute and/or modify it.
74analogous to running a utility program or application program. However, in44
75a textual and legal sense, the linked executable is a combined work, a45 For the developers' and authors' protection, the GPL clearly explains
76derivative of the original library, and the ordinary General Public License46that there is no warranty for this free software. For both users' and
77treats it as such.47authors' sake, the GPL requires that modified versions be marked as
7848changed, so that their problems will not be attributed erroneously to
79 Because of this blurred distinction, using the ordinary General49authors of previous versions.
80Public License for libraries did not effectively promote software50
81sharing, because most developers did not use the libraries. We51 Some devices are designed to deny users access to install or run
82concluded that weaker conditions might promote sharing better.52modified versions of the software inside them, although the manufacturer
8353can do so. This is fundamentally incompatible with the aim of
84 However, unrestricted linking of non-free programs would deprive the54protecting users' freedom to change the software. The systematic
85users of those programs of all benefit from the free status of the55pattern of such abuse occurs in the area of products for individuals to
86libraries themselves. This Library General Public License is intended to56use, which is precisely where it is most unacceptable. Therefore, we
87permit developers of non-free programs to use free libraries, while57have designed this version of the GPL to prohibit the practice for those
88preserving your freedom as a user of such programs to change the free58products. If such problems arise substantially in other domains, we
89libraries that are incorporated in them. (We have not seen how to achieve59stand ready to extend this provision to those domains in future versions
90this as regards changes in header files, but we have achieved it as regards60of the GPL, as needed to protect the freedom of users.
91changes in the actual functions of the Library.) The hope is that this61
92will lead to faster development of free libraries.62 Finally, every program is threatened constantly by software patents.
63States should not allow patents to restrict development and use of
64software on general-purpose computers, but in those that do, we wish to
65avoid the special danger that patents applied to a free program could
66make it effectively proprietary. To prevent this, the GPL assures that
67patents cannot be used to render the program non-free.
9368
94 The precise terms and conditions for copying, distribution and69 The precise terms and conditions for copying, distribution and
95modification follow. Pay close attention to the difference between a
96"work based on the library" and a "work that uses the library". The
97former contains code derived from the library, while the latter only
98works together with the library.
99
100 Note that it is possible for a library to be covered by the ordinary
101General Public License rather than by this special one.
102
10370
104 GNU LIBRARY GENERAL PUBLIC LICENSE
105 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
106
107 0. This License Agreement applies to any software library which
108contains a notice placed by the copyright holder or other authorized
109party saying it may be distributed under the terms of this Library
110General Public License (also called "this License"). Each licensee is
111addressed as "you".
112
113 A "library" means a collection of software functions and/or data
114prepared so as to be conveniently linked with application programs
115(which use some of those functions and data) to form executables.
116
117 The "Library", below, refers to any such software library or work
118which has been distributed under these terms. A "work based on the
119Library" means either the Library or any derivative work under
120copyright law: that is to say, a work containing the Library or a
121portion of it, either verbatim or with modifications and/or translated
122straightforwardly into another language. (Hereinafter, translation is
123included without limitation in the term "modification".)
124
125 "Source code" for a work means the preferred form of the work for
126making modifications to it. For a library, complete source code means
127all the source code for all modules it contains, plus any associated
128interface definition files, plus the scripts used to control compilation
129and installation of the library.
130
131 Activities other than copying, distribution and modification are not
132covered by this License; they are outside its scope. The act of
133running a program using the Library is not restricted, and output from
134such a program is covered only if its contents constitute a work based
135on the Library (independent of the use of the Library in a tool for
136writing it). Whether that is true depends on what the Library does
137and what the program that uses the Library does.
138
139 1. You may copy and distribute verbatim copies of the Library's
140complete source code as you receive it, in any medium, provided that
141you conspicuously and appropriately publish on each copy an
142appropriate copyright notice and disclaimer of warranty; keep intact
143all the notices that refer to this License and to the absence of any
144warranty; and distribute a copy of this License along with the
145Library.
146
147 You may charge a fee for the physical act of transferring a copy,
148and you may at your option offer warranty protection in exchange for a
149fee.
150
15171
152 2. You may modify your copy or copies of the Library or any portion
153of it, thus forming a work based on the Library, and copy and
154distribute such modifications or work under the terms of Section 1
155above, provided that you also meet all of these conditions:
156
157 a) The modified work must itself be a software library.
158
159 b) You must cause the files modified to carry prominent notices
160 stating that you changed the files and the date of any change.
161
162 c) You must cause the whole of the work to be licensed at no
163 charge to all third parties under the terms of this License.
164
165 d) If a facility in the modified Library refers to a function or a
166 table of data to be supplied by an application program that uses
167 the facility, other than as an argument passed when the facility
168 is invoked, then you must make a good faith effort to ensure that,
169 in the event an application does not supply such function or
170 table, the facility still operates, and performs whatever part of
171 its purpose remains meaningful.
172
173 (For example, a function in a library to compute square roots has
174 a purpose that is entirely well-defined independent of the
175 application. Therefore, Subsection 2d requires that any
176 application-supplied function or table used by this function must
177 be optional: if the application does not supply it, the square
178 root function must still compute square roots.)
179
180These requirements apply to the modified work as a whole. If
181identifiable sections of that work are not derived from the Library,
182and can be reasonably considered independent and separate works in
183themselves, then this License, and its terms, do not apply to those
184sections when you distribute them as separate works. But when you
185distribute the same sections as part of a whole which is a work based
186on the Library, the distribution of the whole must be on the terms of
187this License, whose permissions for other licensees extend to the
188entire whole, and thus to each and every part regardless of who wrote
189it.
190
191Thus, it is not the intent of this section to claim rights or contest
192your rights to work written entirely by you; rather, the intent is to
193exercise the right to control the distribution of derivative or
194collective works based on the Library.
195
196In addition, mere aggregation of another work not based on the Library
197with the Library (or with a work based on the Library) on a volume of
198a storage or distribution medium does not bring the other work under
199the scope of this License.
200
201 3. You may opt to apply the terms of the ordinary GNU General Public
202License instead of this License to a given copy of the Library. To do
203this, you must alter all the notices that refer to this License, so
204that they refer to the ordinary GNU General Public License, version 2,
205instead of to this License. (If a newer version than version 2 of the
206ordinary GNU General Public License has appeared, then you can specify
207that version instead if you wish.) Do not make any other change in
208these notices.
209
21072
211 Once this change is made in a given copy, it is irreversible for
212that copy, so the ordinary GNU General Public License applies to all
213subsequent copies and derivative works made from that copy.
214
215 This option is useful when you wish to copy part of the code of
216the Library into a program that is not a library.
217
218 4. You may copy and distribute the Library (or a portion or
219derivative of it, under Section 2) in object code or executable form
220under the terms of Sections 1 and 2 above provided that you accompany
221it with the complete corresponding machine-readable source code, which
222must be distributed under the terms of Sections 1 and 2 above on a
223medium customarily used for software interchange.
224
225 If distribution of object code is made by offering access to copy
226from a designated place, then offering equivalent access to copy the
227source code from the same place satisfies the requirement to
228distribute the source code, even though third parties are not
229compelled to copy the source along with the object code.
230
231 5. A program that contains no derivative of any portion of the
232Library, but is designed to work with the Library by being compiled or
233linked with it, is called a "work that uses the Library". Such a
234work, in isolation, is not a derivative work of the Library, and
235therefore falls outside the scope of this License.
236
237 However, linking a "work that uses the Library" with the Library
238creates an executable that is a derivative of the Library (because it
239contains portions of the Library), rather than a "work that uses the
240library". The executable is therefore covered by this License.
241Section 6 states terms for distribution of such executables.
242
243 When a "work that uses the Library" uses material from a header file
244that is part of the Library, the object code for the work may be a
245derivative work of the Library even though the source code is not.
246Whether this is true is especially significant if the work can be
247linked without the Library, or if the work is itself a library. The
248threshold for this to be true is not precisely defined by law.
249
250 If such an object file uses only numerical parameters, data
251structure layouts and accessors, and small macros and small inline
252functions (ten lines or less in length), then the use of the object
253file is unrestricted, regardless of whether it is legally a derivative
254work. (Executables containing this object code plus portions of the
255Library will still fall under Section 6.)
256
257 Otherwise, if the work is a derivative of the Library, you may
258distribute the object code for the work under the terms of Section 6.
259Any executables containing that work also fall under Section 6,
260whether or not they are linked directly with the Library itself.
261
26273
263 6. As an exception to the Sections above, you may also compile or
264link a "work that uses the Library" with the Library to produce a
265work containing portions of the Library, and distribute that work
266under terms of your choice, provided that the terms permit
267modification of the work for the customer's own use and reverse
268engineering for debugging such modifications.
269
270 You must give prominent notice with each copy of the work that the
271Library is used in it and that the Library and its use are covered by
272this License. You must supply a copy of this License. If the work
273during execution displays copyright notices, you must include the
274copyright notice for the Library among them, as well as a reference
275directing the user to the copy of this License. Also, you must do one
276of these things:
277
278 a) Accompany the work with the complete corresponding
279 machine-readable source code for the Library including whatever
280 changes were used in the work (which must be distributed under
281 Sections 1 and 2 above); and, if the work is an executable linked
282 with the Library, with the complete machine-readable "work that
283 uses the Library", as object code and/or source code, so that the
284 user can modify the Library and then relink to produce a modified
285 executable containing the modified Library. (It is understood
286 that the user who changes the contents of definitions files in the
287 Library will not necessarily be able to recompile the application
288 to use the modified definitions.)
289
290 b) Accompany the work with a written offer, valid for at
291 least three years, to give the same user the materials
292 specified in Subsection 6a, above, for a charge no more
293 than the cost of performing this distribution.
294
295 c) If distribution of the work is made by offering access to copy
296 from a designated place, offer equivalent access to copy the above
297 specified materials from the same place.
298
299 d) Verify that the user has already received a copy of these
300 materials or that you have already sent this user a copy.
301
302 For an executable, the required form of the "work that uses the
303Library" must include any data and utility programs needed for
304reproducing the executable from it. However, as a special exception,
305the source code distributed need not include anything that is normally
306distributed (in either source or binary form) with the major
307components (compiler, kernel, and so on) of the operating system on
308which the executable runs, unless that component itself accompanies
309the executable.
310
311 It may happen that this requirement contradicts the license
312restrictions of other proprietary libraries that do not normally
313accompany the operating system. Such a contradiction means you cannot
314use both them and the Library together in an executable that you
315distribute.
316
31774
318 7. You may place library facilities that are a work based on the75modification follow.
319Library side-by-side in a single library together with other library76
320facilities not covered by this License, and distribute such a combined77 TERMS AND CONDITIONS
321library, provided that the separate distribution of the work based on78
322the Library and of the other library facilities is otherwise79 0. Definitions.
323permitted, and provided that you do these two things:80
32481 "This License" refers to version 3 of the GNU General Public License.
325 a) Accompany the combined library with a copy of the same work82
326 based on the Library, uncombined with any other library83 "Copyright" also means copyright-like laws that apply to other kinds of
327 facilities. This must be distributed under the terms of the84works, such as semiconductor masks.
328 Sections above.85
32986 "The Program" refers to any copyrightable work licensed under this
330 b) Give prominent notice with the combined library of the fact87License. Each licensee is addressed as "you". "Licensees" and
331 that part of it is a work based on the Library, and explaining88"recipients" may be individuals or organizations.
332 where to find the accompanying uncombined form of the same work.89
33390 To "modify" a work means to copy from or adapt all or part of the work
334 8. You may not copy, modify, sublicense, link with, or distribute91in a fashion requiring copyright permission, other than the making of an
335the Library except as expressly provided under this License. Any92exact copy. The resulting work is called a "modified version" of the
336attempt otherwise to copy, modify, sublicense, link with, or93earlier work or a work "based on" the earlier work.
337distribute the Library is void, and will automatically terminate your94
338rights under this License. However, parties who have received copies,95 A "covered work" means either the unmodified Program or a work based
339or rights, from you under this License will not have their licenses96on the Program.
340terminated so long as such parties remain in full compliance.97
34198 To "propagate" a work means to do anything with it that, without
342 9. You are not required to accept this License, since you have not99permission, would make you directly or secondarily liable for
343signed it. However, nothing else grants you permission to modify or100infringement under applicable copyright law, except executing it on a
344distribute the Library or its derivative works. These actions are101computer or modifying a private copy. Propagation includes copying,
345prohibited by law if you do not accept this License. Therefore, by102distribution (with or without modification), making available to the
346modifying or distributing the Library (or any work based on the103public, and in some countries other activities as well.
347Library), you indicate your acceptance of this License to do so, and104
348all its terms and conditions for copying, distributing or modifying105 To "convey" a work means any kind of propagation that enables other
349the Library or works based on it.106parties to make or receive copies. Mere interaction with a user through
350107a computer network, with no transfer of a copy, is not conveying.
351 10. Each time you redistribute the Library (or any work based on the108
352Library), the recipient automatically receives a license from the109 An interactive user interface displays "Appropriate Legal Notices"
353original licensor to copy, distribute, link with or modify the Library110to the extent that it includes a convenient and prominently visible
354subject to these terms and conditions. You may not impose any further111feature that (1) displays an appropriate copyright notice, and (2)
355restrictions on the recipients' exercise of the rights granted herein.112tells the user that there is no warranty for the work (except to the
356You are not responsible for enforcing compliance by third parties to113extent that warranties are provided), that licensees may convey the
114work under this License, and how to view a copy of this License. If
115the interface presents a list of user commands or options, such as a
116menu, a prominent item in the list meets this criterion.
117
118 1. Source Code.
119
120 The "source code" for a work means the preferred form of the work
121for making modifications to it. "Object code" means any non-source
122form of a work.
123
124 A "Standard Interface" means an interface that either is an official
125standard defined by a recognized standards body, or, in the case of
126interfaces specified for a particular programming language, one that
127is widely used among developers working in that language.
128
129 The "System Libraries" of an executable work include anything, other
130than the work as a whole, that (a) is included in the normal form of
131packaging a Major Component, but which is not part of that Major
132Component, and (b) serves only to enable use of the work with that
133Major Component, or to implement a Standard Interface for which an
134implementation is available to the public in source code form. A
135"Major Component", in this context, means a major essential component
136(kernel, window system, and so on) of the specific operating system
137(if any) on which the executable work runs, or a compiler used to
138produce the work, or an object code interpreter used to run it.
139
140 The "Corresponding Source" for a work in object code form means all
141the source code needed to generate, install, and (for an executable
142work) run the object code and to modify the work, including scripts to
143control those activities. However, it does not include the work's
144System Libraries, or general-purpose tools or generally available free
145programs which are used unmodified in performing those activities but
146which are not part of the work. For example, Corresponding Source
147includes interface definition files associated with source files for
148the work, and the source code for shared libraries and dynamically
149linked subprograms that the work is specifically designed to require,
150such as by intimate data communication or control flow between those
151subprograms and other parts of the work.
152
153 The Corresponding Source need not include anything that users
154can regenerate automatically from other parts of the Corresponding
155Source.
156
157 The Corresponding Source for a work in source code form is that
158same work.
159
160 2. Basic Permissions.
161
162 All rights granted under this License are granted for the term of
163copyright on the Program, and are irrevocable provided the stated
164conditions are met. This License explicitly affirms your unlimited
165permission to run the unmodified Program. The output from running a
166covered work is covered by this License only if the output, given its
167content, constitutes a covered work. This License acknowledges your
168rights of fair use or other equivalent, as provided by copyright law.
169
170 You may make, run and propagate covered works that you do not
171convey, without conditions so long as your license otherwise remains
172in force. You may convey covered works to others for the sole purpose
173of having them make modifications exclusively for you, or provide you
174with facilities for running those works, provided that you comply with
175the terms of this License in conveying all material for which you do
176not control copyright. Those thus making or running the covered works
177for you must do so exclusively on your behalf, under your direction
178and control, on terms that prohibit them from making any copies of
179your copyrighted material outside their relationship with you.
180
181 Conveying under any other circumstances is permitted solely under
182the conditions stated below. Sublicensing is not allowed; section 10
183makes it unnecessary.
184
185 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
186
187 No covered work shall be deemed part of an effective technological
188measure under any applicable law fulfilling obligations under article
18911 of the WIPO copyright treaty adopted on 20 December 1996, or
190similar laws prohibiting or restricting circumvention of such
191measures.
192
193 When you convey a covered work, you waive any legal power to forbid
194circumvention of technological measures to the extent such circumvention
195is effected by exercising rights under this License with respect to
196the covered work, and you disclaim any intention to limit operation or
197modification of the work as a means of enforcing, against the work's
198users, your or third parties' legal rights to forbid circumvention of
199technological measures.
200
201 4. Conveying Verbatim Copies.
202
203 You may convey verbatim copies of the Program's source code as you
204receive it, in any medium, provided that you conspicuously and
205appropriately publish on each copy an appropriate copyright notice;
206keep intact all notices stating that this License and any
207non-permissive terms added in accord with section 7 apply to the code;
208keep intact all notices of the absence of any warranty; and give all
209recipients a copy of this License along with the Program.
210
211 You may charge any price or no price for each copy that you convey,
212and you may offer support or warranty protection for a fee.
213
214 5. Conveying Modified Source Versions.
215
216 You may convey a work based on the Program, or the modifications to
217produce it from the Program, in the form of source code under the
218terms of section 4, provided that you also meet all of these conditions:
219
220 a) The work must carry prominent notices stating that you modified
221 it, and giving a relevant date.
222
223 b) The work must carry prominent notices stating that it is
224 released under this License and any conditions added under section
225 7. This requirement modifies the requirement in section 4 to
226 "keep intact all notices".
227
228 c) You must license the entire work, as a whole, under this
229 License to anyone who comes into possession of a copy. This
230 License will therefore apply, along with any applicable section 7
231 additional terms, to the whole of the work, and all its parts,
232 regardless of how they are packaged. This License gives no
233 permission to license the work in any other way, but it does not
234 invalidate such permission if you have separately received it.
235
236 d) If the work has interactive user interfaces, each must display
237 Appropriate Legal Notices; however, if the Program has interactive
238 interfaces that do not display Appropriate Legal Notices, your
239 work need not make them do so.
240
241 A compilation of a covered work with other separate and independent
242works, which are not by their nature extensions of the covered work,
243and which are not combined with it such as to form a larger program,
244in or on a volume of a storage or distribution medium, is called an
245"aggregate" if the compilation and its resulting copyright are not
246used to limit the access or legal rights of the compilation's users
247beyond what the individual works permit. Inclusion of a covered work
248in an aggregate does not cause this License to apply to the other
249parts of the aggregate.
250
251 6. Conveying Non-Source Forms.
252
253 You may convey a covered work in object code form under the terms
254of sections 4 and 5, provided that you also convey the
255machine-readable Corresponding Source under the terms of this License,
256in one of these ways:
257
258 a) Convey the object code in, or embodied in, a physical product
259 (including a physical distribution medium), accompanied by the
260 Corresponding Source fixed on a durable physical medium
261 customarily used for software interchange.
262
263 b) Convey the object code in, or embodied in, a physical product
264 (including a physical distribution medium), accompanied by a
265 written offer, valid for at least three years and valid for as
266 long as you offer spare parts or customer support for that product
267 model, to give anyone who possesses the object code either (1) a
268 copy of the Corresponding Source for all the software in the
269 product that is covered by this License, on a durable physical
270 medium customarily used for software interchange, for a price no
271 more than your reasonable cost of physically performing this
272 conveying of source, or (2) access to copy the
273 Corresponding Source from a network server at no charge.
274
275 c) Convey individual copies of the object code with a copy of the
276 written offer to provide the Corresponding Source. This
277 alternative is allowed only occasionally and noncommercially, and
278 only if you received the object code with such an offer, in accord
279 with subsection 6b.
280
281 d) Convey the object code by offering access from a designated
282 place (gratis or for a charge), and offer equivalent access to the
283 Corresponding Source in the same way through the same place at no
284 further charge. You need not require recipients to copy the
285 Corresponding Source along with the object code. If the place to
286 copy the object code is a network server, the Corresponding Source
287 may be on a different server (operated by you or a third party)
288 that supports equivalent copying facilities, provided you maintain
289 clear directions next to the object code saying where to find the
290 Corresponding Source. Regardless of what server hosts the
291 Corresponding Source, you remain obligated to ensure that it is
292 available for as long as needed to satisfy these requirements.
293
294 e) Convey the object code using peer-to-peer transmission, provided
295 you inform other peers where the object code and Corresponding
296 Source of the work are being offered to the general public at no
297 charge under subsection 6d.
298
299 A separable portion of the object code, whose source code is excluded
300from the Corresponding Source as a System Library, need not be
301included in conveying the object code work.
302
303 A "User Product" is either (1) a "consumer product", which means any
304tangible personal property which is normally used for personal, family,
305or household purposes, or (2) anything designed or sold for incorporation
306into a dwelling. In determining whether a product is a consumer product,
307doubtful cases shall be resolved in favor of coverage. For a particular
308product received by a particular user, "normally used" refers to a
309typical or common use of that class of product, regardless of the status
310of the particular user or of the way in which the particular user
311actually uses, or expects or is expected to use, the product. A product
312is a consumer product regardless of whether the product has substantial
313commercial, industrial or non-consumer uses, unless such uses represent
314the only significant mode of use of the product.
315
316 "Installation Information" for a User Product means any methods,
317procedures, authorization keys, or other information required to install
318and execute modified versions of a covered work in that User Product from
319a modified version of its Corresponding Source. The information must
320suffice to ensure that the continued functioning of the modified object
321code is in no case prevented or interfered with solely because
322modification has been made.
323
324 If you convey an object code work under this section in, or with, or
325specifically for use in, a User Product, and the conveying occurs as
326part of a transaction in which the right of possession and use of the
327User Product is transferred to the recipient in perpetuity or for a
328fixed term (regardless of how the transaction is characterized), the
329Corresponding Source conveyed under this section must be accompanied
330by the Installation Information. But this requirement does not apply
331if neither you nor any third party retains the ability to install
332modified object code on the User Product (for example, the work has
333been installed in ROM).
334
335 The requirement to provide Installation Information does not include a
336requirement to continue to provide support service, warranty, or updates
337for a work that has been modified or installed by the recipient, or for
338the User Product in which it has been modified or installed. Access to a
339network may be denied when the modification itself materially and
340adversely affects the operation of the network or violates the rules and
341protocols for communication across the network.
342
343 Corresponding Source conveyed, and Installation Information provided,
344in accord with this section must be in a format that is publicly
345documented (and with an implementation available to the public in
346source code form), and must require no special password or key for
347unpacking, reading or copying.
348
349 7. Additional Terms.
350
351 "Additional permissions" are terms that supplement the terms of this
352License by making exceptions from one or more of its conditions.
353Additional permissions that are applicable to the entire Program shall
354be treated as though they were included in this License, to the extent
355that they are valid under applicable law. If additional permissions
356apply only to part of the Program, that part may be used separately
357under those permissions, but the entire Program remains governed by
358this License without regard to the additional permissions.
359
360 When you convey a copy of a covered work, you may at your option
361remove any additional permissions from that copy, or from any part of
362it. (Additional permissions may be written to require their own
363removal in certain cases when you modify the work.) You may place
364additional permissions on material, added by you to a covered work,
365for which you have or can give appropriate copyright permission.
366
367 Notwithstanding any other provision of this License, for material you
368add to a covered work, you may (if authorized by the copyright holders of
369that material) supplement the terms of this License with terms:
370
371 a) Disclaiming warranty or limiting liability differently from the
372 terms of sections 15 and 16 of this License; or
373
374 b) Requiring preservation of specified reasonable legal notices or
375 author attributions in that material or in the Appropriate Legal
376 Notices displayed by works containing it; or
377
378 c) Prohibiting misrepresentation of the origin of that material, or
379 requiring that modified versions of such material be marked in
380 reasonable ways as different from the original version; or
381
382 d) Limiting the use for publicity purposes of names of licensors or
383 authors of the material; or
384
385 e) Declining to grant rights under trademark law for use of some
386 trade names, trademarks, or service marks; or
387
388 f) Requiring indemnification of licensors and authors of that
389 material by anyone who conveys the material (or modified versions of
390 it) with contractual assumptions of liability to the recipient, for
391 any liability that these contractual assumptions directly impose on
392 those licensors and authors.
393
394 All other non-permissive additional terms are considered "further
395restrictions" within the meaning of section 10. If the Program as you
396received it, or any part of it, contains a notice stating that it is
397governed by this License along with a term that is a further
398restriction, you may remove that term. If a license document contains
399a further restriction but permits relicensing or conveying under this
400License, you may add to a covered work material governed by the terms
401of that license document, provided that the further restriction does
402not survive such relicensing or conveying.
403
404 If you add terms to a covered work in accord with this section, you
405must place, in the relevant source files, a statement of the
406additional terms that apply to those files, or a notice indicating
407where to find the applicable terms.
408
409 Additional terms, permissive or non-permissive, may be stated in the
410form of a separately written license, or stated as exceptions;
411the above requirements apply either way.
412
413 8. Termination.
414
415 You may not propagate or modify a covered work except as expressly
416provided under this License. Any attempt otherwise to propagate or
417modify it is void, and will automatically terminate your rights under
418this License (including any patent licenses granted under the third
419paragraph of section 11).
420
421 However, if you cease all violation of this License, then your
422license from a particular copyright holder is reinstated (a)
423provisionally, unless and until the copyright holder explicitly and
424finally terminates your license, and (b) permanently, if the copyright
425holder fails to notify you of the violation by some reasonable means
426prior to 60 days after the cessation.
427
428 Moreover, your license from a particular copyright holder is
429reinstated permanently if the copyright holder notifies you of the
430violation by some reasonable means, this is the first time you have
431received notice of violation of this License (for any work) from that
432copyright holder, and you cure the violation prior to 30 days after
433your receipt of the notice.
434
435 Termination of your rights under this section does not terminate the
436licenses of parties who have received copies or rights from you under
437this License. If your rights have been terminated and not permanently
438reinstated, you do not qualify to receive new licenses for the same
439material under section 10.
440
441 9. Acceptance Not Required for Having Copies.
442
443 You are not required to accept this License in order to receive or
444run a copy of the Program. Ancillary propagation of a covered work
445occurring solely as a consequence of using peer-to-peer transmission
446to receive a copy likewise does not require acceptance. However,
447nothing other than this License grants you permission to propagate or
448modify any covered work. These actions infringe copyright if you do
449not accept this License. Therefore, by modifying or propagating a
450covered work, you indicate your acceptance of this License to do so.
451
452 10. Automatic Licensing of Downstream Recipients.
453
454 Each time you convey a covered work, the recipient automatically
455receives a license from the original licensors, to run, modify and
456propagate that work, subject to this License. You are not responsible
457for enforcing compliance by third parties with this License.
458
459 An "entity transaction" is a transaction transferring control of an
460organization, or substantially all assets of one, or subdividing an
461organization, or merging organizations. If propagation of a covered
462work results from an entity transaction, each party to that
463transaction who receives a copy of the work also receives whatever
464licenses to the work the party's predecessor in interest had or could
465give under the previous paragraph, plus a right to possession of the
466Corresponding Source of the work from the predecessor in interest, if
467the predecessor has it or can get it with reasonable efforts.
468
469 You may not impose any further restrictions on the exercise of the
470rights granted or affirmed under this License. For example, you may
471not impose a license fee, royalty, or other charge for exercise of
472rights granted under this License, and you may not initiate litigation
473(including a cross-claim or counterclaim in a lawsuit) alleging that
474any patent claim is infringed by making, using, selling, offering for
475sale, or importing the Program or any portion of it.
476
477 11. Patents.
478
479 A "contributor" is a copyright holder who authorizes use under this
480License of the Program or a work on which the Program is based. The
481work thus licensed is called the contributor's "contributor version".
482
483 A contributor's "essential patent claims" are all patent claims
484owned or controlled by the contributor, whether already acquired or
485hereafter acquired, that would be infringed by some manner, permitted
486by this License, of making, using, or selling its contributor version,
487but do not include claims that would be infringed only as a
488consequence of further modification of the contributor version. For
489purposes of this definition, "control" includes the right to grant
490patent sublicenses in a manner consistent with the requirements of
357this License.491this License.
358
359492
360 11. If, as a consequence of a court judgment or allegation of patent493
361infringement or for any other reason (not limited to patent issues),494 Each contributor grants you a non-exclusive, worldwide, royalty-free
362conditions are imposed on you (whether by court order, agreement or495patent license under the contributor's essential patent claims, to
496make, use, sell, offer for sale, import and otherwise run, modify and
497propagate the contents of its contributor version.
498
499 In the following three paragraphs, a "patent license" is any express
500agreement or commitment, however denominated, not to enforce a patent
501(such as an express permission to practice a patent or covenant not to
502sue for patent infringement). To "grant" such a patent license to a
503party means to make such an agreement or commitment not to enforce a
504patent against the party.
505
506 If you convey a covered work, knowingly relying on a patent license,
507and the Corresponding Source of the work is not available for anyone
508to copy, free of charge and under the terms of this License, through a
509publicly available network server or other readily accessible means,
510then you must either (1) cause the Corresponding Source to be so
511available, or (2) arrange to deprive yourself of the benefit of the
512patent license for this particular work, or (3) arrange, in a manner
513consistent with the requirements of this License, to extend the patent
514license to downstream recipients. "Knowingly relying" means you have
515actual knowledge that, but for the patent license, your conveying the
516covered work in a country, or your recipient's use of the covered work
517in a country, would infringe one or more identifiable patents in that
518country that you have reason to believe are valid.
519
520 If, pursuant to or in connection with a single transaction or
521arrangement, you convey, or propagate by procuring conveyance of, a
522covered work, and grant a patent license to some of the parties
523receiving the covered work authorizing them to use, propagate, modify
524or convey a specific copy of the covered work, then the patent license
525you grant is automatically extended to all recipients of the covered
526work and works based on it.
527
528 A patent license is "discriminatory" if it does not include within
529the scope of its coverage, prohibits the exercise of, or is
530conditioned on the non-exercise of one or more of the rights that are
531specifically granted under this License. You may not convey a covered
532work if you are a party to an arrangement with a third party that is
533in the business of distributing software, under which you make payment
534to the third party based on the extent of your activity of conveying
535the work, and under which the third party grants, to any of the
536parties who would receive the covered work from you, a discriminatory
537patent license (a) in connection with copies of the covered work
538conveyed by you (or copies made from those copies), or (b) primarily
539for and in connection with specific products or compilations that
540contain the covered work, unless you entered into that arrangement,
541or that patent license was granted, prior to 28 March 2007.
542
543 Nothing in this License shall be construed as excluding or limiting
544any implied license or other defenses to infringement that may
545otherwise be available to you under applicable patent law.
546
547 12. No Surrender of Others' Freedom.
548
549 If conditions are imposed on you (whether by court order, agreement or
363otherwise) that contradict the conditions of this License, they do not550otherwise) that contradict the conditions of this License, they do not
364excuse you from the conditions of this License. If you cannot
365distribute so as to satisfy simultaneously your obligations under this
366License and any other pertinent obligations, then as a consequence you
367may not distribute the Library at all. For example, if a patent
368license would not permit royalty-free redistribution of the Library by
369all those who receive copies directly or indirectly through you, then
370the only way you could satisfy both it and this License would be to
371refrain entirely from distribution of the Library.
372
373If any portion of this section is held invalid or unenforceable under any
374particular circumstance, the balance of the section is intended to apply,
375and the section as a whole is intended to apply in other circumstances.
376
377It is not the purpose of this section to induce you to infringe any
378patents or other property right claims or to contest validity of any
379such claims; this section has the sole purpose of protecting the
380integrity of the free software distribution system which is
381implemented by public license practices. Many people have made
382generous contributions to the wide range of software distributed
383through that system in reliance on consistent application of that
384system; it is up to the author/donor to decide if he or she is willing
385to distribute software through any other system and a licensee cannot
386impose that choice.
387
388This section is intended to make thoroughly clear what is believed to
389be a consequence of the rest of this License.
390
391 12. If the distribution and/or use of the Library is restricted in
392certain countries either by patents or by copyrighted interfaces, the
393original copyright holder who places the Library under this License may add
394an explicit geographical distribution limitation excluding those countries,
395so that distribution is permitted only in or among countries not thus
396excluded. In such case, this License incorporates the limitation as if
397written in the body of this License.
398
399 13. The Free Software Foundation may publish revised and/or new
400versions of the Library General Public License from time to time.
401Such new versions will be similar in spirit to the present version,
402but may differ in detail to address new problems or concerns.
403
404Each version is given a distinguishing version number. If the Library
405specifies a version number of this License which applies to it and
406"any later version", you have the option of following the terms and
407conditions either of that version or of any later version published by
408the Free Software Foundation. If the Library does not specify a
409license version number, you may choose any version ever published by
410the Free Software Foundation.
411
412551
413 14. If you wish to incorporate parts of the Library into other free
414programs whose distribution conditions are incompatible with these,
415write to the author to ask for permission. For software which is
416copyrighted by the Free Software Foundation, write to the Free
417Software Foundation; we sometimes make exceptions for this. Our
418decision will be guided by the two goals of preserving the free status
419of all derivatives of our free software and of promoting the sharing
420and reuse of software generally.
421
422 NO WARRANTY
423
424 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
425WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
426EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
427OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
428KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
429IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
430PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
431LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
432THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
433
434 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
435WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
436AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
437FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
438CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
439LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
440RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
441FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
442SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
443DAMAGES.
444
445 END OF TERMS AND CONDITIONS
446
447552
448 How to Apply These Terms to Your New Libraries553excuse you from the conditions of this License. If you cannot convey a
449554covered work so as to satisfy simultaneously your obligations under this
450 If you develop a new library, and you want it to be of the greatest555License and any other pertinent obligations, then as a consequence you may
451possible use to the public, we recommend making it free software that556not convey it at all. For example, if you agree to terms that obligate you
452everyone can redistribute and change. You can do so by permitting557to collect a royalty for further conveying from those to whom you convey
453redistribution under these terms (or, alternatively, under the terms of the558the Program, the only way you could satisfy both those terms and this
454ordinary General Public License).559License would be to refrain entirely from conveying the Program.
455560
456 To apply these terms, attach the following notices to the library. It is561 13. Use with the GNU Affero General Public License.
457safest to attach them to the start of each source file to most effectively562
458convey the exclusion of warranty; and each file should have at least the563 Notwithstanding any other provision of this License, you have
459"copyright" line and a pointer to where the full notice is found.564permission to link or combine any covered work with a work licensed
460565under version 3 of the GNU Affero General Public License into a single
461 <one line to give the library's name and a brief idea of what it does.>566combined work, and to convey the resulting work. The terms of this
567License will continue to apply to the part which is the covered work,
568but the special requirements of the GNU Affero General Public License,
569section 13, concerning interaction through a network will apply to the
570combination as such.
571
572 14. Revised Versions of this License.
573
574 The Free Software Foundation may publish revised and/or new versions of
575the GNU General Public License from time to time. Such new versions will
576be similar in spirit to the present version, but may differ in detail to
577address new problems or concerns.
578
579 Each version is given a distinguishing version number. If the
580Program specifies that a certain numbered version of the GNU General
581Public License "or any later version" applies to it, you have the
582option of following the terms and conditions either of that numbered
583version or of any later version published by the Free Software
584Foundation. If the Program does not specify a version number of the
585GNU General Public License, you may choose any version ever published
586by the Free Software Foundation.
587
588 If the Program specifies that a proxy can decide which future
589versions of the GNU General Public License can be used, that proxy's
590public statement of acceptance of a version permanently authorizes you
591to choose that version for the Program.
592
593 Later license versions may give you additional or different
594permissions. However, no additional obligations are imposed on any
595author or copyright holder as a result of your choosing to follow a
596later version.
597
598 15. Disclaimer of Warranty.
599
600 THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
601APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
602HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
603OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
604THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
605PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
606IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
607ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
608
609 16. Limitation of Liability.
610
611 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
612WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
613THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
614GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
615USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
616DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
617PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
618EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
619SUCH DAMAGES.
620
621 17. Interpretation of Sections 15 and 16.
622
623 If the disclaimer of warranty and limitation of liability provided
624above cannot be given local legal effect according to their terms,
625reviewing courts shall apply local law that most closely approximates
626an absolute waiver of all civil liability in connection with the
627Program, unless a warranty or assumption of liability accompanies a
628copy of the Program in return for a fee.
629
630 END OF TERMS AND CONDITIONS
631
632 How to Apply These Terms to Your New Programs
633
634 If you develop a new program, and you want it to be of the greatest
635possible use to the public, the best way to achieve this is to make it
636free software which everyone can redistribute and change under these terms.
637
638 To do so, attach the following notices to the program. It is safest
639to attach them to the start of each source file to most effectively
640state the exclusion of warranty; and each file should have at least
641the "copyright" line and a pointer to where the full notice is found.
642
643 <one line to give the program's name and a brief idea of what it does.>
462 Copyright (C) <year> <name of author>644 Copyright (C) <year> <name of author>
463645
464 This library is free software; you can redistribute it and/or646 This program is free software: you can redistribute it and/or modify
465 modify it under the terms of the GNU Library General Public647 it under the terms of the GNU General Public License as published by
466 License as published by the Free Software Foundation; either648 the Free Software Foundation, either version 3 of the License, or
467 version 2 of the License, or (at your option) any later version.649 (at your option) any later version.
468650
469 This library is distributed in the hope that it will be useful,651 This program is distributed in the hope that it will be useful,
470 but WITHOUT ANY WARRANTY; without even the implied warranty of652 but WITHOUT ANY WARRANTY; without even the implied warranty of
471 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU653 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
472 Library General Public License for more details.654 GNU General Public License for more details.
473655
474 You should have received a copy of the GNU Library General Public656 You should have received a copy of the GNU General Public License
475 License along with this library; if not, write to the Free Software657 along with this program. If not, see <http://www.gnu.org/licenses/>.
476 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
477658
478Also add information on how to contact you by electronic and paper mail.659Also add information on how to contact you by electronic and paper mail.
479660
480You should also get your employer (if you work as a programmer) or your661 If the program does terminal interaction, make it output a short
481school, if any, to sign a "copyright disclaimer" for the library, if662notice like this when it starts in an interactive mode:
482necessary. Here is a sample; alter the names:663
483664 <program> Copyright (C) <year> <name of author>
484 Yoyodyne, Inc., hereby disclaims all copyright interest in the665 This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
485 library `Frob' (a library for tweaking knobs) written by James Random Hacker.666 This is free software, and you are welcome to redistribute it
486667 under certain conditions; type `show c' for details.
487 <signature of Ty Coon>, 1 April 1990668
488 Ty Coon, President of Vice669The hypothetical commands `show w' and `show c' should show the appropriate
489670parts of the General Public License. Of course, your program's commands
490That's all there is to it!671might be different; for a GUI interface, you would use an "about box".
672
673 You should also get your employer (if you work as a programmer) or school,
674if any, to sign a "copyright disclaimer" for the program, if necessary.
675For more information on this, and how to apply and follow the GNU GPL, see
676<http://www.gnu.org/licenses/>.
677
678 The GNU General Public License does not permit incorporating your program
679into proprietary programs. If your program is a subroutine library, you
680may consider it more useful to permit linking proprietary applications with
681the library. If this is what you want to do, use the GNU Lesser General
682Public License instead of this License. But first, please read
683<http://www.gnu.org/philosophy/why-not-lgpl.html>.
491684
=== removed file 'COPYING.GPL'
--- COPYING.GPL 2010-02-16 23:12:12 +0000
+++ COPYING.GPL 1970-01-01 00:00:00 +0000
@@ -1,339 +0,0 @@
1 GNU GENERAL PUBLIC LICENSE
2 Version 2, June 1991
3
4 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 Everyone is permitted to copy and distribute verbatim copies
7 of this license document, but changing it is not allowed.
8
9 Preamble
10
11 The licenses for most software are designed to take away your
12freedom to share and change it. By contrast, the GNU General Public
13License is intended to guarantee your freedom to share and change free
14software--to make sure the software is free for all its users. This
15General Public License applies to most of the Free Software
16Foundation's software and to any other program whose authors commit to
17using it. (Some other Free Software Foundation software is covered by
18the GNU Lesser General Public License instead.) You can apply it to
19your programs, too.
20
21 When we speak of free software, we are referring to freedom, not
22price. Our General Public Licenses are designed to make sure that you
23have the freedom to distribute copies of free software (and charge for
24this service if you wish), that you receive source code or can get it
25if you want it, that you can change the software or use pieces of it
26in new free programs; and that you know you can do these things.
27
28 To protect your rights, we need to make restrictions that forbid
29anyone to deny you these rights or to ask you to surrender the rights.
30These restrictions translate to certain responsibilities for you if you
31distribute copies of the software, or if you modify it.
32
33 For example, if you distribute copies of such a program, whether
34gratis or for a fee, you must give the recipients all the rights that
35you have. You must make sure that they, too, receive or can get the
36source code. And you must show them these terms so they know their
37rights.
38
39 We protect your rights with two steps: (1) copyright the software, and
40(2) offer you this license which gives you legal permission to copy,
41distribute and/or modify the software.
42
43 Also, for each author's protection and ours, we want to make certain
44that everyone understands that there is no warranty for this free
45software. If the software is modified by someone else and passed on, we
46want its recipients to know that what they have is not the original, so
47that any problems introduced by others will not reflect on the original
48authors' reputations.
49
50 Finally, any free program is threatened constantly by software
51patents. We wish to avoid the danger that redistributors of a free
52program will individually obtain patent licenses, in effect making the
53program proprietary. To prevent this, we have made it clear that any
54patent must be licensed for everyone's free use or not licensed at all.
55
56 The precise terms and conditions for copying, distribution and
57modification follow.
58
59 GNU GENERAL PUBLIC LICENSE
60 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
62 0. This License applies to any program or other work which contains
63a notice placed by the copyright holder saying it may be distributed
64under the terms of this General Public License. The "Program", below,
65refers to any such program or work, and a "work based on the Program"
66means either the Program or any derivative work under copyright law:
67that is to say, a work containing the Program or a portion of it,
68either verbatim or with modifications and/or translated into another
69language. (Hereinafter, translation is included without limitation in
70the term "modification".) Each licensee is addressed as "you".
71
72Activities other than copying, distribution and modification are not
73covered by this License; they are outside its scope. The act of
74running the Program is not restricted, and the output from the Program
75is covered only if its contents constitute a work based on the
76Program (independent of having been made by running the Program).
77Whether that is true depends on what the Program does.
78
79 1. You may copy and distribute verbatim copies of the Program's
80source code as you receive it, in any medium, provided that you
81conspicuously and appropriately publish on each copy an appropriate
82copyright notice and disclaimer of warranty; keep intact all the
83notices that refer to this License and to the absence of any warranty;
84and give any other recipients of the Program a copy of this License
85along with the Program.
86
87You may charge a fee for the physical act of transferring a copy, and
88you may at your option offer warranty protection in exchange for a fee.
89
90 2. You may modify your copy or copies of the Program or any portion
91of it, thus forming a work based on the Program, and copy and
92distribute such modifications or work under the terms of Section 1
93above, provided that you also meet all of these conditions:
94
95 a) You must cause the modified files to carry prominent notices
96 stating that you changed the files and the date of any change.
97
98 b) You must cause any work that you distribute or publish, that in
99 whole or in part contains or is derived from the Program or any
100 part thereof, to be licensed as a whole at no charge to all third
101 parties under the terms of this License.
102
103 c) If the modified program normally reads commands interactively
104 when run, you must cause it, when started running for such
105 interactive use in the most ordinary way, to print or display an
106 announcement including an appropriate copyright notice and a
107 notice that there is no warranty (or else, saying that you provide
108 a warranty) and that users may redistribute the program under
109 these conditions, and telling the user how to view a copy of this
110 License. (Exception: if the Program itself is interactive but
111 does not normally print such an announcement, your work based on
112 the Program is not required to print an announcement.)
113
114These requirements apply to the modified work as a whole. If
115identifiable sections of that work are not derived from the Program,
116and can be reasonably considered independent and separate works in
117themselves, then this License, and its terms, do not apply to those
118sections when you distribute them as separate works. But when you
119distribute the same sections as part of a whole which is a work based
120on the Program, the distribution of the whole must be on the terms of
121this License, whose permissions for other licensees extend to the
122entire whole, and thus to each and every part regardless of who wrote it.
123
124Thus, it is not the intent of this section to claim rights or contest
125your rights to work written entirely by you; rather, the intent is to
126exercise the right to control the distribution of derivative or
127collective works based on the Program.
128
129In addition, mere aggregation of another work not based on the Program
130with the Program (or with a work based on the Program) on a volume of
131a storage or distribution medium does not bring the other work under
132the scope of this License.
133
134 3. You may copy and distribute the Program (or a work based on it,
135under Section 2) in object code or executable form under the terms of
136Sections 1 and 2 above provided that you also do one of the following:
137
138 a) Accompany it with the complete corresponding machine-readable
139 source code, which must be distributed under the terms of Sections
140 1 and 2 above on a medium customarily used for software interchange; or,
141
142 b) Accompany it with a written offer, valid for at least three
143 years, to give any third party, for a charge no more than your
144 cost of physically performing source distribution, a complete
145 machine-readable copy of the corresponding source code, to be
146 distributed under the terms of Sections 1 and 2 above on a medium
147 customarily used for software interchange; or,
148
149 c) Accompany it with the information you received as to the offer
150 to distribute corresponding source code. (This alternative is
151 allowed only for noncommercial distribution and only if you
152 received the program in object code or executable form with such
153 an offer, in accord with Subsection b above.)
154
155The source code for a work means the preferred form of the work for
156making modifications to it. For an executable work, complete source
157code means all the source code for all modules it contains, plus any
158associated interface definition files, plus the scripts used to
159control compilation and installation of the executable. However, as a
160special exception, the source code distributed need not include
161anything that is normally distributed (in either source or binary
162form) with the major components (compiler, kernel, and so on) of the
163operating system on which the executable runs, unless that component
164itself accompanies the executable.
165
166If distribution of executable or object code is made by offering
167access to copy from a designated place, then offering equivalent
168access to copy the source code from the same place counts as
169distribution of the source code, even though third parties are not
170compelled to copy the source along with the object code.
171
172 4. You may not copy, modify, sublicense, or distribute the Program
173except as expressly provided under this License. Any attempt
174otherwise to copy, modify, sublicense or distribute the Program is
175void, and will automatically terminate your rights under this License.
176However, parties who have received copies, or rights, from you under
177this License will not have their licenses terminated so long as such
178parties remain in full compliance.
179
180 5. You are not required to accept this License, since you have not
181signed it. However, nothing else grants you permission to modify or
182distribute the Program or its derivative works. These actions are
183prohibited by law if you do not accept this License. Therefore, by
184modifying or distributing the Program (or any work based on the
185Program), you indicate your acceptance of this License to do so, and
186all its terms and conditions for copying, distributing or modifying
187the Program or works based on it.
188
189 6. Each time you redistribute the Program (or any work based on the
190Program), the recipient automatically receives a license from the
191original licensor to copy, distribute or modify the Program subject to
192these terms and conditions. You may not impose any further
193restrictions on the recipients' exercise of the rights granted herein.
194You are not responsible for enforcing compliance by third parties to
195this License.
196
197 7. If, as a consequence of a court judgment or allegation of patent
198infringement or for any other reason (not limited to patent issues),
199conditions are imposed on you (whether by court order, agreement or
200otherwise) that contradict the conditions of this License, they do not
201excuse you from the conditions of this License. If you cannot
202distribute so as to satisfy simultaneously your obligations under this
203License and any other pertinent obligations, then as a consequence you
204may not distribute the Program at all. For example, if a patent
205license would not permit royalty-free redistribution of the Program by
206all those who receive copies directly or indirectly through you, then
207the only way you could satisfy both it and this License would be to
208refrain entirely from distribution of the Program.
209
210If any portion of this section is held invalid or unenforceable under
211any particular circumstance, the balance of the section is intended to
212apply and the section as a whole is intended to apply in other
213circumstances.
214
215It is not the purpose of this section to induce you to infringe any
216patents or other property right claims or to contest validity of any
217such claims; this section has the sole purpose of protecting the
218integrity of the free software distribution system, which is
219implemented by public license practices. Many people have made
220generous contributions to the wide range of software distributed
221through that system in reliance on consistent application of that
222system; it is up to the author/donor to decide if he or she is willing
223to distribute software through any other system and a licensee cannot
224impose that choice.
225
226This section is intended to make thoroughly clear what is believed to
227be a consequence of the rest of this License.
228
229 8. If the distribution and/or use of the Program is restricted in
230certain countries either by patents or by copyrighted interfaces, the
231original copyright holder who places the Program under this License
232may add an explicit geographical distribution limitation excluding
233those countries, so that distribution is permitted only in or among
234countries not thus excluded. In such case, this License incorporates
235the limitation as if written in the body of this License.
236
237 9. The Free Software Foundation may publish revised and/or new versions
238of the General Public License from time to time. Such new versions will
239be similar in spirit to the present version, but may differ in detail to
240address new problems or concerns.
241
242Each version is given a distinguishing version number. If the Program
243specifies a version number of this License which applies to it and "any
244later version", you have the option of following the terms and conditions
245either of that version or of any later version published by the Free
246Software Foundation. If the Program does not specify a version number of
247this License, you may choose any version ever published by the Free Software
248Foundation.
249
250 10. If you wish to incorporate parts of the Program into other free
251programs whose distribution conditions are different, write to the author
252to ask for permission. For software which is copyrighted by the Free
253Software Foundation, write to the Free Software Foundation; we sometimes
254make exceptions for this. Our decision will be guided by the two goals
255of preserving the free status of all derivatives of our free software and
256of promoting the sharing and reuse of software generally.
257
258 NO WARRANTY
259
260 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268REPAIR OR CORRECTION.
269
270 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278POSSIBILITY OF SUCH DAMAGES.
279
280 END OF TERMS AND CONDITIONS
281
282 How to Apply These Terms to Your New Programs
283
284 If you develop a new program, and you want it to be of the greatest
285possible use to the public, the best way to achieve this is to make it
286free software which everyone can redistribute and change under these terms.
287
288 To do so, attach the following notices to the program. It is safest
289to attach them to the start of each source file to most effectively
290convey the exclusion of warranty; and each file should have at least
291the "copyright" line and a pointer to where the full notice is found.
292
293 <one line to give the program's name and a brief idea of what it does.>
294 Copyright (C) <year> <name of author>
295
296 This program is free software; you can redistribute it and/or modify
297 it under the terms of the GNU General Public License as published by
298 the Free Software Foundation; either version 2 of the License, or
299 (at your option) any later version.
300
301 This program is distributed in the hope that it will be useful,
302 but WITHOUT ANY WARRANTY; without even the implied warranty of
303 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 GNU General Public License for more details.
305
306 You should have received a copy of the GNU General Public License along
307 with this program; if not, write to the Free Software Foundation, Inc.,
308 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
310Also add information on how to contact you by electronic and paper mail.
311
312If the program is interactive, make it output a short notice like this
313when it starts in an interactive mode:
314
315 Gnomovision version 69, Copyright (C) year name of author
316 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 This is free software, and you are welcome to redistribute it
318 under certain conditions; type `show c' for details.
319
320The hypothetical commands `show w' and `show c' should show the appropriate
321parts of the General Public License. Of course, the commands you use may
322be called something other than `show w' and `show c'; they could even be
323mouse-clicks or menu items--whatever suits your program.
324
325You should also get your employer (if you work as a programmer) or your
326school, if any, to sign a "copyright disclaimer" for the program, if
327necessary. Here is a sample; alter the names:
328
329 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
332 <signature of Ty Coon>, 1 April 1989
333 Ty Coon, President of Vice
334
335This General Public License does not permit incorporating your program into
336proprietary programs. If your program is a subroutine library, you may
337consider it more useful to permit linking proprietary applications with the
338library. If this is what you want to do, use the GNU Lesser General
339Public License instead of this License.
3400
=== added file 'COPYING.LIB'
--- COPYING.LIB 1970-01-01 00:00:00 +0000
+++ COPYING.LIB 2012-04-05 18:42:22 +0000
@@ -0,0 +1,165 @@
1 GNU LESSER GENERAL PUBLIC LICENSE
2 Version 3, 29 June 2007
3
4 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
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
10the terms and conditions of version 3 of the GNU General Public
11License, 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
16General Public License, and the "GNU GPL" refers to version 3 of the GNU
17General Public License.
18
19 "The Library" refers to a covered work governed by this License,
20other than an Application or a Combined Work as defined below.
21
22 An "Application" is any work that makes use of an interface provided
23by the Library, but which is not otherwise based on the Library.
24Defining a subclass of a class defined by the Library is deemed a mode
25of using an interface provided by the Library.
26
27 A "Combined Work" is a work produced by combining or linking an
28Application with the Library. The particular version of the Library
29with which the Combined Work was made is also called the "Linked
30Version".
31
32 The "Minimal Corresponding Source" for a Combined Work means the
33Corresponding Source for the Combined Work, excluding any source code
34for portions of the Combined Work that, considered in isolation, are
35based on the Application, and not on the Linked Version.
36
37 The "Corresponding Application Code" for a Combined Work means the
38object code and/or source code for the Application, including any data
39and utility programs needed for reproducing the Combined Work from the
40Application, 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
45without 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
50facility refers to a function or data to be supplied by an Application
51that uses the facility (other than as an argument passed when the
52facility is invoked), then you may convey a copy of the modified
53version:
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
66a header file that is part of the Library. You may convey such object
67code under terms of your choice, provided that, if the incorporated
68material is not limited to numerical parameters, data structure
69layouts 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,
82taken together, effectively do not restrict modification of the
83portions of the Library contained in the Combined Work and reverse
84engineering for debugging such modifications, if you also do each of
85the 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
131Library side by side in a single library together with other library
132facilities that are not Applications and are not covered by this
133License, and convey such a combined library under terms of your
134choice, 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
147of the GNU Lesser General Public License from time to time. Such new
148versions will be similar in spirit to the present version, but may
149differ in detail to address new problems or concerns.
150
151 Each version is given a distinguishing version number. If the
152Library as you received it specifies that a certain numbered version
153of the GNU Lesser General Public License "or any later version"
154applies to it, you have the option of following the terms and
155conditions either of that published version or of any later version
156published by the Free Software Foundation. If the Library as you
157received it does not specify a version number of the GNU Lesser
158General Public License, you may choose any version of the GNU Lesser
159General Public License ever published by the Free Software Foundation.
160
161 If the Library as you received it specifies that a proxy can decide
162whether future versions of the GNU Lesser General Public License shall
163apply, that proxy's public statement of acceptance of any version is
164permanent authorization for you to choose that version for the
165Library.
0166
=== modified file 'Makefile.am'
--- Makefile.am 2012-01-27 20:26:43 +0000
+++ Makefile.am 2012-04-05 18:42:22 +0000
@@ -1,7 +1,5 @@
1SUBDIRS = data libubuntuone libubuntuoneui tests po1SUBDIRS = data libubuntuone libubuntuoneui tests po
22
3EXTRA_DIST = COPYING.GPL
4
5pcfiles = libubuntuoneui-3.0.pc3pcfiles = libubuntuoneui-3.0.pc
64
7libubuntuoneui-3.0.pc: libubuntuoneui.pc5libubuntuoneui-3.0.pc: libubuntuoneui.pc
86
=== modified file 'configure.ac'
--- configure.ac 2012-01-27 20:26:43 +0000
+++ configure.ac 2012-04-05 18:42:22 +0000
@@ -32,7 +32,7 @@
32AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)32AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
3333
34dnl Look for needed modules34dnl Look for needed modules
35PKG_CHECK_MODULES(LIBUBUNTUONEUI, glib-2.0 >= 2.24 gdk-pixbuf-2.0 webkitgtk-3.0 >= 1.1.15 libxml-2.0 libsoup-2.4 >= 2.33.1 libsoup-gnome-2.4 libsyncdaemon-1.0 >= 1.4.2 gstreamer-0.10 gstreamer-pbutils-0.10)35PKG_CHECK_MODULES(LIBUBUNTUONEUI, glib-2.0 >= 2.24 gdk-pixbuf-2.0 webkitgtk-3.0 >= 1.1.15 libxml-2.0 libsoup-2.4 >= 2.33.1 libsoup-gnome-2.4 libsyncdaemon-1.0 >= 1.4.2 gstreamer-0.10 gstreamer-pbutils-0.10 oauth >= 0.8.0)
36AC_SUBST(LIBUBUNTUONEUI_CFLAGS)36AC_SUBST(LIBUBUNTUONEUI_CFLAGS)
37AC_SUBST(LIBUBUNTUONEUI_LIBS)37AC_SUBST(LIBUBUNTUONEUI_LIBS)
3838
3939
=== modified file 'libubuntuoneui/Makefile.am'
--- libubuntuoneui/Makefile.am 2012-01-27 22:34:26 +0000
+++ libubuntuoneui/Makefile.am 2012-04-05 18:42:22 +0000
@@ -17,15 +17,12 @@
1717
18libubuntuoneui_3_0_la_SOURCES = \18libubuntuoneui_3_0_la_SOURCES = \
19 $(MARSHAL_GENERATED) \19 $(MARSHAL_GENERATED) \
20 oauth.c \
21 oauth.h \
22 u1-codec-installer.c \20 u1-codec-installer.c \
23 u1-codec-installer.h \21 u1-codec-installer.h \
24 u1-music-store.c \22 u1-music-store.c \
25 u1-request-chrome.c \23 u1-request-chrome.c \
26 u1-request-chrome.h \24 u1-request-chrome.h
27 xmalloc.c \25
28 xmalloc.h
29libubuntuoneui_3_0_la_LDFLAGS = -version-info $(LIBUBUNTUONEUI_CURRENT):$(LIBUBUNTUONEUI_REVISION):$(LIBUBUNTUONEUI_AGE)26libubuntuoneui_3_0_la_LDFLAGS = -version-info $(LIBUBUNTUONEUI_CURRENT):$(LIBUBUNTUONEUI_REVISION):$(LIBUBUNTUONEUI_AGE)
30libubuntuoneui_3_0_la_LIBADD = \27libubuntuoneui_3_0_la_LIBADD = \
31 $(LIBUBUNTUONEUI_LIBS) \28 $(LIBUBUNTUONEUI_LIBS) \
3229
=== removed file 'libubuntuoneui/oauth.c'
--- libubuntuoneui/oauth.c 2010-11-24 18:05:49 +0000
+++ libubuntuoneui/oauth.c 1970-01-01 00:00:00 +0000
@@ -1,961 +0,0 @@
1/*
2 * oAuth string functions in POSIX-C.
3 *
4 * Copyright 2007, 2008, 2009 Robin Gareus <robin@gareus.org>
5 *
6 * The base64 functions are by Jan-Henrik Haukeland, <hauk@tildeslash.com>
7 * and un/escape_url() was inspired by libcurl's curl_escape under ISC-license
8 * many thanks to Daniel Stenberg <daniel@haxx.se>.
9 *
10 * Permission is hereby granted, free of charge, to any person obtaining a copy
11 * of this software and associated documentation files (the "Software"), to deal
12 * in the Software without restriction, including without limitation the rights
13 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14 * copies of the Software, and to permit persons to whom the Software is
15 * furnished to do so, subject to the following conditions:
16 *
17 * The above copyright notice and this permission notice shall be included in
18 * all copies or substantial portions of the Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26 * THE SOFTWARE.
27 *
28 */
29#if HAVE_CONFIG_H
30# include <config.h>
31#endif
32
33#define WIPE_MEMORY ///< overwrite sensitve data before free()ing it.
34
35#include <stdio.h>
36#include <stdarg.h>
37#include <stdlib.h>
38#include <string.h>
39#include <time.h>
40#include <math.h>
41#include <ctype.h> // isxdigit
42#include <openssl/hmac.h>
43
44#include "xmalloc.h"
45#include "oauth.h"
46
47#ifndef WIN // getpid() on POSIX systems
48#include <sys/types.h>
49#include <unistd.h>
50#endif
51
52/**
53 * Base64 encode one byte
54 */
55char oauth_b64_encode(unsigned char u) {
56 if(u < 26) return 'A'+u;
57 if(u < 52) return 'a'+(u-26);
58 if(u < 62) return '0'+(u-52);
59 if(u == 62) return '+';
60 return '/';
61}
62
63/**
64 * Decode a single base64 character.
65 */
66unsigned char oauth_b64_decode(char c) {
67 if(c >= 'A' && c <= 'Z') return(c - 'A');
68 if(c >= 'a' && c <= 'z') return(c - 'a' + 26);
69 if(c >= '0' && c <= '9') return(c - '0' + 52);
70 if(c == '+') return 62;
71 return 63;
72}
73
74/**
75 * Return TRUE if 'c' is a valid base64 character, otherwise FALSE
76 */
77int oauth_b64_is_base64(char c) {
78 if((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') ||
79 (c >= '0' && c <= '9') || (c == '+') ||
80 (c == '/') || (c == '=')) {
81 return 1;
82 }
83 return 0;
84}
85
86/**
87 * Base64 encode and return size data in 'src'. The caller must free the
88 * returned string.
89 *
90 * @param size The size of the data in src
91 * @param src The data to be base64 encode
92 * @return encoded string otherwise NULL
93 */
94char *oauth_encode_base64(int size, const unsigned char *src) {
95 int i;
96 char *out, *p;
97
98 if(!src) return NULL;
99 if(!size) size= strlen((char *)src);
100 out= (char*) xcalloc(sizeof(char), size*4/3+4);
101 p= out;
102
103 for(i=0; i<size; i+=3) {
104 unsigned char b1=0, b2=0, b3=0, b4=0, b5=0, b6=0, b7=0;
105 b1= src[i];
106 if(i+1<size) b2= src[i+1];
107 if(i+2<size) b3= src[i+2];
108
109 b4= b1>>2;
110 b5= ((b1&0x3)<<4)|(b2>>4);
111 b6= ((b2&0xf)<<2)|(b3>>6);
112 b7= b3&0x3f;
113
114 *p++= oauth_b64_encode(b4);
115 *p++= oauth_b64_encode(b5);
116
117 if(i+1<size) *p++= oauth_b64_encode(b6);
118 else *p++= '=';
119
120 if(i+2<size) *p++= oauth_b64_encode(b7);
121 else *p++= '=';
122 }
123 return out;
124}
125
126/**
127 * Decode the base64 encoded string 'src' into the memory pointed to by
128 * 'dest'.
129 *
130 * @param dest Pointer to memory for holding the decoded string.
131 * Must be large enough to recieve the decoded string.
132 * @param src A base64 encoded string.
133 * @return the length of the decoded string if decode
134 * succeeded otherwise 0.
135 */
136int oauth_decode_base64(unsigned char *dest, const char *src) {
137 if(src && *src) {
138 unsigned char *p= dest;
139 int k, l= strlen(src)+1;
140 unsigned char *buf= (unsigned char*) xcalloc(sizeof(unsigned char), l);
141
142 /* Ignore non base64 chars as per the POSIX standard */
143 for(k=0, l=0; src[k]; k++) {
144 if(oauth_b64_is_base64(src[k])) {
145 buf[l++]= src[k];
146 }
147 }
148
149 for(k=0; k<l; k+=4) {
150 char c1='A', c2='A', c3='A', c4='A';
151 unsigned char b1=0, b2=0, b3=0, b4=0;
152 c1= buf[k];
153
154 if(k+1<l) c2= buf[k+1];
155 if(k+2<l) c3= buf[k+2];
156 if(k+3<l) c4= buf[k+3];
157
158 b1= oauth_b64_decode(c1);
159 b2= oauth_b64_decode(c2);
160 b3= oauth_b64_decode(c3);
161 b4= oauth_b64_decode(c4);
162
163 *p++=((b1<<2)|(b2>>4) );
164
165 if(c3 != '=') *p++=(((b2&0xf)<<4)|(b3>>2) );
166 if(c4 != '=') *p++=(((b3&0x3)<<6)|b4 );
167 }
168 free(buf);
169 dest[p-dest]='\0';
170 return(p-dest);
171 }
172 return 0;
173}
174
175/**
176 * Escape 'string' according to RFC3986 and
177 * http://oauth.net/core/1.0/#encoding_parameters.
178 *
179 * @param string The data to be encoded
180 * @return encoded string otherwise NULL
181 * The caller must free the returned string.
182 */
183char *oauth_url_escape(const char *string) {
184 size_t alloc, newlen;
185 char *ns = NULL, *testing_ptr = NULL;
186 unsigned char in;
187 size_t strindex=0;
188 size_t length;
189
190 if (!string) return xstrdup("");
191
192 alloc = strlen(string)+1;
193 newlen = alloc;
194
195 ns = (char*) xmalloc(alloc);
196
197 length = alloc-1;
198 while(length--) {
199 in = *string;
200
201 switch(in){
202 case '0': case '1': case '2': case '3': case '4':
203 case '5': case '6': case '7': case '8': case '9':
204 case 'a': case 'b': case 'c': case 'd': case 'e':
205 case 'f': case 'g': case 'h': case 'i': case 'j':
206 case 'k': case 'l': case 'm': case 'n': case 'o':
207 case 'p': case 'q': case 'r': case 's': case 't':
208 case 'u': case 'v': case 'w': case 'x': case 'y': case 'z':
209 case 'A': case 'B': case 'C': case 'D': case 'E':
210 case 'F': case 'G': case 'H': case 'I': case 'J':
211 case 'K': case 'L': case 'M': case 'N': case 'O':
212 case 'P': case 'Q': case 'R': case 'S': case 'T':
213 case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z':
214 case '_': case '~': case '.': case '-':
215 ns[strindex++]=in;
216 break;
217 default:
218 newlen += 2; /* this'll become a %XX */
219 if(newlen > alloc) {
220 alloc *= 2;
221 testing_ptr = (char*) xrealloc(ns, alloc);
222 ns = testing_ptr;
223 }
224 snprintf(&ns[strindex], 4, "%%%02X", in);
225 strindex+=3;
226 break;
227 }
228 string++;
229 }
230 ns[strindex]=0;
231 return ns;
232}
233
234#ifndef ISXDIGIT
235# define ISXDIGIT(x) (isxdigit((int) ((unsigned char)x)))
236#endif
237
238/**
239 * Parse RFC3986 encoded 'string' back to unescaped version.
240 *
241 * @param string The data to be unescaped
242 * @param olen unless NULL the length of the returned string is stored there.
243 * @return decoded string or NULL
244 * The caller must free the returned string.
245 */
246char *oauth_url_unescape(const char *string, size_t *olen) {
247 size_t alloc, strindex=0;
248 char *ns = NULL;
249 unsigned char in;
250 long hex;
251
252 if (!string) return NULL;
253 alloc = strlen(string)+1;
254 ns = (char*) xmalloc(alloc);
255
256 while(--alloc > 0) {
257 in = *string;
258 if(('%' == in) && ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
259 char hexstr[3]; // '%XX'
260 hexstr[0] = string[1];
261 hexstr[1] = string[2];
262 hexstr[2] = 0;
263 hex = strtol(hexstr, NULL, 16);
264 in = (unsigned char)hex; /* hex is always < 256 */
265 string+=2;
266 alloc-=2;
267 }
268 ns[strindex++] = in;
269 string++;
270 }
271 ns[strindex]=0;
272 if(olen) *olen = strindex;
273 return ns;
274}
275
276/**
277 * returns base64 encoded HMAC-SHA1 signature for
278 * given message and key.
279 * both data and key need to be urlencoded.
280 *
281 * the returned string needs to be freed by the caller
282 *
283 * @param m message to be signed
284 * @param k key used for signing
285 * @return signature string.
286 */
287char *oauth_sign_hmac_sha1 (const char *m, const char *k) {
288 return(oauth_sign_hmac_sha1_raw (m, strlen(m), k, strlen(k)));
289}
290
291char *oauth_sign_hmac_sha1_raw (const char *m, const size_t ml, const char *k, const size_t kl) {
292 unsigned char result[EVP_MAX_MD_SIZE];
293 unsigned int resultlen = 0;
294
295 HMAC(EVP_sha1(), k, kl,
296 (unsigned char*) m, ml,
297 result, &resultlen);
298
299 return(oauth_encode_base64(resultlen, result));
300}
301
302/**
303 * returns plaintext signature for the given key.
304 *
305 * the returned string needs to be freed by the caller
306 *
307 * @param m message to be signed
308 * @param k key used for signing
309 * @return signature string
310 */
311char *oauth_sign_plaintext (const char *m, const char *k) {
312 return(oauth_url_escape(k));
313}
314
315#include <openssl/evp.h>
316#include <openssl/x509.h>
317#include <openssl/x509v3.h>
318#include <openssl/ssl.h>
319
320/**
321 * returns RSA-SHA1 signature for given data.
322 * the returned signature needs to be freed by the caller.
323 *
324 * @param m message to be signed
325 * @param k private-key PKCS and Base64-encoded
326 * @return base64 encoded signature string.
327 */
328char *oauth_sign_rsa_sha1 (const char *m, const char *k) {
329 unsigned char *sig = NULL;
330 unsigned char *passphrase = NULL;
331 unsigned int len=0;
332 EVP_MD_CTX md_ctx;
333
334 EVP_PKEY *pkey;
335 BIO *in;
336 in = BIO_new_mem_buf((unsigned char*) k, strlen(k));
337 pkey = PEM_read_bio_PrivateKey(in, NULL, 0, passphrase); // generate sign
338 BIO_free(in);
339
340 if (pkey == NULL) {
341 //fprintf(stderr, "liboauth/ssl: can not read private key\n");
342 return xstrdup("liboauth/ssl: can not read private key");
343 }
344
345 len = EVP_PKEY_size(pkey);
346 sig = xmalloc((len+1)*sizeof(char));
347
348 EVP_SignInit(&md_ctx, EVP_sha1());
349 EVP_SignUpdate(&md_ctx, m, strlen(m));
350 if (EVP_SignFinal (&md_ctx, sig, &len, pkey)) {
351 char *tmp;
352 sig[len] = '\0';
353 tmp = oauth_encode_base64(len,sig);
354 OPENSSL_free(sig);
355 EVP_PKEY_free(pkey);
356 return tmp;
357 }
358 return xstrdup("liboauth/ssl: rsa-sha1 signing failed");
359}
360
361/**
362 * verify RSA-SHA1 signature.
363 *
364 * returns the output of EVP_VerifyFinal() for a given message,
365 * cert/pubkey and signature
366 *
367 * @param m message to be verified
368 * @param c public-key or x509 certificate
369 * @param s base64 encoded signature
370 * @return 1 for a correct signature, 0 for failure and -1 if some other error occurred
371 */
372int oauth_verify_rsa_sha1 (const char *m, const char *c, const char *s) {
373 EVP_MD_CTX md_ctx;
374 EVP_PKEY *pkey;
375 BIO *in;
376 X509 *cert = NULL;
377 unsigned char *b64d;
378 int slen, err;
379
380 in = BIO_new_mem_buf((unsigned char*)c, strlen(c));
381 cert = PEM_read_bio_X509(in, NULL, 0, NULL);
382 if (cert) {
383 pkey = (EVP_PKEY *) X509_get_pubkey(cert);
384 X509_free(cert);
385 } else {
386 pkey = PEM_read_bio_PUBKEY(in, NULL, 0, NULL);
387 }
388 BIO_free(in);
389 if (pkey == NULL) {
390 //fprintf(stderr, "could not read cert/pubkey.\n");
391 return -2;
392 }
393
394 b64d= (unsigned char*) xmalloc(sizeof(char)*strlen(s));
395 slen = oauth_decode_base64(b64d, s);
396
397 EVP_VerifyInit(&md_ctx, EVP_sha1());
398 EVP_VerifyUpdate(&md_ctx, m, strlen(m));
399 err = EVP_VerifyFinal(&md_ctx, b64d, slen, pkey);
400 EVP_MD_CTX_cleanup(&md_ctx);
401 EVP_PKEY_free(pkey);
402 free(b64d);
403 return (err);
404}
405
406/**
407 * encode strings and concatenate with '&' separator.
408 * The number of strings to be concatenated must be
409 * given as first argument.
410 * all arguments thereafter must be of type (char *)
411 *
412 * @param len the number of arguments to follow this parameter
413 * @param ... string to escape and added (may be NULL)
414 *
415 * @return pointer to memory holding the concatenated
416 * strings - needs to be free(d) by the caller. or NULL
417 * in case we ran out of memory.
418 */
419char *oauth_catenc(int len, ...) {
420 va_list va;
421 int i;
422 char *rv = (char*) xmalloc(sizeof(char));
423 *rv='\0';
424 va_start(va, len);
425 for(i=0;i<len;i++) {
426 char *arg = va_arg(va, char *);
427 char *enc;
428 int len;
429 enc = oauth_url_escape(arg);
430 if(!enc) break;
431 len = strlen(enc) + 1 + ((i>0)?1:0);
432 if(rv) len+=strlen(rv);
433 rv=(char*) xrealloc(rv,len*sizeof(char));
434
435 if(i>0) strcat(rv, "&");
436 strcat(rv, enc);
437 free(enc);
438 }
439 va_end(va);
440 return(rv);
441}
442
443/**
444 * splits the given url into a parameter array.
445 * (see \ref oauth_serialize_url and \ref oauth_serialize_url_parameters for the reverse)
446 *
447 * NOTE: Request-parameters-values may include an ampersand character.
448 * However if unescaped this function will use them as parameter delimiter.
449 * If you need to make such a request, this function since version 0.3.5 allows
450 * to use the ASCII SOH (0x01) character as alias for '&' (0x26).
451 * (the motivation is convenience: SOH is /untypeable/ and much more
452 * unlikely to appear than '&' - If you plan to sign fancy URLs you
453 * should not split a query-string, but rather provide the parameter array
454 * directly to \ref oauth_serialize_url)
455 *
456 * @param url the url or query-string to parse.
457 * @param argv pointer to a (char *) array where the results are stored.
458 * The array is re-allocated to match the number of parameters and each
459 * parameter-string is allocated with strdup. - The memory needs to be freed
460 * by the caller.
461 * @param qesc use query parameter escape (vs post-param-escape) - if set
462 * to 1 all '+' are treated as spaces ' '
463 *
464 * @return number of parameter(s) in array.
465 */
466int oauth_split_post_paramters(const char *url, char ***argv, short qesc) {
467 int argc=0;
468 char *token, *tmp, *t1;
469 if (!argv) return 0;
470 if (!url) return 0;
471 t1=xstrdup(url);
472
473 // '+' represents a space, in a URL query string
474 while ((qesc&1) && (tmp=strchr(t1,'+'))) *tmp=' ';
475
476 tmp=t1;
477 while((token=strtok(tmp,"&?"))) {
478 if(!strncasecmp("oauth_signature=",token,16)) continue;
479 (*argv)=(char**) xrealloc(*argv,sizeof(char*)*(argc+1));
480 while (!(qesc&2) && (tmp=strchr(token,'\001'))) *tmp='&';
481 (*argv)[argc]=oauth_url_unescape(token, NULL);
482 if (argc==0 && strstr(token, ":/")) {
483 // HTTP does not allow empty absolute paths, so the URL
484 // 'http://example.com' is equivalent to 'http://example.com/' and should
485 // be treated as such for the purposes of OAuth signing (rfc2616, section 3.2.1)
486 // see http://groups.google.com/group/oauth/browse_thread/thread/c44b6f061bfd98c?hl=en
487 char *slash=strstr(token, ":/");
488 while (slash && *(++slash) == '/') ; // skip slashes eg /xxx:[\/]*/
489#if 0
490 // skip possibly unescaped slashes in the userinfo - they're not allowed by RFC2396 but have been seen.
491 // the hostname/IP may only contain alphanumeric characters - so we're safe there.
492 if (slash && strchr(slash,'@')) slash=strchr(slash,'@');
493#endif
494 if (slash && !strchr(slash,'/')) {
495#ifdef DEBUG_OAUTH
496 fprintf(stderr, "\nliboauth: added trailing slash to URL: '%s'\n\n", token);
497#endif
498 free((*argv)[argc]);
499 (*argv)[argc]= (char*) xmalloc(sizeof(char)*(2+strlen(token)));
500 strcpy((*argv)[argc],token);
501 strcat((*argv)[argc],"/");
502 }
503 }
504 if (argc==0 && (tmp=strstr((*argv)[argc],":80/"))) {
505 memmove(tmp, tmp+3, strlen(tmp+2));
506 }
507 tmp=NULL;
508 argc++;
509 }
510
511 free(t1);
512 return argc;
513}
514
515int oauth_split_url_parameters(const char *url, char ***argv) {
516 return oauth_split_post_paramters(url, argv, 1);
517}
518
519/**
520 * build a url query string from an array.
521 *
522 * @param argc the total number of elements in the array
523 * @param start element in the array at which to start concatenating.
524 * @param argv parameter-array to concatenate.
525 * @return url string needs to be freed by the caller.
526 *
527 */
528char *oauth_serialize_url (int argc, int start, char **argv) {
529 return oauth_serialize_url_sep( argc, start, argv, "&");
530}
531
532/**
533 * encode query parameters from an array.
534 *
535 * @param argc the total number of elements in the array
536 * @param start element in the array at which to start concatenating.
537 * @param argv parameter-array to concatenate.
538 * @param sep separator for parameters (usually "&")
539 * @return url string needs to be freed by the caller.
540 */
541char *oauth_serialize_url_sep (int argc, int start, char **argv, char *sep) {
542 char *tmp, *t1;
543 int i;
544 int first=0;
545 int seplen=strlen(sep);
546 char *query = (char*) xmalloc(sizeof(char));
547 *query='\0';
548 for(i=start; i< argc; i++) {
549 int len = 0;
550 if (query) len+=strlen(query);
551
552 if (i==start && i==0 && strstr(argv[i], ":/")) {
553 tmp=xstrdup(argv[i]);
554 len+=strlen(tmp);
555 } else if(!(t1=strchr(argv[i], '='))) {
556 // see http://oauth.net/core/1.0/#anchor14
557 // escape parameter names and arguments but not the '='
558 tmp=xstrdup(argv[i]);
559 tmp=(char*) xrealloc(tmp,(strlen(tmp)+2)*sizeof(char));
560 strcat(tmp,"=");
561 len+=strlen(tmp);
562 } else {
563 *t1=0;
564 tmp = oauth_url_escape(argv[i]);
565 *t1='=';
566 t1 = oauth_url_escape((t1+1));
567 tmp=(char*) xrealloc(tmp,(strlen(tmp)+strlen(t1)+2)*sizeof(char));
568 strcat(tmp,"=");
569 strcat(tmp,t1);
570 free(t1);
571 len+=strlen(tmp);
572 }
573 len+=seplen+1;
574 query=(char*) xrealloc(query,len*sizeof(char));
575 strcat(query, ((i==start||first)?"":sep));
576 first=0;
577 strcat(query, tmp);
578 if (i==start && i==0 && strstr(tmp, ":/")) {
579 strcat(query, "?");
580 first=1;
581 }
582 free(tmp);
583 }
584 return (query);
585}
586
587/**
588 * build a query parameter string from an array.
589 *
590 * This function is a shortcut for \ref oauth_serialize_url (argc, 1, argv).
591 * It strips the leading host/path, which is usually the first
592 * element when using oauth_split_url_parameters on an URL.
593 *
594 * @param argc the total number of elements in the array
595 * @param argv parameter-array to concatenate.
596 * @return url string needs to be freed by the caller.
597 */
598char *oauth_serialize_url_parameters (int argc, char **argv) {
599 return oauth_serialize_url(argc, 1, argv);
600}
601
602/**
603 * generate a random string between 15 and 32 chars length
604 * and return a pointer to it. The value needs to be freed by the
605 * caller
606 *
607 * @return zero terminated random string.
608 */
609char *oauth_gen_nonce() {
610 char *nc;
611 static int rndinit = 1;
612 const char *chars = "abcdefghijklmnopqrstuvwxyz"
613 "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "0123456789_";
614 unsigned int max = strlen( chars );
615 int i, len;
616
617 if(rndinit) {srand(time(NULL)
618#ifndef WIN // quick windows check.
619 * getpid()
620#endif
621 ); rndinit=0;} // seed random number generator - FIXME: we can do better ;)
622
623 len=15+floor(rand()*16.0/(double)RAND_MAX);
624 nc = (char*) xmalloc((len+1)*sizeof(char));
625 for(i=0;i<len; i++) {
626 nc[i] = chars[ rand() % max ];
627 }
628 nc[i]='\0';
629 return (nc);
630}
631
632/**
633 * string compare function for oauth parameters.
634 *
635 * used with qsort. needed to normalize request parameters.
636 * see http://oauth.net/core/1.0/#anchor14
637 */
638int oauth_cmpstringp(const void *p1, const void *p2) {
639 char *v1,*v2;
640 char *t1,*t2;
641 int rv;
642 // TODO: this is not fast - we should escape the
643 // array elements (once) before sorting.
644 v1=oauth_url_escape(* (char * const *)p1);
645 v2=oauth_url_escape(* (char * const *)p2);
646
647 // '=' signs are not "%3D" !
648 if ((t1=strstr(v1,"%3D"))) {
649 t1[0]='\0'; t1[1]='='; t1[2]='=';
650 }
651 if ((t2=strstr(v2,"%3D"))) {
652 t2[0]='\0'; t2[1]='='; t2[2]='=';
653 }
654
655 // compare parameter names
656 rv=strcmp(v1,v2);
657 if (rv!=0) {
658 if (v1) free(v1);
659 if (v2) free(v2);
660 return rv;
661 }
662
663 // if parameter names are equal, sort by value.
664 if (t1) t1[0]='=';
665 if (t2) t2[0]='=';
666 rv=strcmp(t1,t2);
667 if (v1) free(v1);
668 if (v2) free(v2);
669 return rv;
670}
671
672/**
673 * search array for parameter key.
674 * @param argv length of array to search
675 * @param argc parameter array to search
676 * @param key key of parameter to check.
677 *
678 * @return FALSE (0) if array does not contain a paramater with given key, TRUE (1) otherwise.
679 */
680int oauth_param_exists(char **argv, int argc, char *key) {
681 int i;
682 size_t l= strlen(key);
683 for (i=0;i<argc;i++)
684 if (strlen(argv[i])>l && !strncmp(argv[i],key,l) && argv[i][l] == '=') return 1;
685 return 0;
686}
687
688/**
689 * add query parameter to array
690 *
691 * @param argcp pointer to array length int
692 * @param argvp pointer to array values
693 * @param addparam parameter to add (eg. "foo=bar")
694 */
695void oauth_add_param_to_array(int *argcp, char ***argvp, const char *addparam) {
696 (*argvp)=(char**) xrealloc(*argvp,sizeof(char*)*((*argcp)+1));
697 (*argvp)[(*argcp)++]= (char*) xstrdup(addparam);
698}
699
700/**
701 *
702 */
703void oauth_add_protocol(int *argcp, char ***argvp,
704 OAuthMethod method,
705 const char *c_key, //< consumer key - posted plain text
706 const char *t_key //< token key - posted plain text in URL
707 ){
708 char oarg[1024];
709
710 // add oAuth specific arguments
711 if (!oauth_param_exists(*argvp,*argcp,"oauth_nonce")) {
712 char *tmp;
713 snprintf(oarg, 1024, "oauth_nonce=%s", (tmp=oauth_gen_nonce()));
714 oauth_add_param_to_array(argcp, argvp, oarg);
715 free(tmp);
716 }
717
718 if (!oauth_param_exists(*argvp,*argcp,"oauth_timestamp")) {
719 snprintf(oarg, 1024, "oauth_timestamp=%li", (long int) time(NULL));
720 oauth_add_param_to_array(argcp, argvp, oarg);
721 }
722
723 if (t_key) {
724 snprintf(oarg, 1024, "oauth_token=%s", t_key);
725 oauth_add_param_to_array(argcp, argvp, oarg);
726 }
727
728 snprintf(oarg, 1024, "oauth_consumer_key=%s", c_key);
729 oauth_add_param_to_array(argcp, argvp, oarg);
730
731 snprintf(oarg, 1024, "oauth_signature_method=%s",
732 method==0?"HMAC-SHA1":method==1?"RSA-SHA1":"PLAINTEXT");
733 oauth_add_param_to_array(argcp, argvp, oarg);
734
735 if (!oauth_param_exists(*argvp,*argcp,"oauth_version")) {
736 snprintf(oarg, 1024, "oauth_version=1.0");
737 oauth_add_param_to_array(argcp, argvp, oarg);
738 }
739
740 strcpy(oarg, "oauth_verifier=None");
741 oauth_add_param_to_array(argcp, argvp, oarg);
742
743 strcpy(oarg, "oauth_callback=None");
744 oauth_add_param_to_array(argcp, argvp, oarg);
745
746#if 0 // oauth_version 1.0 Rev A
747 if (!oauth_param_exists(argv,argc,"oauth_callback")) {
748 snprintf(oarg, 1024, "oauth_callback=oob");
749 oauth_add_param_to_array(argcp, argvp, oarg);
750 }
751#endif
752
753}
754
755char *oauth_sign_url (const char *url, char **postargs,
756 OAuthMethod method,
757 const char *c_key, //< consumer key - posted plain text
758 const char *c_secret, //< consumer secret - used as 1st part of secret-key
759 const char *t_key, //< token key - posted plain text in URL
760 const char *t_secret //< token secret - used as 2st part of secret-key
761 ) {
762 return oauth_sign_url2(url, postargs,
763 method, NULL,
764 c_key, c_secret,
765 t_key, t_secret);
766}
767
768char *oauth_sign_url2 (const char *url, char **postargs,
769 OAuthMethod method,
770 const char *http_method, //< HTTP request method
771 const char *c_key, //< consumer key - posted plain text
772 const char *c_secret, //< consumer secret - used as 1st part of secret-key
773 const char *t_key, //< token key - posted plain text in URL
774 const char *t_secret //< token secret - used as 2st part of secret-key
775 ) {
776 int argc;
777 char **argv = NULL;
778 char *rv;
779
780 if (postargs)
781 argc = oauth_split_post_paramters(url, &argv, 0);
782 else
783 argc = oauth_split_url_parameters(url, &argv);
784
785 rv=oauth_sign_array2(&argc, &argv, postargs,
786 method, http_method,
787 c_key, c_secret, t_key, t_secret);
788
789 oauth_free_array(&argc, &argv);
790 return(rv);
791}
792
793char *oauth_sign_array (int *argcp, char***argvp,
794 char **postargs,
795 OAuthMethod method,
796 const char *c_key, //< consumer key - posted plain text
797 const char *c_secret, //< consumer secret - used as 1st part of secret-key
798 const char *t_key, //< token key - posted plain text in URL
799 const char *t_secret //< token secret - used as 2st part of secret-key
800 ) {
801 return oauth_sign_array2 (argcp, argvp,
802 postargs, method,
803 NULL,
804 c_key, c_secret,
805 t_key, t_secret);
806}
807
808char *oauth_sign_array2 (int *argcp, char***argvp,
809 char **postargs,
810 OAuthMethod method,
811 const char *http_method, //< HTTP request method
812 const char *c_key, //< consumer key - posted plain text
813 const char *c_secret, //< consumer secret - used as 1st part of secret-key
814 const char *t_key, //< token key - posted plain text in URL
815 const char *t_secret //< token secret - used as 2st part of secret-key
816 ) {
817 char oarg[1024];
818 char *query;
819 char *okey, *odat, *sign;
820 char *result;
821 char *http_request_method;
822
823 if (!http_method) {
824 http_request_method = xstrdup(postargs?"POST":"GET");
825 } else {
826 int i;
827 http_request_method = xstrdup(http_method);
828 for (i=0;i<strlen(http_request_method);i++)
829 http_request_method[i]=toupper(http_request_method[i]);
830 }
831
832 // add OAuth protocol parameters
833 oauth_add_protocol(argcp, argvp, method, c_key, t_key);
834
835 // sort parameters
836 qsort(&(*argvp)[1], (*argcp)-1, sizeof(char *), oauth_cmpstringp);
837
838 // serialize URL
839 query= oauth_serialize_url_parameters(*argcp, *argvp);
840
841 // generate signature
842 okey = oauth_catenc(2, c_secret, t_secret);
843 odat = oauth_catenc(3, http_request_method, (*argvp)[0], query);
844 free(http_request_method);
845#ifdef DEBUG_OAUTH
846 fprintf (stderr, "\nliboauth: data to sign='%s'\n\n", odat);
847 fprintf (stderr, "\nliboauth: key='%s'\n\n", okey);
848#endif
849 switch(method) {
850 case OA_RSA:
851 sign = oauth_sign_rsa_sha1(odat,okey); // XXX okey needs to be RSA key!
852 break;
853 case OA_PLAINTEXT:
854 sign = oauth_sign_plaintext(odat,okey);
855 break;
856 default:
857 sign = oauth_sign_hmac_sha1(odat,okey);
858 }
859#ifdef WIPE_MEMORY
860 memset(okey,0, strlen(okey));
861 memset(odat,0, strlen(odat));
862#endif
863 free(odat);
864 free(okey);
865
866 // append signature to query args.
867 snprintf(oarg, 1024, "oauth_signature=%s",sign);
868 oauth_add_param_to_array(argcp, argvp, oarg);
869 free(sign);
870
871 // build URL params
872 result = oauth_serialize_url(*argcp, (postargs?1:0), *argvp);
873
874 if(postargs) {
875 *postargs = result;
876 result = xstrdup((*argvp)[0]);
877 }
878
879 if(query) free(query);
880
881 return result;
882}
883
884/**
885 * free array args
886 *
887 * @param argcp pointer to array length int
888 * @param argvp pointer to array values to be free()d
889 */
890void oauth_free_array(int *argcp, char ***argvp) {
891 int i;
892 for (i=0;i<(*argcp);i++) {
893 free((*argvp)[i]);
894 }
895 if(*argvp) free(*argvp);
896}
897
898/**
899 * http://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/drafts/4/spec.html
900 */
901char *oauth_body_hash_file(char *filename) {
902 unsigned char fb[BUFSIZ];
903 EVP_MD_CTX ctx;
904 size_t len=0;
905 unsigned char *md;
906 FILE *F= fopen(filename, "r");
907 if (!F) return NULL;
908
909 EVP_MD_CTX_init(&ctx);
910 EVP_DigestInit(&ctx,EVP_sha1());
911 while (!feof(F) && (len=fread(fb,sizeof(char),BUFSIZ, F))>0) {
912 EVP_DigestUpdate(&ctx, fb, len);
913 }
914 fclose(F);
915 len=0;
916 md=(unsigned char*) calloc(EVP_MD_size(EVP_sha1()),sizeof(unsigned char));
917 EVP_DigestFinal(&ctx, md, (unsigned int *) &len);
918 EVP_MD_CTX_cleanup(&ctx);
919 return oauth_body_hash_encode(len, md);
920}
921
922char *oauth_body_hash_data(size_t length, const char *data) {
923 EVP_MD_CTX ctx;
924 size_t len=0;
925 unsigned char *md;
926 md=(unsigned char*) calloc(EVP_MD_size(EVP_sha1()),sizeof(unsigned char));
927 EVP_MD_CTX_init(&ctx);
928 EVP_DigestInit(&ctx,EVP_sha1());
929 EVP_DigestUpdate(&ctx, data, length);
930 EVP_DigestFinal(&ctx, md, (unsigned int *) &len);
931 EVP_MD_CTX_cleanup(&ctx);
932 return oauth_body_hash_encode(len, md);
933}
934
935/**
936 * base64 encode digest, free it and return a URL parameter
937 * with the oauth_body_hash
938 */
939char *oauth_body_hash_encode(size_t len, unsigned char *digest) {
940 char *sign=oauth_encode_base64(len,digest);
941 char *sig_url = malloc(17+strlen(sign));
942 sprintf(sig_url,"oauth_body_hash=%s", sign);
943 free(sign);
944 free(digest);
945 return sig_url;
946}
947
948
949/**
950 * xep-0235 - TODO
951 */
952char *oauth_sign_xmpp (const char *xml,
953 OAuthMethod method,
954 const char *c_secret, //< consumer secret - used as 1st part of secret-key
955 const char *t_secret //< token secret - used as 2st part of secret-key
956 ) {
957
958 return NULL;
959}
960
961// vi: sts=2 sw=2 ts=2
9620
=== removed file 'libubuntuoneui/oauth.h'
--- libubuntuoneui/oauth.h 2010-01-06 16:48:47 +0000
+++ libubuntuoneui/oauth.h 1970-01-01 00:00:00 +0000
@@ -1,539 +0,0 @@
1/**
2 * @brief oAuth.net implementation in POSIX-C.
3 * @file oauth.h
4 * @author Robin Gareus <robin@gareus.org>
5 *
6 * Copyright 2007, 2008, 2009 Robin Gareus <robin@gareus.org>
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files (the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 * THE SOFTWARE.
25 *
26 */
27#ifndef _OAUTH_H
28#define _OAUTH_H 1
29
30#ifndef DOXYGEN_IGNORE
31// liboauth version
32#define LIBOAUTH_VERSION "0.5.3"
33#define LIBOAUTH_VERSION_MAJOR 0
34#define LIBOAUTH_VERSION_MINOR 5
35#define LIBOAUTH_VERSION_MICRO 3
36
37//interface revision number
38//http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
39#define LIBOAUTH_CUR 3
40#define LIBOAUTH_REV 0
41#define LIBOAUTH_AGE 3
42#endif
43
44#ifdef __GNUC__
45# define OA_GCC_VERSION_AT_LEAST(x,y) (__GNUC__ > x || __GNUC__ == x && __GNUC_MINOR__ >= y)
46#else
47# define OA_GCC_VERSION_AT_LEAST(x,y) 0
48#endif
49
50#ifndef attribute_deprecated
51#if OA_GCC_VERSION_AT_LEAST(3,1)
52# define attribute_deprecated __attribute__((deprecated))
53#else
54# define attribute_deprecated
55#endif
56#endif
57
58/** \enum OAuthMethod
59 * signature method to used for signing the request.
60 */
61typedef enum {
62 OA_HMAC=0, ///< use HMAC-SHA1 request signing method
63 OA_RSA, ///< use RSA signature (not implemented)
64 OA_PLAINTEXT ///< use plain text signature (for testing only)
65 } OAuthMethod;
66
67/**
68 * Base64 encode and return size data in 'src'. The caller must free the
69 * returned string.
70 *
71 * @param size The size of the data in src
72 * @param src The data to be base64 encode
73 * @return encoded string otherwise NULL
74 */
75char *oauth_encode_base64(int size, const unsigned char *src);
76
77/**
78 * Decode the base64 encoded string 'src' into the memory pointed to by
79 * 'dest'.
80 *
81 * @param dest Pointer to memory for holding the decoded string.
82 * Must be large enough to recieve the decoded string.
83 * @param src A base64 encoded string.
84 * @return the length of the decoded string if decode
85 * succeeded otherwise 0.
86 */
87int oauth_decode_base64(unsigned char *dest, const char *src);
88
89/**
90 * Escape 'string' according to RFC3986 and
91 * http://oauth.net/core/1.0/#encoding_parameters.
92 *
93 * @param string The data to be encoded
94 * @return encoded string otherwise NULL
95 * The caller must free the returned string.
96 */
97char *oauth_url_escape(const char *string);
98
99/**
100 * Parse RFC3986 encoded 'string' back to unescaped version.
101 *
102 * @param string The data to be unescaped
103 * @param olen unless NULL the length of the returned string is stored there.
104 * @return decoded string or NULL
105 * The caller must free the returned string.
106 */
107char *oauth_url_unescape(const char *string, size_t *olen);
108
109
110/**
111 * returns base64 encoded HMAC-SHA1 signature for
112 * given message and key.
113 * both data and key need to be urlencoded.
114 *
115 * the returned string needs to be freed by the caller
116 *
117 * @param m message to be signed
118 * @param k key used for signing
119 * @return signature string.
120 */
121char *oauth_sign_hmac_sha1 (const char *m, const char *k);
122
123/**
124 * same as \ref oauth_sign_hmac_sha1 but allows
125 * to specify length of message and key (in case they contain null chars).
126 *
127 * @param m message to be signed
128 * @param ml length of message
129 * @param k key used for signing
130 * @param kl length of key
131 * @return signature string.
132 */
133char *oauth_sign_hmac_sha1_raw (const char *m, const size_t ml, const char *k, const size_t kl);
134
135/**
136 * returns plaintext signature for the given key.
137 *
138 * the returned string needs to be freed by the caller
139 *
140 * @param m message to be signed
141 * @param k key used for signing
142 * @return signature string
143 */
144char *oauth_sign_plaintext (const char *m, const char *k);
145
146/**
147 * returns RSA-SHA1 signature for given data.
148 * the returned signature needs to be freed by the caller.
149 *
150 * @param m message to be signed
151 * @param k private-key PKCS and Base64-encoded
152 * @return base64 encoded signature string.
153 */
154char *oauth_sign_rsa_sha1 (const char *m, const char *k);
155
156/**
157 * verify RSA-SHA1 signature.
158 *
159 * returns the output of EVP_VerifyFinal() for a given message,
160 * cert/pubkey and signature.
161 *
162 * @param m message to be verified
163 * @param c public-key or x509 certificate
164 * @param s base64 encoded signature
165 * @return 1 for a correct signature, 0 for failure and -1 if some other error occurred
166 */
167int oauth_verify_rsa_sha1 (const char *m, const char *c, const char *s);
168
169/**
170 * url-escape strings and concatenate with '&' separator.
171 * The number of strings to be concatenated must be
172 * given as first argument.
173 * all arguments thereafter must be of type (char *)
174 *
175 * @param len the number of arguments to follow this parameter
176 *
177 * @return pointer to memory holding the concatenated
178 * strings - needs to be free(d) by the caller. or NULL
179 * in case we ran out of memory.
180 */
181char *oauth_catenc(int len, ...);
182
183/**
184 * splits the given url into a parameter array.
185 * (see \ref oauth_serialize_url and \ref oauth_serialize_url_parameters for the reverse)
186 * (see \ref oauth_split_post_paramters for a more generic version)
187 *
188 * @param url the url or query-string to parse; may be NULL
189 * @param argv pointer to a (char *) array where the results are stored.
190 * The array is re-allocated to match the number of parameters and each
191 * parameter-string is allocated with strdup. - The memory needs to be freed
192 * by the caller.
193 *
194 * @return number of parameter(s) in array.
195 */
196int oauth_split_url_parameters(const char *url, char ***argv);
197
198/**
199 * splits the given url into a parameter array.
200 * (see \ref oauth_serialize_url and \ref oauth_serialize_url_parameters for the reverse)
201 *
202 * @param url the url or query-string to parse.
203 * @param argv pointer to a (char *) array where the results are stored.
204 * The array is re-allocated to match the number of parameters and each
205 * parameter-string is allocated with strdup. - The memory needs to be freed
206 * by the caller.
207 * @param qesc use query parameter escape (vs post-param-escape) - if set
208 * to 1 all '+' are treated as spaces ' '
209 *
210 * @return number of parameter(s) in array.
211 */
212int oauth_split_post_paramters(const char *url, char ***argv, short qesc);
213
214/**
215 * build a url query string from an array.
216 *
217 * @param argc the total number of elements in the array
218 * @param start element in the array at which to start concatenating.
219 * @param argv parameter-array to concatenate.
220 * @return url string needs to be freed by the caller.
221 *
222 */
223char *oauth_serialize_url (int argc, int start, char **argv);
224
225/**
226 * encode query parameters from an array.
227 *
228 * @param argc the total number of elements in the array
229 * @param start element in the array at which to start concatenating.
230 * @param argv parameter-array to concatenate.
231 * @param sep separator for parameters (usually "&")
232 * @return url string needs to be freed by the caller.
233 */
234char *oauth_serialize_url_sep (int argc, int start, char **argv, char *sep);
235
236/**
237 * build a query parameter string from an array.
238 *
239 * This function is a shortcut for \ref oauth_serialize_url (argc, 1, argv).
240 * It strips the leading host/path, which is usually the first
241 * element when using oauth_split_url_parameters on an URL.
242 *
243 * @param argc the total number of elements in the array
244 * @param argv parameter-array to concatenate.
245 * @return url string needs to be freed by the caller.
246 */
247char *oauth_serialize_url_parameters (int argc, char **argv);
248
249/**
250 * generate a random string between 15 and 32 chars length
251 * and return a pointer to it. The value needs to be freed by the
252 * caller
253 *
254 * @return zero terminated random string.
255 */
256char *oauth_gen_nonce();
257
258/**
259 * string compare function for oauth parameters.
260 *
261 * used with qsort. needed to normalize request parameters.
262 * see http://oauth.net/core/1.0/#anchor14
263 */
264int oauth_cmpstringp(const void *p1, const void *p2);
265
266
267/**
268 * search array for parameter key.
269 * @param argv length of array to search
270 * @param argc parameter array to search
271 * @param key key of parameter to check.
272 *
273 * @return FALSE (0) if array does not contain a paramater with given key, TRUE (1) otherwise.
274 */
275int oauth_param_exists(char **argv, int argc, char *key);
276
277/**
278 * add query parameter to array
279 *
280 * @param argcp pointer to array length int
281 * @param argvp pointer to array values
282 * @param addparam parameter to add (eg. "foo=bar")
283 */
284void oauth_add_param_to_array(int *argcp, char ***argvp, const char *addparam);
285
286/**
287 * free array args
288 *
289 * @param argcp pointer to array length int
290 * @param argvp pointer to array values to be free()d
291 */
292void oauth_free_array(int *argcp, char ***argvp);
293
294/**
295 * calculate oAuth-signature for a given HTTP request URL, parameters and oauth-tokens.
296 *
297 * if 'postargs' is NULL a "GET" request is signed and the
298 * signed URL is returned. Else this fn will modify 'postargs'
299 * to point to memory that contains the signed POST-variables
300 * and returns the base URL.
301 *
302 * both, the return value and (if given) 'postargs' need to be freed
303 * by the caller.
304 *
305 * @param url The request URL to be signed. append all GET or POST
306 * query-parameters separated by either '?' or '&' to this parameter.
307 *
308 * @param postargs This parameter points to an area where the return value
309 * is stored. If 'postargs' is NULL, no value is stored.
310 *
311 * @param method specify the signature method to use. It is of type
312 * \ref OAuthMethod and most likely \ref OA_HMAC.
313 *
314 * @param http_method The HTTP request method to use (ie "GET", "PUT",..)
315 * If NULL is given as 'http_method' this defaults to "GET" when
316 * 'postargs' is also NULL and when postargs is not NULL "POST" is used.
317 *
318 * @param c_key consumer key
319 * @param c_secret consumer secret
320 * @param t_key token key
321 * @param t_secret token secret
322 *
323 * @return the signed url or NULL if an error occurred.
324 *
325 */
326char *oauth_sign_url2 (const char *url, char **postargs,
327 OAuthMethod method,
328 const char *http_method, //< HTTP request method
329 const char *c_key, //< consumer key - posted plain text
330 const char *c_secret, //< consumer secret - used as 1st part of secret-key
331 const char *t_key, //< token key - posted plain text in URL
332 const char *t_secret //< token secret - used as 2st part of secret-key
333 );
334
335/**
336 * @deprecated Use oauth_sign_url2() instead.
337 */
338char *oauth_sign_url (const char *url, char **postargs,
339 OAuthMethod method,
340 const char *c_key, //< consumer key - posted plain text
341 const char *c_secret, //< consumer secret - used as 1st part of secret-key
342 const char *t_key, //< token key - posted plain text in URL
343 const char *t_secret //< token secret - used as 2st part of secret-key
344 ) attribute_deprecated;
345
346/**
347 * same as /ref oauth_sign_url
348 * with the url already split into parameter array
349 *
350 * @param argcp pointer to array length int
351 * @param argvp pointer to array values
352 * (argv[0]="http://example.org:80/" argv[1]="first=QueryParamater" ..)
353 *
354 * @param postargs This parameter points to an area where the return value
355 * is stored. If 'postargs' is NULL, no value is stored.
356 *
357 * @param method specify the signature method to use. It is of type
358 * \ref OAuthMethod and most likely \ref OA_HMAC.
359 *
360 * @param http_method The HTTP request method to use (ie "GET", "PUT",..)
361 * If NULL is given as 'http_method' this defaults to "GET" when
362 * 'postargs' is also NULL and when postargs is not NULL "POST" is used.
363 *
364 * @param c_key consumer key
365 * @param c_secret consumer secret
366 * @param t_key token key
367 * @param t_secret token secret
368 *
369 * @return the signed url or NULL if an error occurred.
370 */
371char *oauth_sign_array2 (int *argcp, char***argvp,
372 char **postargs,
373 OAuthMethod method,
374 const char *http_method, //< HTTP request method
375 const char *c_key, //< consumer key - posted plain text
376 const char *c_secret, //< consumer secret - used as 1st part of secret-key
377 const char *t_key, //< token key - posted plain text in URL
378 const char *t_secret //< token secret - used as 2st part of secret-key
379 );
380
381/**
382 * @deprecated Use oauth_sign_array2() instead.
383 */
384char *oauth_sign_array (int *argcp, char***argvp,
385 char **postargs,
386 OAuthMethod method,
387 const char *c_key, //< consumer key - posted plain text
388 const char *c_secret, //< consumer secret - used as 1st part of secret-key
389 const char *t_key, //< token key - posted plain text in URL
390 const char *t_secret //< token secret - used as 2st part of secret-key
391 ) attribute_deprecated;
392
393
394/**
395 * calculate body hash (sha1sum) of given file and return
396 * a oauth_body_hash=xxxx parameter to be added to the request.
397 * The returned string needs to be freed by the calling function.
398 *
399 * see
400 * http://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/drafts/4/spec.html
401 *
402 * @param filename the filename to calculate the hash for
403 *
404 * @return URL oauth_body_hash parameter string
405 */
406char *oauth_body_hash_file(char *filename);
407
408/**
409 * calculate body hash (sha1sum) of given data and return
410 * a oauth_body_hash=xxxx parameter to be added to the request.
411 * The returned string needs to be freed by the calling function.
412 * The returned string is not yet url-escaped and suitable to be
413 * passed as argument to \ref oauth_catenc.
414 *
415 * see
416 * http://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/drafts/4/spec.html
417 *
418 * @param length length of the data parameter in bytes
419 * @param data to calculate the hash for
420 *
421 * @return URL oauth_body_hash parameter string
422 */
423char *oauth_body_hash_data(size_t length, const char *data);
424
425/**
426 * base64 encode digest, free it and return a URL parameter
427 * with the oauth_body_hash. The returned hash needs to be freed by the
428 * calling function. The returned string is not yet url-escaped and
429 * thus suitable to be passed to \ref oauth_catenc.
430 *
431 * @param len length of the digest to encode
432 * @param digest hash value to encode
433 *
434 * @return URL oauth_body_hash parameter string
435 */
436char *oauth_body_hash_encode(size_t len, unsigned char *digest);
437
438/**
439 * xep-0235 - TODO
440 */
441char *oauth_sign_xmpp (const char *xml,
442 OAuthMethod method,
443 const char *c_secret, //< consumer secret - used as 1st part of secret-key
444 const char *t_secret //< token secret - used as 2st part of secret-key
445 );
446
447/**
448 * do a HTTP GET request, wait for it to finish
449 * and return the content of the reply.
450 * (requires libcurl or a command-line HTTP client)
451 *
452 * If compiled <b>without</b> libcurl this function calls
453 * a command-line executable defined in the environment variable
454 * OAUTH_HTTP_GET_CMD - it defaults to
455 * <tt>curl -sA 'liboauth-agent/0.1' '%%u'</tt>
456 * where %%u is replaced with the URL and query parameters.
457 *
458 * bash & wget example:
459 * <tt>export OAUTH_HTTP_CMD="wget -q -U 'liboauth-agent/0.1' '%%u' "</tt>
460 *
461 * WARNING: this is a tentative function. it's convenient and handy for testing
462 * or developing oAuth code. But don't rely on this function
463 * to become a stable part of this API. It does not do
464 * much error checking or handling for one thing..
465 *
466 * NOTE: \a u and \a q are just concatenated with a '?' in between,
467 * unless \a q is NULL. in which case only \a u will be used.
468 *
469 * @param u base url to get
470 * @param q query string to send along with the HTTP request or NULL.
471 * @return In case of an error NULL is returned; otherwise a pointer to the
472 * replied content from HTTP server. latter needs to be freed by caller.
473 */
474char *oauth_http_get (const char *u, const char *q);
475
476
477/**
478 * do a HTTP POST request, wait for it to finish
479 * and return the content of the reply.
480 * (requires libcurl or a command-line HTTP client)
481 *
482 * If compiled <b>without</b> libcurl this function calls
483 * a command-line executable defined in the environment variable
484 * OAUTH_HTTP_CMD - it defaults to
485 * <tt>curl -sA 'liboauth-agent/0.1' -d '%%p' '%%u'</tt>
486 * where %%p is replaced with the postargs and %%u is replaced with
487 * the URL.
488 *
489 * bash & wget example:
490 * <tt>export OAUTH_HTTP_CMD="wget -q -U 'liboauth-agent/0.1' --post-data='%%p' '%%u' "</tt>
491 *
492 * NOTE: This function uses the curl's default HTTP-POST Content-Type:
493 * application/x-www-form-urlencoded which is the only option allowed
494 * by oauth core 1.0 spec. Experimental code can use the Environment variable
495 * to transmit custom HTTP headers or parameters.
496 *
497 * WARNING: this is a tentative function. it's convenient and handy for testing
498 * or developing oAuth code. But don't rely on this function
499 * to become a stable part of this API. It does not do
500 * much error checking for one thing..
501 *
502 * @param u url to query
503 * @param p postargs to send along with the HTTP request.
504 * @return replied content from HTTP server. needs to be freed by caller.
505 */
506char *oauth_http_post (const char *u, const char *p);
507
508/**
509 * http post raw data from file.
510 * the returned string needs to be freed by the caller
511 * (requires libcurl)
512 *
513 * see dislaimer: /ref oauth_http_post
514 *
515 * @param u url to retrieve
516 * @param fn filename of the file to post along
517 * @param len length of the file in bytes. set to '0' for autodetection
518 * @param customheader specify custom HTTP header (or NULL for default)
519 * @return returned HTTP reply or NULL on error
520 */
521char *oauth_post_file (const char *u, const char *fn, size_t len, const char *customheader);
522
523/**
524 * http post raw data
525 * the returned string needs to be freed by the caller
526 * (requires libcurl)
527 *
528 * see dislaimer: /ref oauth_http_post
529 *
530 * @param u url to retrieve
531 * @param data data to post
532 * @param len length of the data in bytes.
533 * @param customheader specify custom HTTP header (or NULL for default)
534 * @return returned HTTP reply or NULL on error
535 */
536char *oauth_post_data (const char *u, const char *data, size_t len, const char *customheader);
537
538#endif
539/* vi:set ts=8 sts=2 sw=2: */
5400
=== modified file 'libubuntuoneui/u1-codec-installer.c'
--- libubuntuoneui/u1-codec-installer.c 2012-01-27 17:09:25 +0000
+++ libubuntuoneui/u1-codec-installer.c 2012-04-05 18:42:22 +0000
@@ -1,9 +1,9 @@
1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2/*2/*
3 * Copyright (C) 2011 Canonical, Ltd.3 * Copyright (C) 2011-2012 Canonical Ltd.
4 *4 *
5 * This library is free software; you can redistribute it and/or5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of version 2 of the GNU Lesser General Public6 * modify it under the terms of version 3 of the GNU Lesser General Public
7 * License as published by the Free Software Foundation.7 * License as published by the Free Software Foundation.
8 *8 *
9 * This program is distributed in the hope that it will be useful,9 * This program is distributed in the hope that it will be useful,
1010
=== modified file 'libubuntuoneui/u1-codec-installer.h'
--- libubuntuoneui/u1-codec-installer.h 2011-04-01 17:19:03 +0000
+++ libubuntuoneui/u1-codec-installer.h 2012-04-05 18:42:22 +0000
@@ -1,9 +1,9 @@
1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2/*2/*
3 * Copyright (C) 2011 Canonical, Ltd.3 * Copyright (C) 2011-2012 Canonical Ltd.
4 *4 *
5 * This library is free software; you can redistribute it and/or5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of version 2 of the GNU Lesser General Public6 * modify it under the terms of version 3 of the GNU Lesser General Public
7 * License as published by the Free Software Foundation.7 * License as published by the Free Software Foundation.
8 *8 *
9 * This program is distributed in the hope that it will be useful,9 * This program is distributed in the hope that it will be useful,
1010
=== modified file 'libubuntuoneui/u1-music-store.c'
--- libubuntuoneui/u1-music-store.c 2012-04-02 17:27:16 +0000
+++ libubuntuoneui/u1-music-store.c 2012-04-05 18:42:22 +0000
@@ -1,11 +1,11 @@
1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2/*2/*
3 * Copyright (C) 2009-2010 Canonical Services Ltd (www.canonical.com)3 * Copyright (C) 2009-2012 Canonical Ltd.
4 *4 *
5 * Authors: Rodrigo Moya <rodrigo.moya@canonical.com>5 * Authors: Rodrigo Moya <rodrigo.moya@canonical.com>
6 *6 *
7 * This library is free software; you can redistribute it and/or7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of version 2 of the GNU Lesser General Public8 * modify it under the terms of version 3 of the GNU Lesser General Public
9 * License as published by the Free Software Foundation.9 * License as published by the Free Software Foundation.
10 *10 *
11 * This program is distributed in the hope that it will be useful,11 * This program is distributed in the hope that it will be useful,
@@ -29,7 +29,7 @@
29#include <libsoup/soup-gnome-features.h>29#include <libsoup/soup-gnome-features.h>
30#include <libsoup/soup-uri.h>30#include <libsoup/soup-uri.h>
31#include <libsyncdaemon/libsyncdaemon.h>31#include <libsyncdaemon/libsyncdaemon.h>
32#include "oauth.h"32#include <oauth.h>
33#include "u1-music-store.h"33#include "u1-music-store.h"
34#include "u1-marshal.h"34#include "u1-marshal.h"
35#include "u1-codec-installer.h"35#include "u1-codec-installer.h"
3636
=== modified file 'libubuntuoneui/u1-music-store.h'
--- libubuntuoneui/u1-music-store.h 2010-08-26 23:20:11 +0000
+++ libubuntuoneui/u1-music-store.h 2012-04-05 18:42:22 +0000
@@ -1,11 +1,11 @@
1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2/*2/*
3 * Copyright (C) 2009 Canonical Services Ltd (www.canonical.com)3 * Copyright (C) 2009-2012 Canonical Ltd.
4 *4 *
5 * Authors: Rodrigo Moya <rodrigo.moya@canonical.com>5 * Authors: Rodrigo Moya <rodrigo.moya@canonical.com>
6 *6 *
7 * This library is free software; you can redistribute it and/or7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of version 2 of the GNU Lesser General Public8 * modify it under the terms of version 3 of the GNU Lesser General Public
9 * License as published by the Free Software Foundation.9 * License as published by the Free Software Foundation.
10 *10 *
11 * This program is distributed in the hope that it will be useful,11 * This program is distributed in the hope that it will be useful,
1212
=== modified file 'libubuntuoneui/u1-request-chrome.c'
--- libubuntuoneui/u1-request-chrome.c 2011-03-11 21:14:47 +0000
+++ libubuntuoneui/u1-request-chrome.c 2012-04-05 18:42:22 +0000
@@ -1,9 +1,9 @@
1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2/*2/*
3 * Copyright (C) 2011 Canonical, Ltd.3 * Copyright (C) 2011-2012 Canonical Ltd.
4 *4 *
5 * This library is free software; you can redistribute it and/or5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of version 2 of the GNU Lesser General Public6 * modify it under the terms of version 3 of the GNU Lesser General Public
7 * License as published by the Free Software Foundation.7 * License as published by the Free Software Foundation.
8 *8 *
9 * This program is distributed in the hope that it will be useful,9 * This program is distributed in the hope that it will be useful,
1010
=== modified file 'libubuntuoneui/u1-request-chrome.h'
--- libubuntuoneui/u1-request-chrome.h 2011-03-11 20:06:30 +0000
+++ libubuntuoneui/u1-request-chrome.h 2012-04-05 18:42:22 +0000
@@ -1,9 +1,9 @@
1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2/*2/*
3 * Copyright (C) 2011 Canonical, Ltd.3 * Copyright (C) 2011-2012 Canonical Ltd.
4 *4 *
5 * This library is free software; you can redistribute it and/or5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of version 2 of the GNU Lesser General Public6 * modify it under the terms of version 3 of the GNU Lesser General Public
7 * License as published by the Free Software Foundation.7 * License as published by the Free Software Foundation.
8 *8 *
9 * This program is distributed in the hope that it will be useful,9 * This program is distributed in the hope that it will be useful,
1010
=== removed file 'libubuntuoneui/xmalloc.c'
--- libubuntuoneui/xmalloc.c 2010-01-06 16:48:47 +0000
+++ libubuntuoneui/xmalloc.c 1970-01-01 00:00:00 +0000
@@ -1,151 +0,0 @@
1/* xmalloc.c -- malloc with out of memory checking
2 Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 99 Free Software Foundation, Inc.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
7 any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software Foundation,
16 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
17
18#if HAVE_CONFIG_H
19# include <config.h>
20#endif
21
22#ifndef USE_LGPL
23// TODO better use #define in header file?!
24#include <string.h>
25#include <stdlib.h>
26void *xmalloc (size_t n) {return malloc(n);}
27void *xcalloc (size_t n, size_t s) {return calloc(n,s);}
28void *xrealloc (void *p, size_t n) {return realloc(p,n);}
29char *xstrdup (const char *p) {return strdup(p);}
30
31#else // LGPL LICENSED CODE
32#if __STDC__
33# define VOID void
34#else
35# define VOID char
36#endif
37
38#include <stdio.h> /* for stderr */
39
40#if STDC_HEADERS
41
42#include <sys/types.h>
43#include <string.h> /* for strlen etc. */
44#include <stdlib.h>
45
46#else /* !STDC_HEADERS */
47
48extern size_t strlen ();
49extern char *strcpy ();
50
51VOID *calloc ();
52VOID *malloc ();
53VOID *realloc ();
54void free ();
55#endif
56
57#if ENABLE_NLS
58# include <libintl.h>
59# define _(Text) gettext (Text)
60#else
61# define textdomain(Domain)
62# define _(Text) Text
63#endif
64
65/* Prototypes for functions defined here. */
66#if defined (__STDC__) && __STDC__
67static VOID *fixup_null_alloc (size_t n);
68VOID *xmalloc (size_t n);
69VOID *xcalloc (size_t n, size_t s);
70VOID *xrealloc (VOID *p, size_t n);
71char *xstrdup (const char *p);
72#endif
73
74
75static VOID *
76fixup_null_alloc (n)
77 size_t n;
78{
79 VOID *p;
80
81 p = 0;
82 if (n == 0)
83 p = malloc ((size_t) 1);
84 if (p == 0)
85 {
86 /* possible revisions: release some memory and re-try, print
87 more information (e.g. line number of input file) */
88 fprintf(stderr, _("liboauth: Memory exhausted"));
89 exit(1);
90 }
91 return p;
92}
93
94/* Allocate N bytes of memory dynamically, with error checking. */
95
96VOID *
97xmalloc (n)
98 size_t n;
99{
100 VOID *p;
101
102 p = malloc (n);
103 if (p == 0)
104 p = fixup_null_alloc (n);
105 return p;
106}
107
108/* Allocate memory for N elements of S bytes, with error checking. */
109
110VOID *
111xcalloc (n, s)
112 size_t n, s;
113{
114 VOID *p;
115
116 p = calloc (n, s);
117 if (p == 0)
118 p = fixup_null_alloc (n);
119 return p;
120}
121
122/* Change the size of an allocated block of memory P to N bytes,
123 with error checking.
124 If P is NULL, run xmalloc. */
125
126VOID *
127xrealloc (p, n)
128 VOID *p;
129 size_t n;
130{
131 if (p == 0)
132 return xmalloc (n);
133 p = realloc (p, n);
134 if (p == 0)
135 p = fixup_null_alloc (n);
136 return p;
137}
138
139/* Make a copy of a string in a newly allocated block of memory. */
140
141char *
142xstrdup (str)
143 const char *str;
144{
145 VOID *p;
146
147 p = xmalloc (strlen (str) + 1);
148 strcpy (p, str);
149 return p;
150}
151#endif
1520
=== removed file 'libubuntuoneui/xmalloc.h'
--- libubuntuoneui/xmalloc.h 2010-01-06 16:48:47 +0000
+++ libubuntuoneui/xmalloc.h 1970-01-01 00:00:00 +0000
@@ -1,12 +0,0 @@
1/* Prototypes for functions defined in xmalloc.c */
2
3void *xmalloc (size_t n);
4void *xcalloc (size_t n, size_t s);
5void *xrealloc (void *p, size_t n);
6char *xstrdup (const char *p);
7
8/* POSIX prototypes - avoid compiler warnings with '-posix' */
9int strncasecmp(const char *s1, const char *s2, size_t n);
10int snprintf(char *str, size_t size, const char *format, ...);
11FILE *popen(const char *command, const char *type);
12int pclose(FILE *stream);
130
=== modified file 'po/POTFILES.in'
--- po/POTFILES.in 2012-01-27 20:48:39 +0000
+++ po/POTFILES.in 2012-04-05 18:42:22 +0000
@@ -1,3 +1,2 @@
1libubuntuoneui/u1-codec-installer.c1libubuntuoneui/u1-codec-installer.c
2libubuntuoneui/u1-music-store.c2libubuntuoneui/u1-music-store.c
3libubuntuoneui/xmalloc.c
43
=== removed file 'po/POTFILES.skip'
--- po/POTFILES.skip 2011-02-16 15:30:29 +0000
+++ po/POTFILES.skip 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
1bindings/python/ubuntuone/__init__.py
20
=== modified file 'tests/test-music-store.c'
--- tests/test-music-store.c 2012-01-27 20:48:39 +0000
+++ tests/test-music-store.c 2012-04-05 18:42:22 +0000
@@ -1,11 +1,11 @@
1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2/*2/*
3 * Copyright (C) 2009 Canonical Services Ltd (www.canonical.com)3 * Copyright (C) 2009-2012 Canonical Ltd.
4 *4 *
5 * Authors: Rodrigo Moya <rodrigo.moya@canonical.com>5 * Authors: Rodrigo Moya <rodrigo.moya@canonical.com>
6 *6 *
7 * This library is free software; you can redistribute it and/or7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of version 2 of the GNU Lesser General Public8 * modify it under the terms of version 3 of the GNU Lesser General Public
9 * License as published by the Free Software Foundation.9 * License as published by the Free Software Foundation.
10 *10 *
11 * This program is distributed in the hope that it will be useful,11 * This program is distributed in the hope that it will be useful,

Subscribers

People subscribed via source and target branches