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
1=== modified file 'COPYING'
2--- COPYING 2010-02-16 23:02:24 +0000
3+++ COPYING 2012-04-05 18:42:22 +0000
4@@ -1,481 +1,674 @@
5- GNU LIBRARY GENERAL PUBLIC LICENSE
6- Version 2, June 1991
7+ GNU GENERAL PUBLIC LICENSE
8+ Version 3, 29 June 2007
9
10- Copyright (C) 1991 Free Software Foundation, Inc.
11- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
12+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
13 Everyone is permitted to copy and distribute verbatim copies
14 of this license document, but changing it is not allowed.
15
16-[This is the first released version of the library GPL. It is
17- numbered 2 because it goes with version 2 of the ordinary GPL.]
18-
19- Preamble
20-
21- The licenses for most software are designed to take away your
22-freedom to share and change it. By contrast, the GNU General Public
23-Licenses are intended to guarantee your freedom to share and change
24-free software--to make sure the software is free for all its users.
25-
26- This license, the Library General Public License, applies to some
27-specially designated Free Software Foundation software, and to any
28-other libraries whose authors decide to use it. You can use it for
29-your libraries, too.
30+ Preamble
31+
32+ The GNU General Public License is a free, copyleft license for
33+software and other kinds of works.
34+
35+ The licenses for most software and other practical works are designed
36+to take away your freedom to share and change the works. By contrast,
37+the GNU General Public License is intended to guarantee your freedom to
38+share and change all versions of a program--to make sure it remains free
39+software for all its users. We, the Free Software Foundation, use the
40+GNU General Public License for most of our software; it applies also to
41+any other work released this way by its authors. You can apply it to
42+your programs, too.
43
44 When we speak of free software, we are referring to freedom, not
45 price. Our General Public Licenses are designed to make sure that you
46 have the freedom to distribute copies of free software (and charge for
47-this service if you wish), that you receive source code or can get it
48-if you want it, that you can change the software or use pieces of it
49-in new free programs; and that you know you can do these things.
50-
51- To protect your rights, we need to make restrictions that forbid
52-anyone to deny you these rights or to ask you to surrender the rights.
53-These restrictions translate to certain responsibilities for you if
54-you distribute copies of the library, or if you modify it.
55-
56- For example, if you distribute copies of the library, whether gratis
57-or for a fee, you must give the recipients all the rights that we gave
58-you. You must make sure that they, too, receive or can get the source
59-code. If you link a program with the library, you must provide
60-complete object files to the recipients so that they can relink them
61-with the library, after making changes to the library and recompiling
62-it. And you must show them these terms so they know their rights.
63-
64- Our method of protecting your rights has two steps: (1) copyright
65-the library, and (2) offer you this license which gives you legal
66-permission to copy, distribute and/or modify the library.
67-
68- Also, for each distributor's protection, we want to make certain
69-that everyone understands that there is no warranty for this free
70-library. If the library is modified by someone else and passed on, we
71-want its recipients to know that what they have is not the original
72-version, so that any problems introduced by others will not reflect on
73-the original authors' reputations.
74-
75
76- Finally, any free program is threatened constantly by software
77-patents. We wish to avoid the danger that companies distributing free
78-software will individually obtain patent licenses, thus in effect
79-transforming the program into proprietary software. To prevent this,
80-we have made it clear that any patent must be licensed for everyone's
81-free use or not licensed at all.
82-
83- Most GNU software, including some libraries, is covered by the ordinary
84-GNU General Public License, which was designed for utility programs. This
85-license, the GNU Library General Public License, applies to certain
86-designated libraries. This license is quite different from the ordinary
87-one; be sure to read it in full, and don't assume that anything in it is
88-the same as in the ordinary license.
89-
90- The reason we have a separate public license for some libraries is that
91-they blur the distinction we usually make between modifying or adding to a
92-program and simply using it. Linking a program with a library, without
93-changing the library, is in some sense simply using the library, and is
94-analogous to running a utility program or application program. However, in
95-a textual and legal sense, the linked executable is a combined work, a
96-derivative of the original library, and the ordinary General Public License
97-treats it as such.
98-
99- Because of this blurred distinction, using the ordinary General
100-Public License for libraries did not effectively promote software
101-sharing, because most developers did not use the libraries. We
102-concluded that weaker conditions might promote sharing better.
103-
104- However, unrestricted linking of non-free programs would deprive the
105-users of those programs of all benefit from the free status of the
106-libraries themselves. This Library General Public License is intended to
107-permit developers of non-free programs to use free libraries, while
108-preserving your freedom as a user of such programs to change the free
109-libraries that are incorporated in them. (We have not seen how to achieve
110-this as regards changes in header files, but we have achieved it as regards
111-changes in the actual functions of the Library.) The hope is that this
112-will lead to faster development of free libraries.
113+them if you wish), that you receive source code or can get it if you
114+want it, that you can change the software or use pieces of it in new
115+free programs, and that you know you can do these things.
116+
117+ To protect your rights, we need to prevent others from denying you
118+these rights or asking you to surrender the rights. Therefore, you have
119+certain responsibilities if you distribute copies of the software, or if
120+you modify it: responsibilities to respect the freedom of others.
121+
122+ For example, if you distribute copies of such a program, whether
123+gratis or for a fee, you must pass on to the recipients the same
124+freedoms that you received. You must make sure that they, too, receive
125+or can get the source code. And you must show them these terms so they
126+know their rights.
127+
128+ Developers that use the GNU GPL protect your rights with two steps:
129+(1) assert copyright on the software, and (2) offer you this License
130+giving you legal permission to copy, distribute and/or modify it.
131+
132+ For the developers' and authors' protection, the GPL clearly explains
133+that there is no warranty for this free software. For both users' and
134+authors' sake, the GPL requires that modified versions be marked as
135+changed, so that their problems will not be attributed erroneously to
136+authors of previous versions.
137+
138+ Some devices are designed to deny users access to install or run
139+modified versions of the software inside them, although the manufacturer
140+can do so. This is fundamentally incompatible with the aim of
141+protecting users' freedom to change the software. The systematic
142+pattern of such abuse occurs in the area of products for individuals to
143+use, which is precisely where it is most unacceptable. Therefore, we
144+have designed this version of the GPL to prohibit the practice for those
145+products. If such problems arise substantially in other domains, we
146+stand ready to extend this provision to those domains in future versions
147+of the GPL, as needed to protect the freedom of users.
148+
149+ Finally, every program is threatened constantly by software patents.
150+States should not allow patents to restrict development and use of
151+software on general-purpose computers, but in those that do, we wish to
152+avoid the special danger that patents applied to a free program could
153+make it effectively proprietary. To prevent this, the GPL assures that
154+patents cannot be used to render the program non-free.
155
156 The precise terms and conditions for copying, distribution and
157-modification follow. Pay close attention to the difference between a
158-"work based on the library" and a "work that uses the library". The
159-former contains code derived from the library, while the latter only
160-works together with the library.
161-
162- Note that it is possible for a library to be covered by the ordinary
163-General Public License rather than by this special one.
164-
165
166- GNU LIBRARY GENERAL PUBLIC LICENSE
167- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
168-
169- 0. This License Agreement applies to any software library which
170-contains a notice placed by the copyright holder or other authorized
171-party saying it may be distributed under the terms of this Library
172-General Public License (also called "this License"). Each licensee is
173-addressed as "you".
174-
175- A "library" means a collection of software functions and/or data
176-prepared so as to be conveniently linked with application programs
177-(which use some of those functions and data) to form executables.
178-
179- The "Library", below, refers to any such software library or work
180-which has been distributed under these terms. A "work based on the
181-Library" means either the Library or any derivative work under
182-copyright law: that is to say, a work containing the Library or a
183-portion of it, either verbatim or with modifications and/or translated
184-straightforwardly into another language. (Hereinafter, translation is
185-included without limitation in the term "modification".)
186-
187- "Source code" for a work means the preferred form of the work for
188-making modifications to it. For a library, complete source code means
189-all the source code for all modules it contains, plus any associated
190-interface definition files, plus the scripts used to control compilation
191-and installation of the library.
192-
193- Activities other than copying, distribution and modification are not
194-covered by this License; they are outside its scope. The act of
195-running a program using the Library is not restricted, and output from
196-such a program is covered only if its contents constitute a work based
197-on the Library (independent of the use of the Library in a tool for
198-writing it). Whether that is true depends on what the Library does
199-and what the program that uses the Library does.
200-
201- 1. You may copy and distribute verbatim copies of the Library's
202-complete source code as you receive it, in any medium, provided that
203-you conspicuously and appropriately publish on each copy an
204-appropriate copyright notice and disclaimer of warranty; keep intact
205-all the notices that refer to this License and to the absence of any
206-warranty; and distribute a copy of this License along with the
207-Library.
208-
209- You may charge a fee for the physical act of transferring a copy,
210-and you may at your option offer warranty protection in exchange for a
211-fee.
212-
213
214- 2. You may modify your copy or copies of the Library or any portion
215-of it, thus forming a work based on the Library, and copy and
216-distribute such modifications or work under the terms of Section 1
217-above, provided that you also meet all of these conditions:
218-
219- a) The modified work must itself be a software library.
220-
221- b) You must cause the files modified to carry prominent notices
222- stating that you changed the files and the date of any change.
223-
224- c) You must cause the whole of the work to be licensed at no
225- charge to all third parties under the terms of this License.
226-
227- d) If a facility in the modified Library refers to a function or a
228- table of data to be supplied by an application program that uses
229- the facility, other than as an argument passed when the facility
230- is invoked, then you must make a good faith effort to ensure that,
231- in the event an application does not supply such function or
232- table, the facility still operates, and performs whatever part of
233- its purpose remains meaningful.
234-
235- (For example, a function in a library to compute square roots has
236- a purpose that is entirely well-defined independent of the
237- application. Therefore, Subsection 2d requires that any
238- application-supplied function or table used by this function must
239- be optional: if the application does not supply it, the square
240- root function must still compute square roots.)
241-
242-These requirements apply to the modified work as a whole. If
243-identifiable sections of that work are not derived from the Library,
244-and can be reasonably considered independent and separate works in
245-themselves, then this License, and its terms, do not apply to those
246-sections when you distribute them as separate works. But when you
247-distribute the same sections as part of a whole which is a work based
248-on the Library, the distribution of the whole must be on the terms of
249-this License, whose permissions for other licensees extend to the
250-entire whole, and thus to each and every part regardless of who wrote
251-it.
252-
253-Thus, it is not the intent of this section to claim rights or contest
254-your rights to work written entirely by you; rather, the intent is to
255-exercise the right to control the distribution of derivative or
256-collective works based on the Library.
257-
258-In addition, mere aggregation of another work not based on the Library
259-with the Library (or with a work based on the Library) on a volume of
260-a storage or distribution medium does not bring the other work under
261-the scope of this License.
262-
263- 3. You may opt to apply the terms of the ordinary GNU General Public
264-License instead of this License to a given copy of the Library. To do
265-this, you must alter all the notices that refer to this License, so
266-that they refer to the ordinary GNU General Public License, version 2,
267-instead of to this License. (If a newer version than version 2 of the
268-ordinary GNU General Public License has appeared, then you can specify
269-that version instead if you wish.) Do not make any other change in
270-these notices.
271-
272
273- Once this change is made in a given copy, it is irreversible for
274-that copy, so the ordinary GNU General Public License applies to all
275-subsequent copies and derivative works made from that copy.
276-
277- This option is useful when you wish to copy part of the code of
278-the Library into a program that is not a library.
279-
280- 4. You may copy and distribute the Library (or a portion or
281-derivative of it, under Section 2) in object code or executable form
282-under the terms of Sections 1 and 2 above provided that you accompany
283-it with the complete corresponding machine-readable source code, which
284-must be distributed under the terms of Sections 1 and 2 above on a
285-medium customarily used for software interchange.
286-
287- If distribution of object code is made by offering access to copy
288-from a designated place, then offering equivalent access to copy the
289-source code from the same place satisfies the requirement to
290-distribute the source code, even though third parties are not
291-compelled to copy the source along with the object code.
292-
293- 5. A program that contains no derivative of any portion of the
294-Library, but is designed to work with the Library by being compiled or
295-linked with it, is called a "work that uses the Library". Such a
296-work, in isolation, is not a derivative work of the Library, and
297-therefore falls outside the scope of this License.
298-
299- However, linking a "work that uses the Library" with the Library
300-creates an executable that is a derivative of the Library (because it
301-contains portions of the Library), rather than a "work that uses the
302-library". The executable is therefore covered by this License.
303-Section 6 states terms for distribution of such executables.
304-
305- When a "work that uses the Library" uses material from a header file
306-that is part of the Library, the object code for the work may be a
307-derivative work of the Library even though the source code is not.
308-Whether this is true is especially significant if the work can be
309-linked without the Library, or if the work is itself a library. The
310-threshold for this to be true is not precisely defined by law.
311-
312- If such an object file uses only numerical parameters, data
313-structure layouts and accessors, and small macros and small inline
314-functions (ten lines or less in length), then the use of the object
315-file is unrestricted, regardless of whether it is legally a derivative
316-work. (Executables containing this object code plus portions of the
317-Library will still fall under Section 6.)
318-
319- Otherwise, if the work is a derivative of the Library, you may
320-distribute the object code for the work under the terms of Section 6.
321-Any executables containing that work also fall under Section 6,
322-whether or not they are linked directly with the Library itself.
323-
324
325- 6. As an exception to the Sections above, you may also compile or
326-link a "work that uses the Library" with the Library to produce a
327-work containing portions of the Library, and distribute that work
328-under terms of your choice, provided that the terms permit
329-modification of the work for the customer's own use and reverse
330-engineering for debugging such modifications.
331-
332- You must give prominent notice with each copy of the work that the
333-Library is used in it and that the Library and its use are covered by
334-this License. You must supply a copy of this License. If the work
335-during execution displays copyright notices, you must include the
336-copyright notice for the Library among them, as well as a reference
337-directing the user to the copy of this License. Also, you must do one
338-of these things:
339-
340- a) Accompany the work with the complete corresponding
341- machine-readable source code for the Library including whatever
342- changes were used in the work (which must be distributed under
343- Sections 1 and 2 above); and, if the work is an executable linked
344- with the Library, with the complete machine-readable "work that
345- uses the Library", as object code and/or source code, so that the
346- user can modify the Library and then relink to produce a modified
347- executable containing the modified Library. (It is understood
348- that the user who changes the contents of definitions files in the
349- Library will not necessarily be able to recompile the application
350- to use the modified definitions.)
351-
352- b) Accompany the work with a written offer, valid for at
353- least three years, to give the same user the materials
354- specified in Subsection 6a, above, for a charge no more
355- than the cost of performing this distribution.
356-
357- c) If distribution of the work is made by offering access to copy
358- from a designated place, offer equivalent access to copy the above
359- specified materials from the same place.
360-
361- d) Verify that the user has already received a copy of these
362- materials or that you have already sent this user a copy.
363-
364- For an executable, the required form of the "work that uses the
365-Library" must include any data and utility programs needed for
366-reproducing the executable from it. However, as a special exception,
367-the source code distributed need not include anything that is normally
368-distributed (in either source or binary form) with the major
369-components (compiler, kernel, and so on) of the operating system on
370-which the executable runs, unless that component itself accompanies
371-the executable.
372-
373- It may happen that this requirement contradicts the license
374-restrictions of other proprietary libraries that do not normally
375-accompany the operating system. Such a contradiction means you cannot
376-use both them and the Library together in an executable that you
377-distribute.
378-
379
380- 7. You may place library facilities that are a work based on the
381-Library side-by-side in a single library together with other library
382-facilities not covered by this License, and distribute such a combined
383-library, provided that the separate distribution of the work based on
384-the Library and of the other library facilities is otherwise
385-permitted, and provided that you do these two things:
386-
387- a) Accompany the combined library with a copy of the same work
388- based on the Library, uncombined with any other library
389- facilities. This must be distributed under the terms of the
390- Sections above.
391-
392- b) Give prominent notice with the combined library of the fact
393- that part of it is a work based on the Library, and explaining
394- where to find the accompanying uncombined form of the same work.
395-
396- 8. You may not copy, modify, sublicense, link with, or distribute
397-the Library except as expressly provided under this License. Any
398-attempt otherwise to copy, modify, sublicense, link with, or
399-distribute the Library is void, and will automatically terminate your
400-rights under this License. However, parties who have received copies,
401-or rights, from you under this License will not have their licenses
402-terminated so long as such parties remain in full compliance.
403-
404- 9. You are not required to accept this License, since you have not
405-signed it. However, nothing else grants you permission to modify or
406-distribute the Library or its derivative works. These actions are
407-prohibited by law if you do not accept this License. Therefore, by
408-modifying or distributing the Library (or any work based on the
409-Library), you indicate your acceptance of this License to do so, and
410-all its terms and conditions for copying, distributing or modifying
411-the Library or works based on it.
412-
413- 10. Each time you redistribute the Library (or any work based on the
414-Library), the recipient automatically receives a license from the
415-original licensor to copy, distribute, link with or modify the Library
416-subject to these terms and conditions. You may not impose any further
417-restrictions on the recipients' exercise of the rights granted herein.
418-You are not responsible for enforcing compliance by third parties to
419+modification follow.
420+
421+ TERMS AND CONDITIONS
422+
423+ 0. Definitions.
424+
425+ "This License" refers to version 3 of the GNU General Public License.
426+
427+ "Copyright" also means copyright-like laws that apply to other kinds of
428+works, such as semiconductor masks.
429+
430+ "The Program" refers to any copyrightable work licensed under this
431+License. Each licensee is addressed as "you". "Licensees" and
432+"recipients" may be individuals or organizations.
433+
434+ To "modify" a work means to copy from or adapt all or part of the work
435+in a fashion requiring copyright permission, other than the making of an
436+exact copy. The resulting work is called a "modified version" of the
437+earlier work or a work "based on" the earlier work.
438+
439+ A "covered work" means either the unmodified Program or a work based
440+on the Program.
441+
442+ To "propagate" a work means to do anything with it that, without
443+permission, would make you directly or secondarily liable for
444+infringement under applicable copyright law, except executing it on a
445+computer or modifying a private copy. Propagation includes copying,
446+distribution (with or without modification), making available to the
447+public, and in some countries other activities as well.
448+
449+ To "convey" a work means any kind of propagation that enables other
450+parties to make or receive copies. Mere interaction with a user through
451+a computer network, with no transfer of a copy, is not conveying.
452+
453+ An interactive user interface displays "Appropriate Legal Notices"
454+to the extent that it includes a convenient and prominently visible
455+feature that (1) displays an appropriate copyright notice, and (2)
456+tells the user that there is no warranty for the work (except to the
457+extent that warranties are provided), that licensees may convey the
458+work under this License, and how to view a copy of this License. If
459+the interface presents a list of user commands or options, such as a
460+menu, a prominent item in the list meets this criterion.
461+
462+ 1. Source Code.
463+
464+ The "source code" for a work means the preferred form of the work
465+for making modifications to it. "Object code" means any non-source
466+form of a work.
467+
468+ A "Standard Interface" means an interface that either is an official
469+standard defined by a recognized standards body, or, in the case of
470+interfaces specified for a particular programming language, one that
471+is widely used among developers working in that language.
472+
473+ The "System Libraries" of an executable work include anything, other
474+than the work as a whole, that (a) is included in the normal form of
475+packaging a Major Component, but which is not part of that Major
476+Component, and (b) serves only to enable use of the work with that
477+Major Component, or to implement a Standard Interface for which an
478+implementation is available to the public in source code form. A
479+"Major Component", in this context, means a major essential component
480+(kernel, window system, and so on) of the specific operating system
481+(if any) on which the executable work runs, or a compiler used to
482+produce the work, or an object code interpreter used to run it.
483+
484+ The "Corresponding Source" for a work in object code form means all
485+the source code needed to generate, install, and (for an executable
486+work) run the object code and to modify the work, including scripts to
487+control those activities. However, it does not include the work's
488+System Libraries, or general-purpose tools or generally available free
489+programs which are used unmodified in performing those activities but
490+which are not part of the work. For example, Corresponding Source
491+includes interface definition files associated with source files for
492+the work, and the source code for shared libraries and dynamically
493+linked subprograms that the work is specifically designed to require,
494+such as by intimate data communication or control flow between those
495+subprograms and other parts of the work.
496+
497+ The Corresponding Source need not include anything that users
498+can regenerate automatically from other parts of the Corresponding
499+Source.
500+
501+ The Corresponding Source for a work in source code form is that
502+same work.
503+
504+ 2. Basic Permissions.
505+
506+ All rights granted under this License are granted for the term of
507+copyright on the Program, and are irrevocable provided the stated
508+conditions are met. This License explicitly affirms your unlimited
509+permission to run the unmodified Program. The output from running a
510+covered work is covered by this License only if the output, given its
511+content, constitutes a covered work. This License acknowledges your
512+rights of fair use or other equivalent, as provided by copyright law.
513+
514+ You may make, run and propagate covered works that you do not
515+convey, without conditions so long as your license otherwise remains
516+in force. You may convey covered works to others for the sole purpose
517+of having them make modifications exclusively for you, or provide you
518+with facilities for running those works, provided that you comply with
519+the terms of this License in conveying all material for which you do
520+not control copyright. Those thus making or running the covered works
521+for you must do so exclusively on your behalf, under your direction
522+and control, on terms that prohibit them from making any copies of
523+your copyrighted material outside their relationship with you.
524+
525+ Conveying under any other circumstances is permitted solely under
526+the conditions stated below. Sublicensing is not allowed; section 10
527+makes it unnecessary.
528+
529+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
530+
531+ No covered work shall be deemed part of an effective technological
532+measure under any applicable law fulfilling obligations under article
533+11 of the WIPO copyright treaty adopted on 20 December 1996, or
534+similar laws prohibiting or restricting circumvention of such
535+measures.
536+
537+ When you convey a covered work, you waive any legal power to forbid
538+circumvention of technological measures to the extent such circumvention
539+is effected by exercising rights under this License with respect to
540+the covered work, and you disclaim any intention to limit operation or
541+modification of the work as a means of enforcing, against the work's
542+users, your or third parties' legal rights to forbid circumvention of
543+technological measures.
544+
545+ 4. Conveying Verbatim Copies.
546+
547+ You may convey verbatim copies of the Program's source code as you
548+receive it, in any medium, provided that you conspicuously and
549+appropriately publish on each copy an appropriate copyright notice;
550+keep intact all notices stating that this License and any
551+non-permissive terms added in accord with section 7 apply to the code;
552+keep intact all notices of the absence of any warranty; and give all
553+recipients a copy of this License along with the Program.
554+
555+ You may charge any price or no price for each copy that you convey,
556+and you may offer support or warranty protection for a fee.
557+
558+ 5. Conveying Modified Source Versions.
559+
560+ You may convey a work based on the Program, or the modifications to
561+produce it from the Program, in the form of source code under the
562+terms of section 4, provided that you also meet all of these conditions:
563+
564+ a) The work must carry prominent notices stating that you modified
565+ it, and giving a relevant date.
566+
567+ b) The work must carry prominent notices stating that it is
568+ released under this License and any conditions added under section
569+ 7. This requirement modifies the requirement in section 4 to
570+ "keep intact all notices".
571+
572+ c) You must license the entire work, as a whole, under this
573+ License to anyone who comes into possession of a copy. This
574+ License will therefore apply, along with any applicable section 7
575+ additional terms, to the whole of the work, and all its parts,
576+ regardless of how they are packaged. This License gives no
577+ permission to license the work in any other way, but it does not
578+ invalidate such permission if you have separately received it.
579+
580+ d) If the work has interactive user interfaces, each must display
581+ Appropriate Legal Notices; however, if the Program has interactive
582+ interfaces that do not display Appropriate Legal Notices, your
583+ work need not make them do so.
584+
585+ A compilation of a covered work with other separate and independent
586+works, which are not by their nature extensions of the covered work,
587+and which are not combined with it such as to form a larger program,
588+in or on a volume of a storage or distribution medium, is called an
589+"aggregate" if the compilation and its resulting copyright are not
590+used to limit the access or legal rights of the compilation's users
591+beyond what the individual works permit. Inclusion of a covered work
592+in an aggregate does not cause this License to apply to the other
593+parts of the aggregate.
594+
595+ 6. Conveying Non-Source Forms.
596+
597+ You may convey a covered work in object code form under the terms
598+of sections 4 and 5, provided that you also convey the
599+machine-readable Corresponding Source under the terms of this License,
600+in one of these ways:
601+
602+ a) Convey the object code in, or embodied in, a physical product
603+ (including a physical distribution medium), accompanied by the
604+ Corresponding Source fixed on a durable physical medium
605+ customarily used for software interchange.
606+
607+ b) Convey the object code in, or embodied in, a physical product
608+ (including a physical distribution medium), accompanied by a
609+ written offer, valid for at least three years and valid for as
610+ long as you offer spare parts or customer support for that product
611+ model, to give anyone who possesses the object code either (1) a
612+ copy of the Corresponding Source for all the software in the
613+ product that is covered by this License, on a durable physical
614+ medium customarily used for software interchange, for a price no
615+ more than your reasonable cost of physically performing this
616+ conveying of source, or (2) access to copy the
617+ Corresponding Source from a network server at no charge.
618+
619+ c) Convey individual copies of the object code with a copy of the
620+ written offer to provide the Corresponding Source. This
621+ alternative is allowed only occasionally and noncommercially, and
622+ only if you received the object code with such an offer, in accord
623+ with subsection 6b.
624+
625+ d) Convey the object code by offering access from a designated
626+ place (gratis or for a charge), and offer equivalent access to the
627+ Corresponding Source in the same way through the same place at no
628+ further charge. You need not require recipients to copy the
629+ Corresponding Source along with the object code. If the place to
630+ copy the object code is a network server, the Corresponding Source
631+ may be on a different server (operated by you or a third party)
632+ that supports equivalent copying facilities, provided you maintain
633+ clear directions next to the object code saying where to find the
634+ Corresponding Source. Regardless of what server hosts the
635+ Corresponding Source, you remain obligated to ensure that it is
636+ available for as long as needed to satisfy these requirements.
637+
638+ e) Convey the object code using peer-to-peer transmission, provided
639+ you inform other peers where the object code and Corresponding
640+ Source of the work are being offered to the general public at no
641+ charge under subsection 6d.
642+
643+ A separable portion of the object code, whose source code is excluded
644+from the Corresponding Source as a System Library, need not be
645+included in conveying the object code work.
646+
647+ A "User Product" is either (1) a "consumer product", which means any
648+tangible personal property which is normally used for personal, family,
649+or household purposes, or (2) anything designed or sold for incorporation
650+into a dwelling. In determining whether a product is a consumer product,
651+doubtful cases shall be resolved in favor of coverage. For a particular
652+product received by a particular user, "normally used" refers to a
653+typical or common use of that class of product, regardless of the status
654+of the particular user or of the way in which the particular user
655+actually uses, or expects or is expected to use, the product. A product
656+is a consumer product regardless of whether the product has substantial
657+commercial, industrial or non-consumer uses, unless such uses represent
658+the only significant mode of use of the product.
659+
660+ "Installation Information" for a User Product means any methods,
661+procedures, authorization keys, or other information required to install
662+and execute modified versions of a covered work in that User Product from
663+a modified version of its Corresponding Source. The information must
664+suffice to ensure that the continued functioning of the modified object
665+code is in no case prevented or interfered with solely because
666+modification has been made.
667+
668+ If you convey an object code work under this section in, or with, or
669+specifically for use in, a User Product, and the conveying occurs as
670+part of a transaction in which the right of possession and use of the
671+User Product is transferred to the recipient in perpetuity or for a
672+fixed term (regardless of how the transaction is characterized), the
673+Corresponding Source conveyed under this section must be accompanied
674+by the Installation Information. But this requirement does not apply
675+if neither you nor any third party retains the ability to install
676+modified object code on the User Product (for example, the work has
677+been installed in ROM).
678+
679+ The requirement to provide Installation Information does not include a
680+requirement to continue to provide support service, warranty, or updates
681+for a work that has been modified or installed by the recipient, or for
682+the User Product in which it has been modified or installed. Access to a
683+network may be denied when the modification itself materially and
684+adversely affects the operation of the network or violates the rules and
685+protocols for communication across the network.
686+
687+ Corresponding Source conveyed, and Installation Information provided,
688+in accord with this section must be in a format that is publicly
689+documented (and with an implementation available to the public in
690+source code form), and must require no special password or key for
691+unpacking, reading or copying.
692+
693+ 7. Additional Terms.
694+
695+ "Additional permissions" are terms that supplement the terms of this
696+License by making exceptions from one or more of its conditions.
697+Additional permissions that are applicable to the entire Program shall
698+be treated as though they were included in this License, to the extent
699+that they are valid under applicable law. If additional permissions
700+apply only to part of the Program, that part may be used separately
701+under those permissions, but the entire Program remains governed by
702+this License without regard to the additional permissions.
703+
704+ When you convey a copy of a covered work, you may at your option
705+remove any additional permissions from that copy, or from any part of
706+it. (Additional permissions may be written to require their own
707+removal in certain cases when you modify the work.) You may place
708+additional permissions on material, added by you to a covered work,
709+for which you have or can give appropriate copyright permission.
710+
711+ Notwithstanding any other provision of this License, for material you
712+add to a covered work, you may (if authorized by the copyright holders of
713+that material) supplement the terms of this License with terms:
714+
715+ a) Disclaiming warranty or limiting liability differently from the
716+ terms of sections 15 and 16 of this License; or
717+
718+ b) Requiring preservation of specified reasonable legal notices or
719+ author attributions in that material or in the Appropriate Legal
720+ Notices displayed by works containing it; or
721+
722+ c) Prohibiting misrepresentation of the origin of that material, or
723+ requiring that modified versions of such material be marked in
724+ reasonable ways as different from the original version; or
725+
726+ d) Limiting the use for publicity purposes of names of licensors or
727+ authors of the material; or
728+
729+ e) Declining to grant rights under trademark law for use of some
730+ trade names, trademarks, or service marks; or
731+
732+ f) Requiring indemnification of licensors and authors of that
733+ material by anyone who conveys the material (or modified versions of
734+ it) with contractual assumptions of liability to the recipient, for
735+ any liability that these contractual assumptions directly impose on
736+ those licensors and authors.
737+
738+ All other non-permissive additional terms are considered "further
739+restrictions" within the meaning of section 10. If the Program as you
740+received it, or any part of it, contains a notice stating that it is
741+governed by this License along with a term that is a further
742+restriction, you may remove that term. If a license document contains
743+a further restriction but permits relicensing or conveying under this
744+License, you may add to a covered work material governed by the terms
745+of that license document, provided that the further restriction does
746+not survive such relicensing or conveying.
747+
748+ If you add terms to a covered work in accord with this section, you
749+must place, in the relevant source files, a statement of the
750+additional terms that apply to those files, or a notice indicating
751+where to find the applicable terms.
752+
753+ Additional terms, permissive or non-permissive, may be stated in the
754+form of a separately written license, or stated as exceptions;
755+the above requirements apply either way.
756+
757+ 8. Termination.
758+
759+ You may not propagate or modify a covered work except as expressly
760+provided under this License. Any attempt otherwise to propagate or
761+modify it is void, and will automatically terminate your rights under
762+this License (including any patent licenses granted under the third
763+paragraph of section 11).
764+
765+ However, if you cease all violation of this License, then your
766+license from a particular copyright holder is reinstated (a)
767+provisionally, unless and until the copyright holder explicitly and
768+finally terminates your license, and (b) permanently, if the copyright
769+holder fails to notify you of the violation by some reasonable means
770+prior to 60 days after the cessation.
771+
772+ Moreover, your license from a particular copyright holder is
773+reinstated permanently if the copyright holder notifies you of the
774+violation by some reasonable means, this is the first time you have
775+received notice of violation of this License (for any work) from that
776+copyright holder, and you cure the violation prior to 30 days after
777+your receipt of the notice.
778+
779+ Termination of your rights under this section does not terminate the
780+licenses of parties who have received copies or rights from you under
781+this License. If your rights have been terminated and not permanently
782+reinstated, you do not qualify to receive new licenses for the same
783+material under section 10.
784+
785+ 9. Acceptance Not Required for Having Copies.
786+
787+ You are not required to accept this License in order to receive or
788+run a copy of the Program. Ancillary propagation of a covered work
789+occurring solely as a consequence of using peer-to-peer transmission
790+to receive a copy likewise does not require acceptance. However,
791+nothing other than this License grants you permission to propagate or
792+modify any covered work. These actions infringe copyright if you do
793+not accept this License. Therefore, by modifying or propagating a
794+covered work, you indicate your acceptance of this License to do so.
795+
796+ 10. Automatic Licensing of Downstream Recipients.
797+
798+ Each time you convey a covered work, the recipient automatically
799+receives a license from the original licensors, to run, modify and
800+propagate that work, subject to this License. You are not responsible
801+for enforcing compliance by third parties with this License.
802+
803+ An "entity transaction" is a transaction transferring control of an
804+organization, or substantially all assets of one, or subdividing an
805+organization, or merging organizations. If propagation of a covered
806+work results from an entity transaction, each party to that
807+transaction who receives a copy of the work also receives whatever
808+licenses to the work the party's predecessor in interest had or could
809+give under the previous paragraph, plus a right to possession of the
810+Corresponding Source of the work from the predecessor in interest, if
811+the predecessor has it or can get it with reasonable efforts.
812+
813+ You may not impose any further restrictions on the exercise of the
814+rights granted or affirmed under this License. For example, you may
815+not impose a license fee, royalty, or other charge for exercise of
816+rights granted under this License, and you may not initiate litigation
817+(including a cross-claim or counterclaim in a lawsuit) alleging that
818+any patent claim is infringed by making, using, selling, offering for
819+sale, or importing the Program or any portion of it.
820+
821+ 11. Patents.
822+
823+ A "contributor" is a copyright holder who authorizes use under this
824+License of the Program or a work on which the Program is based. The
825+work thus licensed is called the contributor's "contributor version".
826+
827+ A contributor's "essential patent claims" are all patent claims
828+owned or controlled by the contributor, whether already acquired or
829+hereafter acquired, that would be infringed by some manner, permitted
830+by this License, of making, using, or selling its contributor version,
831+but do not include claims that would be infringed only as a
832+consequence of further modification of the contributor version. For
833+purposes of this definition, "control" includes the right to grant
834+patent sublicenses in a manner consistent with the requirements of
835 this License.
836-
837
838- 11. If, as a consequence of a court judgment or allegation of patent
839-infringement or for any other reason (not limited to patent issues),
840-conditions are imposed on you (whether by court order, agreement or
841+
842+ Each contributor grants you a non-exclusive, worldwide, royalty-free
843+patent license under the contributor's essential patent claims, to
844+make, use, sell, offer for sale, import and otherwise run, modify and
845+propagate the contents of its contributor version.
846+
847+ In the following three paragraphs, a "patent license" is any express
848+agreement or commitment, however denominated, not to enforce a patent
849+(such as an express permission to practice a patent or covenant not to
850+sue for patent infringement). To "grant" such a patent license to a
851+party means to make such an agreement or commitment not to enforce a
852+patent against the party.
853+
854+ If you convey a covered work, knowingly relying on a patent license,
855+and the Corresponding Source of the work is not available for anyone
856+to copy, free of charge and under the terms of this License, through a
857+publicly available network server or other readily accessible means,
858+then you must either (1) cause the Corresponding Source to be so
859+available, or (2) arrange to deprive yourself of the benefit of the
860+patent license for this particular work, or (3) arrange, in a manner
861+consistent with the requirements of this License, to extend the patent
862+license to downstream recipients. "Knowingly relying" means you have
863+actual knowledge that, but for the patent license, your conveying the
864+covered work in a country, or your recipient's use of the covered work
865+in a country, would infringe one or more identifiable patents in that
866+country that you have reason to believe are valid.
867+
868+ If, pursuant to or in connection with a single transaction or
869+arrangement, you convey, or propagate by procuring conveyance of, a
870+covered work, and grant a patent license to some of the parties
871+receiving the covered work authorizing them to use, propagate, modify
872+or convey a specific copy of the covered work, then the patent license
873+you grant is automatically extended to all recipients of the covered
874+work and works based on it.
875+
876+ A patent license is "discriminatory" if it does not include within
877+the scope of its coverage, prohibits the exercise of, or is
878+conditioned on the non-exercise of one or more of the rights that are
879+specifically granted under this License. You may not convey a covered
880+work if you are a party to an arrangement with a third party that is
881+in the business of distributing software, under which you make payment
882+to the third party based on the extent of your activity of conveying
883+the work, and under which the third party grants, to any of the
884+parties who would receive the covered work from you, a discriminatory
885+patent license (a) in connection with copies of the covered work
886+conveyed by you (or copies made from those copies), or (b) primarily
887+for and in connection with specific products or compilations that
888+contain the covered work, unless you entered into that arrangement,
889+or that patent license was granted, prior to 28 March 2007.
890+
891+ Nothing in this License shall be construed as excluding or limiting
892+any implied license or other defenses to infringement that may
893+otherwise be available to you under applicable patent law.
894+
895+ 12. No Surrender of Others' Freedom.
896+
897+ If conditions are imposed on you (whether by court order, agreement or
898 otherwise) that contradict the conditions of this License, they do not
899-excuse you from the conditions of this License. If you cannot
900-distribute so as to satisfy simultaneously your obligations under this
901-License and any other pertinent obligations, then as a consequence you
902-may not distribute the Library at all. For example, if a patent
903-license would not permit royalty-free redistribution of the Library by
904-all those who receive copies directly or indirectly through you, then
905-the only way you could satisfy both it and this License would be to
906-refrain entirely from distribution of the Library.
907-
908-If any portion of this section is held invalid or unenforceable under any
909-particular circumstance, the balance of the section is intended to apply,
910-and the section as a whole is intended to apply in other circumstances.
911-
912-It is not the purpose of this section to induce you to infringe any
913-patents or other property right claims or to contest validity of any
914-such claims; this section has the sole purpose of protecting the
915-integrity of the free software distribution system which is
916-implemented by public license practices. Many people have made
917-generous contributions to the wide range of software distributed
918-through that system in reliance on consistent application of that
919-system; it is up to the author/donor to decide if he or she is willing
920-to distribute software through any other system and a licensee cannot
921-impose that choice.
922-
923-This section is intended to make thoroughly clear what is believed to
924-be a consequence of the rest of this License.
925-
926- 12. If the distribution and/or use of the Library is restricted in
927-certain countries either by patents or by copyrighted interfaces, the
928-original copyright holder who places the Library under this License may add
929-an explicit geographical distribution limitation excluding those countries,
930-so that distribution is permitted only in or among countries not thus
931-excluded. In such case, this License incorporates the limitation as if
932-written in the body of this License.
933-
934- 13. The Free Software Foundation may publish revised and/or new
935-versions of the Library General Public License from time to time.
936-Such new versions will be similar in spirit to the present version,
937-but may differ in detail to address new problems or concerns.
938-
939-Each version is given a distinguishing version number. If the Library
940-specifies a version number of this License which applies to it and
941-"any later version", you have the option of following the terms and
942-conditions either of that version or of any later version published by
943-the Free Software Foundation. If the Library does not specify a
944-license version number, you may choose any version ever published by
945-the Free Software Foundation.
946-
947
948- 14. If you wish to incorporate parts of the Library into other free
949-programs whose distribution conditions are incompatible with these,
950-write to the author to ask for permission. For software which is
951-copyrighted by the Free Software Foundation, write to the Free
952-Software Foundation; we sometimes make exceptions for this. Our
953-decision will be guided by the two goals of preserving the free status
954-of all derivatives of our free software and of promoting the sharing
955-and reuse of software generally.
956-
957- NO WARRANTY
958-
959- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
960-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
961-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
962-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
963-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
964-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
965-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
966-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
967-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
968-
969- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
970-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
971-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
972-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
973-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
974-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
975-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
976-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
977-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
978-DAMAGES.
979-
980- END OF TERMS AND CONDITIONS
981-
982
983- How to Apply These Terms to Your New Libraries
984-
985- If you develop a new library, and you want it to be of the greatest
986-possible use to the public, we recommend making it free software that
987-everyone can redistribute and change. You can do so by permitting
988-redistribution under these terms (or, alternatively, under the terms of the
989-ordinary General Public License).
990-
991- To apply these terms, attach the following notices to the library. It is
992-safest to attach them to the start of each source file to most effectively
993-convey the exclusion of warranty; and each file should have at least the
994-"copyright" line and a pointer to where the full notice is found.
995-
996- <one line to give the library's name and a brief idea of what it does.>
997+excuse you from the conditions of this License. If you cannot convey a
998+covered work so as to satisfy simultaneously your obligations under this
999+License and any other pertinent obligations, then as a consequence you may
1000+not convey it at all. For example, if you agree to terms that obligate you
1001+to collect a royalty for further conveying from those to whom you convey
1002+the Program, the only way you could satisfy both those terms and this
1003+License would be to refrain entirely from conveying the Program.
1004+
1005+ 13. Use with the GNU Affero General Public License.
1006+
1007+ Notwithstanding any other provision of this License, you have
1008+permission to link or combine any covered work with a work licensed
1009+under version 3 of the GNU Affero General Public License into a single
1010+combined work, and to convey the resulting work. The terms of this
1011+License will continue to apply to the part which is the covered work,
1012+but the special requirements of the GNU Affero General Public License,
1013+section 13, concerning interaction through a network will apply to the
1014+combination as such.
1015+
1016+ 14. Revised Versions of this License.
1017+
1018+ The Free Software Foundation may publish revised and/or new versions of
1019+the GNU General Public License from time to time. Such new versions will
1020+be similar in spirit to the present version, but may differ in detail to
1021+address new problems or concerns.
1022+
1023+ Each version is given a distinguishing version number. If the
1024+Program specifies that a certain numbered version of the GNU General
1025+Public License "or any later version" applies to it, you have the
1026+option of following the terms and conditions either of that numbered
1027+version or of any later version published by the Free Software
1028+Foundation. If the Program does not specify a version number of the
1029+GNU General Public License, you may choose any version ever published
1030+by the Free Software Foundation.
1031+
1032+ If the Program specifies that a proxy can decide which future
1033+versions of the GNU General Public License can be used, that proxy's
1034+public statement of acceptance of a version permanently authorizes you
1035+to choose that version for the Program.
1036+
1037+ Later license versions may give you additional or different
1038+permissions. However, no additional obligations are imposed on any
1039+author or copyright holder as a result of your choosing to follow a
1040+later version.
1041+
1042+ 15. Disclaimer of Warranty.
1043+
1044+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
1045+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
1046+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
1047+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
1048+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1049+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
1050+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
1051+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
1052+
1053+ 16. Limitation of Liability.
1054+
1055+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
1056+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
1057+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
1058+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
1059+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
1060+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
1061+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
1062+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
1063+SUCH DAMAGES.
1064+
1065+ 17. Interpretation of Sections 15 and 16.
1066+
1067+ If the disclaimer of warranty and limitation of liability provided
1068+above cannot be given local legal effect according to their terms,
1069+reviewing courts shall apply local law that most closely approximates
1070+an absolute waiver of all civil liability in connection with the
1071+Program, unless a warranty or assumption of liability accompanies a
1072+copy of the Program in return for a fee.
1073+
1074+ END OF TERMS AND CONDITIONS
1075+
1076+ How to Apply These Terms to Your New Programs
1077+
1078+ If you develop a new program, and you want it to be of the greatest
1079+possible use to the public, the best way to achieve this is to make it
1080+free software which everyone can redistribute and change under these terms.
1081+
1082+ To do so, attach the following notices to the program. It is safest
1083+to attach them to the start of each source file to most effectively
1084+state the exclusion of warranty; and each file should have at least
1085+the "copyright" line and a pointer to where the full notice is found.
1086+
1087+ <one line to give the program's name and a brief idea of what it does.>
1088 Copyright (C) <year> <name of author>
1089
1090- This library is free software; you can redistribute it and/or
1091- modify it under the terms of the GNU Library General Public
1092- License as published by the Free Software Foundation; either
1093- version 2 of the License, or (at your option) any later version.
1094+ This program is free software: you can redistribute it and/or modify
1095+ it under the terms of the GNU General Public License as published by
1096+ the Free Software Foundation, either version 3 of the License, or
1097+ (at your option) any later version.
1098
1099- This library is distributed in the hope that it will be useful,
1100+ This program is distributed in the hope that it will be useful,
1101 but WITHOUT ANY WARRANTY; without even the implied warranty of
1102- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1103- Library General Public License for more details.
1104+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1105+ GNU General Public License for more details.
1106
1107- You should have received a copy of the GNU Library General Public
1108- License along with this library; if not, write to the Free Software
1109- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
1110+ You should have received a copy of the GNU General Public License
1111+ along with this program. If not, see <http://www.gnu.org/licenses/>.
1112
1113 Also add information on how to contact you by electronic and paper mail.
1114
1115-You should also get your employer (if you work as a programmer) or your
1116-school, if any, to sign a "copyright disclaimer" for the library, if
1117-necessary. Here is a sample; alter the names:
1118-
1119- Yoyodyne, Inc., hereby disclaims all copyright interest in the
1120- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
1121-
1122- <signature of Ty Coon>, 1 April 1990
1123- Ty Coon, President of Vice
1124-
1125-That's all there is to it!
1126+ If the program does terminal interaction, make it output a short
1127+notice like this when it starts in an interactive mode:
1128+
1129+ <program> Copyright (C) <year> <name of author>
1130+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
1131+ This is free software, and you are welcome to redistribute it
1132+ under certain conditions; type `show c' for details.
1133+
1134+The hypothetical commands `show w' and `show c' should show the appropriate
1135+parts of the General Public License. Of course, your program's commands
1136+might be different; for a GUI interface, you would use an "about box".
1137+
1138+ You should also get your employer (if you work as a programmer) or school,
1139+if any, to sign a "copyright disclaimer" for the program, if necessary.
1140+For more information on this, and how to apply and follow the GNU GPL, see
1141+<http://www.gnu.org/licenses/>.
1142+
1143+ The GNU General Public License does not permit incorporating your program
1144+into proprietary programs. If your program is a subroutine library, you
1145+may consider it more useful to permit linking proprietary applications with
1146+the library. If this is what you want to do, use the GNU Lesser General
1147+Public License instead of this License. But first, please read
1148+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
1149
1150=== removed file 'COPYING.GPL'
1151--- COPYING.GPL 2010-02-16 23:12:12 +0000
1152+++ COPYING.GPL 1970-01-01 00:00:00 +0000
1153@@ -1,339 +0,0 @@
1154- GNU GENERAL PUBLIC LICENSE
1155- Version 2, June 1991
1156-
1157- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
1158- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1159- Everyone is permitted to copy and distribute verbatim copies
1160- of this license document, but changing it is not allowed.
1161-
1162- Preamble
1163-
1164- The licenses for most software are designed to take away your
1165-freedom to share and change it. By contrast, the GNU General Public
1166-License is intended to guarantee your freedom to share and change free
1167-software--to make sure the software is free for all its users. This
1168-General Public License applies to most of the Free Software
1169-Foundation's software and to any other program whose authors commit to
1170-using it. (Some other Free Software Foundation software is covered by
1171-the GNU Lesser General Public License instead.) You can apply it to
1172-your programs, too.
1173-
1174- When we speak of free software, we are referring to freedom, not
1175-price. Our General Public Licenses are designed to make sure that you
1176-have the freedom to distribute copies of free software (and charge for
1177-this service if you wish), that you receive source code or can get it
1178-if you want it, that you can change the software or use pieces of it
1179-in new free programs; and that you know you can do these things.
1180-
1181- To protect your rights, we need to make restrictions that forbid
1182-anyone to deny you these rights or to ask you to surrender the rights.
1183-These restrictions translate to certain responsibilities for you if you
1184-distribute copies of the software, or if you modify it.
1185-
1186- For example, if you distribute copies of such a program, whether
1187-gratis or for a fee, you must give the recipients all the rights that
1188-you have. You must make sure that they, too, receive or can get the
1189-source code. And you must show them these terms so they know their
1190-rights.
1191-
1192- We protect your rights with two steps: (1) copyright the software, and
1193-(2) offer you this license which gives you legal permission to copy,
1194-distribute and/or modify the software.
1195-
1196- Also, for each author's protection and ours, we want to make certain
1197-that everyone understands that there is no warranty for this free
1198-software. If the software is modified by someone else and passed on, we
1199-want its recipients to know that what they have is not the original, so
1200-that any problems introduced by others will not reflect on the original
1201-authors' reputations.
1202-
1203- Finally, any free program is threatened constantly by software
1204-patents. We wish to avoid the danger that redistributors of a free
1205-program will individually obtain patent licenses, in effect making the
1206-program proprietary. To prevent this, we have made it clear that any
1207-patent must be licensed for everyone's free use or not licensed at all.
1208-
1209- The precise terms and conditions for copying, distribution and
1210-modification follow.
1211-
1212- GNU GENERAL PUBLIC LICENSE
1213- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1214-
1215- 0. This License applies to any program or other work which contains
1216-a notice placed by the copyright holder saying it may be distributed
1217-under the terms of this General Public License. The "Program", below,
1218-refers to any such program or work, and a "work based on the Program"
1219-means either the Program or any derivative work under copyright law:
1220-that is to say, a work containing the Program or a portion of it,
1221-either verbatim or with modifications and/or translated into another
1222-language. (Hereinafter, translation is included without limitation in
1223-the term "modification".) Each licensee is addressed as "you".
1224-
1225-Activities other than copying, distribution and modification are not
1226-covered by this License; they are outside its scope. The act of
1227-running the Program is not restricted, and the output from the Program
1228-is covered only if its contents constitute a work based on the
1229-Program (independent of having been made by running the Program).
1230-Whether that is true depends on what the Program does.
1231-
1232- 1. You may copy and distribute verbatim copies of the Program's
1233-source code as you receive it, in any medium, provided that you
1234-conspicuously and appropriately publish on each copy an appropriate
1235-copyright notice and disclaimer of warranty; keep intact all the
1236-notices that refer to this License and to the absence of any warranty;
1237-and give any other recipients of the Program a copy of this License
1238-along with the Program.
1239-
1240-You may charge a fee for the physical act of transferring a copy, and
1241-you may at your option offer warranty protection in exchange for a fee.
1242-
1243- 2. You may modify your copy or copies of the Program or any portion
1244-of it, thus forming a work based on the Program, and copy and
1245-distribute such modifications or work under the terms of Section 1
1246-above, provided that you also meet all of these conditions:
1247-
1248- a) You must cause the modified files to carry prominent notices
1249- stating that you changed the files and the date of any change.
1250-
1251- b) You must cause any work that you distribute or publish, that in
1252- whole or in part contains or is derived from the Program or any
1253- part thereof, to be licensed as a whole at no charge to all third
1254- parties under the terms of this License.
1255-
1256- c) If the modified program normally reads commands interactively
1257- when run, you must cause it, when started running for such
1258- interactive use in the most ordinary way, to print or display an
1259- announcement including an appropriate copyright notice and a
1260- notice that there is no warranty (or else, saying that you provide
1261- a warranty) and that users may redistribute the program under
1262- these conditions, and telling the user how to view a copy of this
1263- License. (Exception: if the Program itself is interactive but
1264- does not normally print such an announcement, your work based on
1265- the Program is not required to print an announcement.)
1266-
1267-These requirements apply to the modified work as a whole. If
1268-identifiable sections of that work are not derived from the Program,
1269-and can be reasonably considered independent and separate works in
1270-themselves, then this License, and its terms, do not apply to those
1271-sections when you distribute them as separate works. But when you
1272-distribute the same sections as part of a whole which is a work based
1273-on the Program, the distribution of the whole must be on the terms of
1274-this License, whose permissions for other licensees extend to the
1275-entire whole, and thus to each and every part regardless of who wrote it.
1276-
1277-Thus, it is not the intent of this section to claim rights or contest
1278-your rights to work written entirely by you; rather, the intent is to
1279-exercise the right to control the distribution of derivative or
1280-collective works based on the Program.
1281-
1282-In addition, mere aggregation of another work not based on the Program
1283-with the Program (or with a work based on the Program) on a volume of
1284-a storage or distribution medium does not bring the other work under
1285-the scope of this License.
1286-
1287- 3. You may copy and distribute the Program (or a work based on it,
1288-under Section 2) in object code or executable form under the terms of
1289-Sections 1 and 2 above provided that you also do one of the following:
1290-
1291- a) Accompany it with the complete corresponding machine-readable
1292- source code, which must be distributed under the terms of Sections
1293- 1 and 2 above on a medium customarily used for software interchange; or,
1294-
1295- b) Accompany it with a written offer, valid for at least three
1296- years, to give any third party, for a charge no more than your
1297- cost of physically performing source distribution, a complete
1298- machine-readable copy of the corresponding source code, to be
1299- distributed under the terms of Sections 1 and 2 above on a medium
1300- customarily used for software interchange; or,
1301-
1302- c) Accompany it with the information you received as to the offer
1303- to distribute corresponding source code. (This alternative is
1304- allowed only for noncommercial distribution and only if you
1305- received the program in object code or executable form with such
1306- an offer, in accord with Subsection b above.)
1307-
1308-The source code for a work means the preferred form of the work for
1309-making modifications to it. For an executable work, complete source
1310-code means all the source code for all modules it contains, plus any
1311-associated interface definition files, plus the scripts used to
1312-control compilation and installation of the executable. However, as a
1313-special exception, the source code distributed need not include
1314-anything that is normally distributed (in either source or binary
1315-form) with the major components (compiler, kernel, and so on) of the
1316-operating system on which the executable runs, unless that component
1317-itself accompanies the executable.
1318-
1319-If distribution of executable or object code is made by offering
1320-access to copy from a designated place, then offering equivalent
1321-access to copy the source code from the same place counts as
1322-distribution of the source code, even though third parties are not
1323-compelled to copy the source along with the object code.
1324-
1325- 4. You may not copy, modify, sublicense, or distribute the Program
1326-except as expressly provided under this License. Any attempt
1327-otherwise to copy, modify, sublicense or distribute the Program is
1328-void, and will automatically terminate your rights under this License.
1329-However, parties who have received copies, or rights, from you under
1330-this License will not have their licenses terminated so long as such
1331-parties remain in full compliance.
1332-
1333- 5. You are not required to accept this License, since you have not
1334-signed it. However, nothing else grants you permission to modify or
1335-distribute the Program or its derivative works. These actions are
1336-prohibited by law if you do not accept this License. Therefore, by
1337-modifying or distributing the Program (or any work based on the
1338-Program), you indicate your acceptance of this License to do so, and
1339-all its terms and conditions for copying, distributing or modifying
1340-the Program or works based on it.
1341-
1342- 6. Each time you redistribute the Program (or any work based on the
1343-Program), the recipient automatically receives a license from the
1344-original licensor to copy, distribute or modify the Program subject to
1345-these terms and conditions. You may not impose any further
1346-restrictions on the recipients' exercise of the rights granted herein.
1347-You are not responsible for enforcing compliance by third parties to
1348-this License.
1349-
1350- 7. If, as a consequence of a court judgment or allegation of patent
1351-infringement or for any other reason (not limited to patent issues),
1352-conditions are imposed on you (whether by court order, agreement or
1353-otherwise) that contradict the conditions of this License, they do not
1354-excuse you from the conditions of this License. If you cannot
1355-distribute so as to satisfy simultaneously your obligations under this
1356-License and any other pertinent obligations, then as a consequence you
1357-may not distribute the Program at all. For example, if a patent
1358-license would not permit royalty-free redistribution of the Program by
1359-all those who receive copies directly or indirectly through you, then
1360-the only way you could satisfy both it and this License would be to
1361-refrain entirely from distribution of the Program.
1362-
1363-If any portion of this section is held invalid or unenforceable under
1364-any particular circumstance, the balance of the section is intended to
1365-apply and the section as a whole is intended to apply in other
1366-circumstances.
1367-
1368-It is not the purpose of this section to induce you to infringe any
1369-patents or other property right claims or to contest validity of any
1370-such claims; this section has the sole purpose of protecting the
1371-integrity of the free software distribution system, which is
1372-implemented by public license practices. Many people have made
1373-generous contributions to the wide range of software distributed
1374-through that system in reliance on consistent application of that
1375-system; it is up to the author/donor to decide if he or she is willing
1376-to distribute software through any other system and a licensee cannot
1377-impose that choice.
1378-
1379-This section is intended to make thoroughly clear what is believed to
1380-be a consequence of the rest of this License.
1381-
1382- 8. If the distribution and/or use of the Program is restricted in
1383-certain countries either by patents or by copyrighted interfaces, the
1384-original copyright holder who places the Program under this License
1385-may add an explicit geographical distribution limitation excluding
1386-those countries, so that distribution is permitted only in or among
1387-countries not thus excluded. In such case, this License incorporates
1388-the limitation as if written in the body of this License.
1389-
1390- 9. The Free Software Foundation may publish revised and/or new versions
1391-of the General Public License from time to time. Such new versions will
1392-be similar in spirit to the present version, but may differ in detail to
1393-address new problems or concerns.
1394-
1395-Each version is given a distinguishing version number. If the Program
1396-specifies a version number of this License which applies to it and "any
1397-later version", you have the option of following the terms and conditions
1398-either of that version or of any later version published by the Free
1399-Software Foundation. If the Program does not specify a version number of
1400-this License, you may choose any version ever published by the Free Software
1401-Foundation.
1402-
1403- 10. If you wish to incorporate parts of the Program into other free
1404-programs whose distribution conditions are different, write to the author
1405-to ask for permission. For software which is copyrighted by the Free
1406-Software Foundation, write to the Free Software Foundation; we sometimes
1407-make exceptions for this. Our decision will be guided by the two goals
1408-of preserving the free status of all derivatives of our free software and
1409-of promoting the sharing and reuse of software generally.
1410-
1411- NO WARRANTY
1412-
1413- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
1414-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
1415-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
1416-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
1417-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1418-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
1419-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
1420-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
1421-REPAIR OR CORRECTION.
1422-
1423- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
1424-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
1425-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
1426-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
1427-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
1428-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
1429-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
1430-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
1431-POSSIBILITY OF SUCH DAMAGES.
1432-
1433- END OF TERMS AND CONDITIONS
1434-
1435- How to Apply These Terms to Your New Programs
1436-
1437- If you develop a new program, and you want it to be of the greatest
1438-possible use to the public, the best way to achieve this is to make it
1439-free software which everyone can redistribute and change under these terms.
1440-
1441- To do so, attach the following notices to the program. It is safest
1442-to attach them to the start of each source file to most effectively
1443-convey the exclusion of warranty; and each file should have at least
1444-the "copyright" line and a pointer to where the full notice is found.
1445-
1446- <one line to give the program's name and a brief idea of what it does.>
1447- Copyright (C) <year> <name of author>
1448-
1449- This program is free software; you can redistribute it and/or modify
1450- it under the terms of the GNU General Public License as published by
1451- the Free Software Foundation; either version 2 of the License, or
1452- (at your option) any later version.
1453-
1454- This program is distributed in the hope that it will be useful,
1455- but WITHOUT ANY WARRANTY; without even the implied warranty of
1456- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1457- GNU General Public License for more details.
1458-
1459- You should have received a copy of the GNU General Public License along
1460- with this program; if not, write to the Free Software Foundation, Inc.,
1461- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
1462-
1463-Also add information on how to contact you by electronic and paper mail.
1464-
1465-If the program is interactive, make it output a short notice like this
1466-when it starts in an interactive mode:
1467-
1468- Gnomovision version 69, Copyright (C) year name of author
1469- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
1470- This is free software, and you are welcome to redistribute it
1471- under certain conditions; type `show c' for details.
1472-
1473-The hypothetical commands `show w' and `show c' should show the appropriate
1474-parts of the General Public License. Of course, the commands you use may
1475-be called something other than `show w' and `show c'; they could even be
1476-mouse-clicks or menu items--whatever suits your program.
1477-
1478-You should also get your employer (if you work as a programmer) or your
1479-school, if any, to sign a "copyright disclaimer" for the program, if
1480-necessary. Here is a sample; alter the names:
1481-
1482- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
1483- `Gnomovision' (which makes passes at compilers) written by James Hacker.
1484-
1485- <signature of Ty Coon>, 1 April 1989
1486- Ty Coon, President of Vice
1487-
1488-This General Public License does not permit incorporating your program into
1489-proprietary programs. If your program is a subroutine library, you may
1490-consider it more useful to permit linking proprietary applications with the
1491-library. If this is what you want to do, use the GNU Lesser General
1492-Public License instead of this License.
1493
1494=== added file 'COPYING.LIB'
1495--- COPYING.LIB 1970-01-01 00:00:00 +0000
1496+++ COPYING.LIB 2012-04-05 18:42:22 +0000
1497@@ -0,0 +1,165 @@
1498+ GNU LESSER GENERAL PUBLIC LICENSE
1499+ Version 3, 29 June 2007
1500+
1501+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
1502+ Everyone is permitted to copy and distribute verbatim copies
1503+ of this license document, but changing it is not allowed.
1504+
1505+
1506+ This version of the GNU Lesser General Public License incorporates
1507+the terms and conditions of version 3 of the GNU General Public
1508+License, supplemented by the additional permissions listed below.
1509+
1510+ 0. Additional Definitions.
1511+
1512+ As used herein, "this License" refers to version 3 of the GNU Lesser
1513+General Public License, and the "GNU GPL" refers to version 3 of the GNU
1514+General Public License.
1515+
1516+ "The Library" refers to a covered work governed by this License,
1517+other than an Application or a Combined Work as defined below.
1518+
1519+ An "Application" is any work that makes use of an interface provided
1520+by the Library, but which is not otherwise based on the Library.
1521+Defining a subclass of a class defined by the Library is deemed a mode
1522+of using an interface provided by the Library.
1523+
1524+ A "Combined Work" is a work produced by combining or linking an
1525+Application with the Library. The particular version of the Library
1526+with which the Combined Work was made is also called the "Linked
1527+Version".
1528+
1529+ The "Minimal Corresponding Source" for a Combined Work means the
1530+Corresponding Source for the Combined Work, excluding any source code
1531+for portions of the Combined Work that, considered in isolation, are
1532+based on the Application, and not on the Linked Version.
1533+
1534+ The "Corresponding Application Code" for a Combined Work means the
1535+object code and/or source code for the Application, including any data
1536+and utility programs needed for reproducing the Combined Work from the
1537+Application, but excluding the System Libraries of the Combined Work.
1538+
1539+ 1. Exception to Section 3 of the GNU GPL.
1540+
1541+ You may convey a covered work under sections 3 and 4 of this License
1542+without being bound by section 3 of the GNU GPL.
1543+
1544+ 2. Conveying Modified Versions.
1545+
1546+ If you modify a copy of the Library, and, in your modifications, a
1547+facility refers to a function or data to be supplied by an Application
1548+that uses the facility (other than as an argument passed when the
1549+facility is invoked), then you may convey a copy of the modified
1550+version:
1551+
1552+ a) under this License, provided that you make a good faith effort to
1553+ ensure that, in the event an Application does not supply the
1554+ function or data, the facility still operates, and performs
1555+ whatever part of its purpose remains meaningful, or
1556+
1557+ b) under the GNU GPL, with none of the additional permissions of
1558+ this License applicable to that copy.
1559+
1560+ 3. Object Code Incorporating Material from Library Header Files.
1561+
1562+ The object code form of an Application may incorporate material from
1563+a header file that is part of the Library. You may convey such object
1564+code under terms of your choice, provided that, if the incorporated
1565+material is not limited to numerical parameters, data structure
1566+layouts and accessors, or small macros, inline functions and templates
1567+(ten or fewer lines in length), you do both of the following:
1568+
1569+ a) Give prominent notice with each copy of the object code that the
1570+ Library is used in it and that the Library and its use are
1571+ covered by this License.
1572+
1573+ b) Accompany the object code with a copy of the GNU GPL and this license
1574+ document.
1575+
1576+ 4. Combined Works.
1577+
1578+ You may convey a Combined Work under terms of your choice that,
1579+taken together, effectively do not restrict modification of the
1580+portions of the Library contained in the Combined Work and reverse
1581+engineering for debugging such modifications, if you also do each of
1582+the following:
1583+
1584+ a) Give prominent notice with each copy of the Combined Work that
1585+ the Library is used in it and that the Library and its use are
1586+ covered by this License.
1587+
1588+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
1589+ document.
1590+
1591+ c) For a Combined Work that displays copyright notices during
1592+ execution, include the copyright notice for the Library among
1593+ these notices, as well as a reference directing the user to the
1594+ copies of the GNU GPL and this license document.
1595+
1596+ d) Do one of the following:
1597+
1598+ 0) Convey the Minimal Corresponding Source under the terms of this
1599+ License, and the Corresponding Application Code in a form
1600+ suitable for, and under terms that permit, the user to
1601+ recombine or relink the Application with a modified version of
1602+ the Linked Version to produce a modified Combined Work, in the
1603+ manner specified by section 6 of the GNU GPL for conveying
1604+ Corresponding Source.
1605+
1606+ 1) Use a suitable shared library mechanism for linking with the
1607+ Library. A suitable mechanism is one that (a) uses at run time
1608+ a copy of the Library already present on the user's computer
1609+ system, and (b) will operate properly with a modified version
1610+ of the Library that is interface-compatible with the Linked
1611+ Version.
1612+
1613+ e) Provide Installation Information, but only if you would otherwise
1614+ be required to provide such information under section 6 of the
1615+ GNU GPL, and only to the extent that such information is
1616+ necessary to install and execute a modified version of the
1617+ Combined Work produced by recombining or relinking the
1618+ Application with a modified version of the Linked Version. (If
1619+ you use option 4d0, the Installation Information must accompany
1620+ the Minimal Corresponding Source and Corresponding Application
1621+ Code. If you use option 4d1, you must provide the Installation
1622+ Information in the manner specified by section 6 of the GNU GPL
1623+ for conveying Corresponding Source.)
1624+
1625+ 5. Combined Libraries.
1626+
1627+ You may place library facilities that are a work based on the
1628+Library side by side in a single library together with other library
1629+facilities that are not Applications and are not covered by this
1630+License, and convey such a combined library under terms of your
1631+choice, if you do both of the following:
1632+
1633+ a) Accompany the combined library with a copy of the same work based
1634+ on the Library, uncombined with any other library facilities,
1635+ conveyed under the terms of this License.
1636+
1637+ b) Give prominent notice with the combined library that part of it
1638+ is a work based on the Library, and explaining where to find the
1639+ accompanying uncombined form of the same work.
1640+
1641+ 6. Revised Versions of the GNU Lesser General Public License.
1642+
1643+ The Free Software Foundation may publish revised and/or new versions
1644+of the GNU Lesser General Public License from time to time. Such new
1645+versions will be similar in spirit to the present version, but may
1646+differ in detail to address new problems or concerns.
1647+
1648+ Each version is given a distinguishing version number. If the
1649+Library as you received it specifies that a certain numbered version
1650+of the GNU Lesser General Public License "or any later version"
1651+applies to it, you have the option of following the terms and
1652+conditions either of that published version or of any later version
1653+published by the Free Software Foundation. If the Library as you
1654+received it does not specify a version number of the GNU Lesser
1655+General Public License, you may choose any version of the GNU Lesser
1656+General Public License ever published by the Free Software Foundation.
1657+
1658+ If the Library as you received it specifies that a proxy can decide
1659+whether future versions of the GNU Lesser General Public License shall
1660+apply, that proxy's public statement of acceptance of any version is
1661+permanent authorization for you to choose that version for the
1662+Library.
1663
1664=== modified file 'Makefile.am'
1665--- Makefile.am 2012-01-27 20:26:43 +0000
1666+++ Makefile.am 2012-04-05 18:42:22 +0000
1667@@ -1,7 +1,5 @@
1668 SUBDIRS = data libubuntuone libubuntuoneui tests po
1669
1670-EXTRA_DIST = COPYING.GPL
1671-
1672 pcfiles = libubuntuoneui-3.0.pc
1673
1674 libubuntuoneui-3.0.pc: libubuntuoneui.pc
1675
1676=== modified file 'configure.ac'
1677--- configure.ac 2012-01-27 20:26:43 +0000
1678+++ configure.ac 2012-04-05 18:42:22 +0000
1679@@ -32,7 +32,7 @@
1680 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
1681
1682 dnl Look for needed modules
1683-PKG_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)
1684+PKG_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)
1685 AC_SUBST(LIBUBUNTUONEUI_CFLAGS)
1686 AC_SUBST(LIBUBUNTUONEUI_LIBS)
1687
1688
1689=== modified file 'libubuntuoneui/Makefile.am'
1690--- libubuntuoneui/Makefile.am 2012-01-27 22:34:26 +0000
1691+++ libubuntuoneui/Makefile.am 2012-04-05 18:42:22 +0000
1692@@ -17,15 +17,12 @@
1693
1694 libubuntuoneui_3_0_la_SOURCES = \
1695 $(MARSHAL_GENERATED) \
1696- oauth.c \
1697- oauth.h \
1698 u1-codec-installer.c \
1699 u1-codec-installer.h \
1700 u1-music-store.c \
1701 u1-request-chrome.c \
1702- u1-request-chrome.h \
1703- xmalloc.c \
1704- xmalloc.h
1705+ u1-request-chrome.h
1706+
1707 libubuntuoneui_3_0_la_LDFLAGS = -version-info $(LIBUBUNTUONEUI_CURRENT):$(LIBUBUNTUONEUI_REVISION):$(LIBUBUNTUONEUI_AGE)
1708 libubuntuoneui_3_0_la_LIBADD = \
1709 $(LIBUBUNTUONEUI_LIBS) \
1710
1711=== removed file 'libubuntuoneui/oauth.c'
1712--- libubuntuoneui/oauth.c 2010-11-24 18:05:49 +0000
1713+++ libubuntuoneui/oauth.c 1970-01-01 00:00:00 +0000
1714@@ -1,961 +0,0 @@
1715-/*
1716- * oAuth string functions in POSIX-C.
1717- *
1718- * Copyright 2007, 2008, 2009 Robin Gareus <robin@gareus.org>
1719- *
1720- * The base64 functions are by Jan-Henrik Haukeland, <hauk@tildeslash.com>
1721- * and un/escape_url() was inspired by libcurl's curl_escape under ISC-license
1722- * many thanks to Daniel Stenberg <daniel@haxx.se>.
1723- *
1724- * Permission is hereby granted, free of charge, to any person obtaining a copy
1725- * of this software and associated documentation files (the "Software"), to deal
1726- * in the Software without restriction, including without limitation the rights
1727- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1728- * copies of the Software, and to permit persons to whom the Software is
1729- * furnished to do so, subject to the following conditions:
1730- *
1731- * The above copyright notice and this permission notice shall be included in
1732- * all copies or substantial portions of the Software.
1733- *
1734- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1735- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1736- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1737- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1738- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1739- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1740- * THE SOFTWARE.
1741- *
1742- */
1743-#if HAVE_CONFIG_H
1744-# include <config.h>
1745-#endif
1746-
1747-#define WIPE_MEMORY ///< overwrite sensitve data before free()ing it.
1748-
1749-#include <stdio.h>
1750-#include <stdarg.h>
1751-#include <stdlib.h>
1752-#include <string.h>
1753-#include <time.h>
1754-#include <math.h>
1755-#include <ctype.h> // isxdigit
1756-#include <openssl/hmac.h>
1757-
1758-#include "xmalloc.h"
1759-#include "oauth.h"
1760-
1761-#ifndef WIN // getpid() on POSIX systems
1762-#include <sys/types.h>
1763-#include <unistd.h>
1764-#endif
1765-
1766-/**
1767- * Base64 encode one byte
1768- */
1769-char oauth_b64_encode(unsigned char u) {
1770- if(u < 26) return 'A'+u;
1771- if(u < 52) return 'a'+(u-26);
1772- if(u < 62) return '0'+(u-52);
1773- if(u == 62) return '+';
1774- return '/';
1775-}
1776-
1777-/**
1778- * Decode a single base64 character.
1779- */
1780-unsigned char oauth_b64_decode(char c) {
1781- if(c >= 'A' && c <= 'Z') return(c - 'A');
1782- if(c >= 'a' && c <= 'z') return(c - 'a' + 26);
1783- if(c >= '0' && c <= '9') return(c - '0' + 52);
1784- if(c == '+') return 62;
1785- return 63;
1786-}
1787-
1788-/**
1789- * Return TRUE if 'c' is a valid base64 character, otherwise FALSE
1790- */
1791-int oauth_b64_is_base64(char c) {
1792- if((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') ||
1793- (c >= '0' && c <= '9') || (c == '+') ||
1794- (c == '/') || (c == '=')) {
1795- return 1;
1796- }
1797- return 0;
1798-}
1799-
1800-/**
1801- * Base64 encode and return size data in 'src'. The caller must free the
1802- * returned string.
1803- *
1804- * @param size The size of the data in src
1805- * @param src The data to be base64 encode
1806- * @return encoded string otherwise NULL
1807- */
1808-char *oauth_encode_base64(int size, const unsigned char *src) {
1809- int i;
1810- char *out, *p;
1811-
1812- if(!src) return NULL;
1813- if(!size) size= strlen((char *)src);
1814- out= (char*) xcalloc(sizeof(char), size*4/3+4);
1815- p= out;
1816-
1817- for(i=0; i<size; i+=3) {
1818- unsigned char b1=0, b2=0, b3=0, b4=0, b5=0, b6=0, b7=0;
1819- b1= src[i];
1820- if(i+1<size) b2= src[i+1];
1821- if(i+2<size) b3= src[i+2];
1822-
1823- b4= b1>>2;
1824- b5= ((b1&0x3)<<4)|(b2>>4);
1825- b6= ((b2&0xf)<<2)|(b3>>6);
1826- b7= b3&0x3f;
1827-
1828- *p++= oauth_b64_encode(b4);
1829- *p++= oauth_b64_encode(b5);
1830-
1831- if(i+1<size) *p++= oauth_b64_encode(b6);
1832- else *p++= '=';
1833-
1834- if(i+2<size) *p++= oauth_b64_encode(b7);
1835- else *p++= '=';
1836- }
1837- return out;
1838-}
1839-
1840-/**
1841- * Decode the base64 encoded string 'src' into the memory pointed to by
1842- * 'dest'.
1843- *
1844- * @param dest Pointer to memory for holding the decoded string.
1845- * Must be large enough to recieve the decoded string.
1846- * @param src A base64 encoded string.
1847- * @return the length of the decoded string if decode
1848- * succeeded otherwise 0.
1849- */
1850-int oauth_decode_base64(unsigned char *dest, const char *src) {
1851- if(src && *src) {
1852- unsigned char *p= dest;
1853- int k, l= strlen(src)+1;
1854- unsigned char *buf= (unsigned char*) xcalloc(sizeof(unsigned char), l);
1855-
1856- /* Ignore non base64 chars as per the POSIX standard */
1857- for(k=0, l=0; src[k]; k++) {
1858- if(oauth_b64_is_base64(src[k])) {
1859- buf[l++]= src[k];
1860- }
1861- }
1862-
1863- for(k=0; k<l; k+=4) {
1864- char c1='A', c2='A', c3='A', c4='A';
1865- unsigned char b1=0, b2=0, b3=0, b4=0;
1866- c1= buf[k];
1867-
1868- if(k+1<l) c2= buf[k+1];
1869- if(k+2<l) c3= buf[k+2];
1870- if(k+3<l) c4= buf[k+3];
1871-
1872- b1= oauth_b64_decode(c1);
1873- b2= oauth_b64_decode(c2);
1874- b3= oauth_b64_decode(c3);
1875- b4= oauth_b64_decode(c4);
1876-
1877- *p++=((b1<<2)|(b2>>4) );
1878-
1879- if(c3 != '=') *p++=(((b2&0xf)<<4)|(b3>>2) );
1880- if(c4 != '=') *p++=(((b3&0x3)<<6)|b4 );
1881- }
1882- free(buf);
1883- dest[p-dest]='\0';
1884- return(p-dest);
1885- }
1886- return 0;
1887-}
1888-
1889-/**
1890- * Escape 'string' according to RFC3986 and
1891- * http://oauth.net/core/1.0/#encoding_parameters.
1892- *
1893- * @param string The data to be encoded
1894- * @return encoded string otherwise NULL
1895- * The caller must free the returned string.
1896- */
1897-char *oauth_url_escape(const char *string) {
1898- size_t alloc, newlen;
1899- char *ns = NULL, *testing_ptr = NULL;
1900- unsigned char in;
1901- size_t strindex=0;
1902- size_t length;
1903-
1904- if (!string) return xstrdup("");
1905-
1906- alloc = strlen(string)+1;
1907- newlen = alloc;
1908-
1909- ns = (char*) xmalloc(alloc);
1910-
1911- length = alloc-1;
1912- while(length--) {
1913- in = *string;
1914-
1915- switch(in){
1916- case '0': case '1': case '2': case '3': case '4':
1917- case '5': case '6': case '7': case '8': case '9':
1918- case 'a': case 'b': case 'c': case 'd': case 'e':
1919- case 'f': case 'g': case 'h': case 'i': case 'j':
1920- case 'k': case 'l': case 'm': case 'n': case 'o':
1921- case 'p': case 'q': case 'r': case 's': case 't':
1922- case 'u': case 'v': case 'w': case 'x': case 'y': case 'z':
1923- case 'A': case 'B': case 'C': case 'D': case 'E':
1924- case 'F': case 'G': case 'H': case 'I': case 'J':
1925- case 'K': case 'L': case 'M': case 'N': case 'O':
1926- case 'P': case 'Q': case 'R': case 'S': case 'T':
1927- case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z':
1928- case '_': case '~': case '.': case '-':
1929- ns[strindex++]=in;
1930- break;
1931- default:
1932- newlen += 2; /* this'll become a %XX */
1933- if(newlen > alloc) {
1934- alloc *= 2;
1935- testing_ptr = (char*) xrealloc(ns, alloc);
1936- ns = testing_ptr;
1937- }
1938- snprintf(&ns[strindex], 4, "%%%02X", in);
1939- strindex+=3;
1940- break;
1941- }
1942- string++;
1943- }
1944- ns[strindex]=0;
1945- return ns;
1946-}
1947-
1948-#ifndef ISXDIGIT
1949-# define ISXDIGIT(x) (isxdigit((int) ((unsigned char)x)))
1950-#endif
1951-
1952-/**
1953- * Parse RFC3986 encoded 'string' back to unescaped version.
1954- *
1955- * @param string The data to be unescaped
1956- * @param olen unless NULL the length of the returned string is stored there.
1957- * @return decoded string or NULL
1958- * The caller must free the returned string.
1959- */
1960-char *oauth_url_unescape(const char *string, size_t *olen) {
1961- size_t alloc, strindex=0;
1962- char *ns = NULL;
1963- unsigned char in;
1964- long hex;
1965-
1966- if (!string) return NULL;
1967- alloc = strlen(string)+1;
1968- ns = (char*) xmalloc(alloc);
1969-
1970- while(--alloc > 0) {
1971- in = *string;
1972- if(('%' == in) && ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
1973- char hexstr[3]; // '%XX'
1974- hexstr[0] = string[1];
1975- hexstr[1] = string[2];
1976- hexstr[2] = 0;
1977- hex = strtol(hexstr, NULL, 16);
1978- in = (unsigned char)hex; /* hex is always < 256 */
1979- string+=2;
1980- alloc-=2;
1981- }
1982- ns[strindex++] = in;
1983- string++;
1984- }
1985- ns[strindex]=0;
1986- if(olen) *olen = strindex;
1987- return ns;
1988-}
1989-
1990-/**
1991- * returns base64 encoded HMAC-SHA1 signature for
1992- * given message and key.
1993- * both data and key need to be urlencoded.
1994- *
1995- * the returned string needs to be freed by the caller
1996- *
1997- * @param m message to be signed
1998- * @param k key used for signing
1999- * @return signature string.
2000- */
2001-char *oauth_sign_hmac_sha1 (const char *m, const char *k) {
2002- return(oauth_sign_hmac_sha1_raw (m, strlen(m), k, strlen(k)));
2003-}
2004-
2005-char *oauth_sign_hmac_sha1_raw (const char *m, const size_t ml, const char *k, const size_t kl) {
2006- unsigned char result[EVP_MAX_MD_SIZE];
2007- unsigned int resultlen = 0;
2008-
2009- HMAC(EVP_sha1(), k, kl,
2010- (unsigned char*) m, ml,
2011- result, &resultlen);
2012-
2013- return(oauth_encode_base64(resultlen, result));
2014-}
2015-
2016-/**
2017- * returns plaintext signature for the given key.
2018- *
2019- * the returned string needs to be freed by the caller
2020- *
2021- * @param m message to be signed
2022- * @param k key used for signing
2023- * @return signature string
2024- */
2025-char *oauth_sign_plaintext (const char *m, const char *k) {
2026- return(oauth_url_escape(k));
2027-}
2028-
2029-#include <openssl/evp.h>
2030-#include <openssl/x509.h>
2031-#include <openssl/x509v3.h>
2032-#include <openssl/ssl.h>
2033-
2034-/**
2035- * returns RSA-SHA1 signature for given data.
2036- * the returned signature needs to be freed by the caller.
2037- *
2038- * @param m message to be signed
2039- * @param k private-key PKCS and Base64-encoded
2040- * @return base64 encoded signature string.
2041- */
2042-char *oauth_sign_rsa_sha1 (const char *m, const char *k) {
2043- unsigned char *sig = NULL;
2044- unsigned char *passphrase = NULL;
2045- unsigned int len=0;
2046- EVP_MD_CTX md_ctx;
2047-
2048- EVP_PKEY *pkey;
2049- BIO *in;
2050- in = BIO_new_mem_buf((unsigned char*) k, strlen(k));
2051- pkey = PEM_read_bio_PrivateKey(in, NULL, 0, passphrase); // generate sign
2052- BIO_free(in);
2053-
2054- if (pkey == NULL) {
2055- //fprintf(stderr, "liboauth/ssl: can not read private key\n");
2056- return xstrdup("liboauth/ssl: can not read private key");
2057- }
2058-
2059- len = EVP_PKEY_size(pkey);
2060- sig = xmalloc((len+1)*sizeof(char));
2061-
2062- EVP_SignInit(&md_ctx, EVP_sha1());
2063- EVP_SignUpdate(&md_ctx, m, strlen(m));
2064- if (EVP_SignFinal (&md_ctx, sig, &len, pkey)) {
2065- char *tmp;
2066- sig[len] = '\0';
2067- tmp = oauth_encode_base64(len,sig);
2068- OPENSSL_free(sig);
2069- EVP_PKEY_free(pkey);
2070- return tmp;
2071- }
2072- return xstrdup("liboauth/ssl: rsa-sha1 signing failed");
2073-}
2074-
2075-/**
2076- * verify RSA-SHA1 signature.
2077- *
2078- * returns the output of EVP_VerifyFinal() for a given message,
2079- * cert/pubkey and signature
2080- *
2081- * @param m message to be verified
2082- * @param c public-key or x509 certificate
2083- * @param s base64 encoded signature
2084- * @return 1 for a correct signature, 0 for failure and -1 if some other error occurred
2085- */
2086-int oauth_verify_rsa_sha1 (const char *m, const char *c, const char *s) {
2087- EVP_MD_CTX md_ctx;
2088- EVP_PKEY *pkey;
2089- BIO *in;
2090- X509 *cert = NULL;
2091- unsigned char *b64d;
2092- int slen, err;
2093-
2094- in = BIO_new_mem_buf((unsigned char*)c, strlen(c));
2095- cert = PEM_read_bio_X509(in, NULL, 0, NULL);
2096- if (cert) {
2097- pkey = (EVP_PKEY *) X509_get_pubkey(cert);
2098- X509_free(cert);
2099- } else {
2100- pkey = PEM_read_bio_PUBKEY(in, NULL, 0, NULL);
2101- }
2102- BIO_free(in);
2103- if (pkey == NULL) {
2104- //fprintf(stderr, "could not read cert/pubkey.\n");
2105- return -2;
2106- }
2107-
2108- b64d= (unsigned char*) xmalloc(sizeof(char)*strlen(s));
2109- slen = oauth_decode_base64(b64d, s);
2110-
2111- EVP_VerifyInit(&md_ctx, EVP_sha1());
2112- EVP_VerifyUpdate(&md_ctx, m, strlen(m));
2113- err = EVP_VerifyFinal(&md_ctx, b64d, slen, pkey);
2114- EVP_MD_CTX_cleanup(&md_ctx);
2115- EVP_PKEY_free(pkey);
2116- free(b64d);
2117- return (err);
2118-}
2119-
2120-/**
2121- * encode strings and concatenate with '&' separator.
2122- * The number of strings to be concatenated must be
2123- * given as first argument.
2124- * all arguments thereafter must be of type (char *)
2125- *
2126- * @param len the number of arguments to follow this parameter
2127- * @param ... string to escape and added (may be NULL)
2128- *
2129- * @return pointer to memory holding the concatenated
2130- * strings - needs to be free(d) by the caller. or NULL
2131- * in case we ran out of memory.
2132- */
2133-char *oauth_catenc(int len, ...) {
2134- va_list va;
2135- int i;
2136- char *rv = (char*) xmalloc(sizeof(char));
2137- *rv='\0';
2138- va_start(va, len);
2139- for(i=0;i<len;i++) {
2140- char *arg = va_arg(va, char *);
2141- char *enc;
2142- int len;
2143- enc = oauth_url_escape(arg);
2144- if(!enc) break;
2145- len = strlen(enc) + 1 + ((i>0)?1:0);
2146- if(rv) len+=strlen(rv);
2147- rv=(char*) xrealloc(rv,len*sizeof(char));
2148-
2149- if(i>0) strcat(rv, "&");
2150- strcat(rv, enc);
2151- free(enc);
2152- }
2153- va_end(va);
2154- return(rv);
2155-}
2156-
2157-/**
2158- * splits the given url into a parameter array.
2159- * (see \ref oauth_serialize_url and \ref oauth_serialize_url_parameters for the reverse)
2160- *
2161- * NOTE: Request-parameters-values may include an ampersand character.
2162- * However if unescaped this function will use them as parameter delimiter.
2163- * If you need to make such a request, this function since version 0.3.5 allows
2164- * to use the ASCII SOH (0x01) character as alias for '&' (0x26).
2165- * (the motivation is convenience: SOH is /untypeable/ and much more
2166- * unlikely to appear than '&' - If you plan to sign fancy URLs you
2167- * should not split a query-string, but rather provide the parameter array
2168- * directly to \ref oauth_serialize_url)
2169- *
2170- * @param url the url or query-string to parse.
2171- * @param argv pointer to a (char *) array where the results are stored.
2172- * The array is re-allocated to match the number of parameters and each
2173- * parameter-string is allocated with strdup. - The memory needs to be freed
2174- * by the caller.
2175- * @param qesc use query parameter escape (vs post-param-escape) - if set
2176- * to 1 all '+' are treated as spaces ' '
2177- *
2178- * @return number of parameter(s) in array.
2179- */
2180-int oauth_split_post_paramters(const char *url, char ***argv, short qesc) {
2181- int argc=0;
2182- char *token, *tmp, *t1;
2183- if (!argv) return 0;
2184- if (!url) return 0;
2185- t1=xstrdup(url);
2186-
2187- // '+' represents a space, in a URL query string
2188- while ((qesc&1) && (tmp=strchr(t1,'+'))) *tmp=' ';
2189-
2190- tmp=t1;
2191- while((token=strtok(tmp,"&?"))) {
2192- if(!strncasecmp("oauth_signature=",token,16)) continue;
2193- (*argv)=(char**) xrealloc(*argv,sizeof(char*)*(argc+1));
2194- while (!(qesc&2) && (tmp=strchr(token,'\001'))) *tmp='&';
2195- (*argv)[argc]=oauth_url_unescape(token, NULL);
2196- if (argc==0 && strstr(token, ":/")) {
2197- // HTTP does not allow empty absolute paths, so the URL
2198- // 'http://example.com' is equivalent to 'http://example.com/' and should
2199- // be treated as such for the purposes of OAuth signing (rfc2616, section 3.2.1)
2200- // see http://groups.google.com/group/oauth/browse_thread/thread/c44b6f061bfd98c?hl=en
2201- char *slash=strstr(token, ":/");
2202- while (slash && *(++slash) == '/') ; // skip slashes eg /xxx:[\/]*/
2203-#if 0
2204- // skip possibly unescaped slashes in the userinfo - they're not allowed by RFC2396 but have been seen.
2205- // the hostname/IP may only contain alphanumeric characters - so we're safe there.
2206- if (slash && strchr(slash,'@')) slash=strchr(slash,'@');
2207-#endif
2208- if (slash && !strchr(slash,'/')) {
2209-#ifdef DEBUG_OAUTH
2210- fprintf(stderr, "\nliboauth: added trailing slash to URL: '%s'\n\n", token);
2211-#endif
2212- free((*argv)[argc]);
2213- (*argv)[argc]= (char*) xmalloc(sizeof(char)*(2+strlen(token)));
2214- strcpy((*argv)[argc],token);
2215- strcat((*argv)[argc],"/");
2216- }
2217- }
2218- if (argc==0 && (tmp=strstr((*argv)[argc],":80/"))) {
2219- memmove(tmp, tmp+3, strlen(tmp+2));
2220- }
2221- tmp=NULL;
2222- argc++;
2223- }
2224-
2225- free(t1);
2226- return argc;
2227-}
2228-
2229-int oauth_split_url_parameters(const char *url, char ***argv) {
2230- return oauth_split_post_paramters(url, argv, 1);
2231-}
2232-
2233-/**
2234- * build a url query string from an array.
2235- *
2236- * @param argc the total number of elements in the array
2237- * @param start element in the array at which to start concatenating.
2238- * @param argv parameter-array to concatenate.
2239- * @return url string needs to be freed by the caller.
2240- *
2241- */
2242-char *oauth_serialize_url (int argc, int start, char **argv) {
2243- return oauth_serialize_url_sep( argc, start, argv, "&");
2244-}
2245-
2246-/**
2247- * encode query parameters from an array.
2248- *
2249- * @param argc the total number of elements in the array
2250- * @param start element in the array at which to start concatenating.
2251- * @param argv parameter-array to concatenate.
2252- * @param sep separator for parameters (usually "&")
2253- * @return url string needs to be freed by the caller.
2254- */
2255-char *oauth_serialize_url_sep (int argc, int start, char **argv, char *sep) {
2256- char *tmp, *t1;
2257- int i;
2258- int first=0;
2259- int seplen=strlen(sep);
2260- char *query = (char*) xmalloc(sizeof(char));
2261- *query='\0';
2262- for(i=start; i< argc; i++) {
2263- int len = 0;
2264- if (query) len+=strlen(query);
2265-
2266- if (i==start && i==0 && strstr(argv[i], ":/")) {
2267- tmp=xstrdup(argv[i]);
2268- len+=strlen(tmp);
2269- } else if(!(t1=strchr(argv[i], '='))) {
2270- // see http://oauth.net/core/1.0/#anchor14
2271- // escape parameter names and arguments but not the '='
2272- tmp=xstrdup(argv[i]);
2273- tmp=(char*) xrealloc(tmp,(strlen(tmp)+2)*sizeof(char));
2274- strcat(tmp,"=");
2275- len+=strlen(tmp);
2276- } else {
2277- *t1=0;
2278- tmp = oauth_url_escape(argv[i]);
2279- *t1='=';
2280- t1 = oauth_url_escape((t1+1));
2281- tmp=(char*) xrealloc(tmp,(strlen(tmp)+strlen(t1)+2)*sizeof(char));
2282- strcat(tmp,"=");
2283- strcat(tmp,t1);
2284- free(t1);
2285- len+=strlen(tmp);
2286- }
2287- len+=seplen+1;
2288- query=(char*) xrealloc(query,len*sizeof(char));
2289- strcat(query, ((i==start||first)?"":sep));
2290- first=0;
2291- strcat(query, tmp);
2292- if (i==start && i==0 && strstr(tmp, ":/")) {
2293- strcat(query, "?");
2294- first=1;
2295- }
2296- free(tmp);
2297- }
2298- return (query);
2299-}
2300-
2301-/**
2302- * build a query parameter string from an array.
2303- *
2304- * This function is a shortcut for \ref oauth_serialize_url (argc, 1, argv).
2305- * It strips the leading host/path, which is usually the first
2306- * element when using oauth_split_url_parameters on an URL.
2307- *
2308- * @param argc the total number of elements in the array
2309- * @param argv parameter-array to concatenate.
2310- * @return url string needs to be freed by the caller.
2311- */
2312-char *oauth_serialize_url_parameters (int argc, char **argv) {
2313- return oauth_serialize_url(argc, 1, argv);
2314-}
2315-
2316-/**
2317- * generate a random string between 15 and 32 chars length
2318- * and return a pointer to it. The value needs to be freed by the
2319- * caller
2320- *
2321- * @return zero terminated random string.
2322- */
2323-char *oauth_gen_nonce() {
2324- char *nc;
2325- static int rndinit = 1;
2326- const char *chars = "abcdefghijklmnopqrstuvwxyz"
2327- "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "0123456789_";
2328- unsigned int max = strlen( chars );
2329- int i, len;
2330-
2331- if(rndinit) {srand(time(NULL)
2332-#ifndef WIN // quick windows check.
2333- * getpid()
2334-#endif
2335- ); rndinit=0;} // seed random number generator - FIXME: we can do better ;)
2336-
2337- len=15+floor(rand()*16.0/(double)RAND_MAX);
2338- nc = (char*) xmalloc((len+1)*sizeof(char));
2339- for(i=0;i<len; i++) {
2340- nc[i] = chars[ rand() % max ];
2341- }
2342- nc[i]='\0';
2343- return (nc);
2344-}
2345-
2346-/**
2347- * string compare function for oauth parameters.
2348- *
2349- * used with qsort. needed to normalize request parameters.
2350- * see http://oauth.net/core/1.0/#anchor14
2351- */
2352-int oauth_cmpstringp(const void *p1, const void *p2) {
2353- char *v1,*v2;
2354- char *t1,*t2;
2355- int rv;
2356- // TODO: this is not fast - we should escape the
2357- // array elements (once) before sorting.
2358- v1=oauth_url_escape(* (char * const *)p1);
2359- v2=oauth_url_escape(* (char * const *)p2);
2360-
2361- // '=' signs are not "%3D" !
2362- if ((t1=strstr(v1,"%3D"))) {
2363- t1[0]='\0'; t1[1]='='; t1[2]='=';
2364- }
2365- if ((t2=strstr(v2,"%3D"))) {
2366- t2[0]='\0'; t2[1]='='; t2[2]='=';
2367- }
2368-
2369- // compare parameter names
2370- rv=strcmp(v1,v2);
2371- if (rv!=0) {
2372- if (v1) free(v1);
2373- if (v2) free(v2);
2374- return rv;
2375- }
2376-
2377- // if parameter names are equal, sort by value.
2378- if (t1) t1[0]='=';
2379- if (t2) t2[0]='=';
2380- rv=strcmp(t1,t2);
2381- if (v1) free(v1);
2382- if (v2) free(v2);
2383- return rv;
2384-}
2385-
2386-/**
2387- * search array for parameter key.
2388- * @param argv length of array to search
2389- * @param argc parameter array to search
2390- * @param key key of parameter to check.
2391- *
2392- * @return FALSE (0) if array does not contain a paramater with given key, TRUE (1) otherwise.
2393- */
2394-int oauth_param_exists(char **argv, int argc, char *key) {
2395- int i;
2396- size_t l= strlen(key);
2397- for (i=0;i<argc;i++)
2398- if (strlen(argv[i])>l && !strncmp(argv[i],key,l) && argv[i][l] == '=') return 1;
2399- return 0;
2400-}
2401-
2402-/**
2403- * add query parameter to array
2404- *
2405- * @param argcp pointer to array length int
2406- * @param argvp pointer to array values
2407- * @param addparam parameter to add (eg. "foo=bar")
2408- */
2409-void oauth_add_param_to_array(int *argcp, char ***argvp, const char *addparam) {
2410- (*argvp)=(char**) xrealloc(*argvp,sizeof(char*)*((*argcp)+1));
2411- (*argvp)[(*argcp)++]= (char*) xstrdup(addparam);
2412-}
2413-
2414-/**
2415- *
2416- */
2417-void oauth_add_protocol(int *argcp, char ***argvp,
2418- OAuthMethod method,
2419- const char *c_key, //< consumer key - posted plain text
2420- const char *t_key //< token key - posted plain text in URL
2421- ){
2422- char oarg[1024];
2423-
2424- // add oAuth specific arguments
2425- if (!oauth_param_exists(*argvp,*argcp,"oauth_nonce")) {
2426- char *tmp;
2427- snprintf(oarg, 1024, "oauth_nonce=%s", (tmp=oauth_gen_nonce()));
2428- oauth_add_param_to_array(argcp, argvp, oarg);
2429- free(tmp);
2430- }
2431-
2432- if (!oauth_param_exists(*argvp,*argcp,"oauth_timestamp")) {
2433- snprintf(oarg, 1024, "oauth_timestamp=%li", (long int) time(NULL));
2434- oauth_add_param_to_array(argcp, argvp, oarg);
2435- }
2436-
2437- if (t_key) {
2438- snprintf(oarg, 1024, "oauth_token=%s", t_key);
2439- oauth_add_param_to_array(argcp, argvp, oarg);
2440- }
2441-
2442- snprintf(oarg, 1024, "oauth_consumer_key=%s", c_key);
2443- oauth_add_param_to_array(argcp, argvp, oarg);
2444-
2445- snprintf(oarg, 1024, "oauth_signature_method=%s",
2446- method==0?"HMAC-SHA1":method==1?"RSA-SHA1":"PLAINTEXT");
2447- oauth_add_param_to_array(argcp, argvp, oarg);
2448-
2449- if (!oauth_param_exists(*argvp,*argcp,"oauth_version")) {
2450- snprintf(oarg, 1024, "oauth_version=1.0");
2451- oauth_add_param_to_array(argcp, argvp, oarg);
2452- }
2453-
2454- strcpy(oarg, "oauth_verifier=None");
2455- oauth_add_param_to_array(argcp, argvp, oarg);
2456-
2457- strcpy(oarg, "oauth_callback=None");
2458- oauth_add_param_to_array(argcp, argvp, oarg);
2459-
2460-#if 0 // oauth_version 1.0 Rev A
2461- if (!oauth_param_exists(argv,argc,"oauth_callback")) {
2462- snprintf(oarg, 1024, "oauth_callback=oob");
2463- oauth_add_param_to_array(argcp, argvp, oarg);
2464- }
2465-#endif
2466-
2467-}
2468-
2469-char *oauth_sign_url (const char *url, char **postargs,
2470- OAuthMethod method,
2471- const char *c_key, //< consumer key - posted plain text
2472- const char *c_secret, //< consumer secret - used as 1st part of secret-key
2473- const char *t_key, //< token key - posted plain text in URL
2474- const char *t_secret //< token secret - used as 2st part of secret-key
2475- ) {
2476- return oauth_sign_url2(url, postargs,
2477- method, NULL,
2478- c_key, c_secret,
2479- t_key, t_secret);
2480-}
2481-
2482-char *oauth_sign_url2 (const char *url, char **postargs,
2483- OAuthMethod method,
2484- const char *http_method, //< HTTP request method
2485- const char *c_key, //< consumer key - posted plain text
2486- const char *c_secret, //< consumer secret - used as 1st part of secret-key
2487- const char *t_key, //< token key - posted plain text in URL
2488- const char *t_secret //< token secret - used as 2st part of secret-key
2489- ) {
2490- int argc;
2491- char **argv = NULL;
2492- char *rv;
2493-
2494- if (postargs)
2495- argc = oauth_split_post_paramters(url, &argv, 0);
2496- else
2497- argc = oauth_split_url_parameters(url, &argv);
2498-
2499- rv=oauth_sign_array2(&argc, &argv, postargs,
2500- method, http_method,
2501- c_key, c_secret, t_key, t_secret);
2502-
2503- oauth_free_array(&argc, &argv);
2504- return(rv);
2505-}
2506-
2507-char *oauth_sign_array (int *argcp, char***argvp,
2508- char **postargs,
2509- OAuthMethod method,
2510- const char *c_key, //< consumer key - posted plain text
2511- const char *c_secret, //< consumer secret - used as 1st part of secret-key
2512- const char *t_key, //< token key - posted plain text in URL
2513- const char *t_secret //< token secret - used as 2st part of secret-key
2514- ) {
2515- return oauth_sign_array2 (argcp, argvp,
2516- postargs, method,
2517- NULL,
2518- c_key, c_secret,
2519- t_key, t_secret);
2520-}
2521-
2522-char *oauth_sign_array2 (int *argcp, char***argvp,
2523- char **postargs,
2524- OAuthMethod method,
2525- const char *http_method, //< HTTP request method
2526- const char *c_key, //< consumer key - posted plain text
2527- const char *c_secret, //< consumer secret - used as 1st part of secret-key
2528- const char *t_key, //< token key - posted plain text in URL
2529- const char *t_secret //< token secret - used as 2st part of secret-key
2530- ) {
2531- char oarg[1024];
2532- char *query;
2533- char *okey, *odat, *sign;
2534- char *result;
2535- char *http_request_method;
2536-
2537- if (!http_method) {
2538- http_request_method = xstrdup(postargs?"POST":"GET");
2539- } else {
2540- int i;
2541- http_request_method = xstrdup(http_method);
2542- for (i=0;i<strlen(http_request_method);i++)
2543- http_request_method[i]=toupper(http_request_method[i]);
2544- }
2545-
2546- // add OAuth protocol parameters
2547- oauth_add_protocol(argcp, argvp, method, c_key, t_key);
2548-
2549- // sort parameters
2550- qsort(&(*argvp)[1], (*argcp)-1, sizeof(char *), oauth_cmpstringp);
2551-
2552- // serialize URL
2553- query= oauth_serialize_url_parameters(*argcp, *argvp);
2554-
2555- // generate signature
2556- okey = oauth_catenc(2, c_secret, t_secret);
2557- odat = oauth_catenc(3, http_request_method, (*argvp)[0], query);
2558- free(http_request_method);
2559-#ifdef DEBUG_OAUTH
2560- fprintf (stderr, "\nliboauth: data to sign='%s'\n\n", odat);
2561- fprintf (stderr, "\nliboauth: key='%s'\n\n", okey);
2562-#endif
2563- switch(method) {
2564- case OA_RSA:
2565- sign = oauth_sign_rsa_sha1(odat,okey); // XXX okey needs to be RSA key!
2566- break;
2567- case OA_PLAINTEXT:
2568- sign = oauth_sign_plaintext(odat,okey);
2569- break;
2570- default:
2571- sign = oauth_sign_hmac_sha1(odat,okey);
2572- }
2573-#ifdef WIPE_MEMORY
2574- memset(okey,0, strlen(okey));
2575- memset(odat,0, strlen(odat));
2576-#endif
2577- free(odat);
2578- free(okey);
2579-
2580- // append signature to query args.
2581- snprintf(oarg, 1024, "oauth_signature=%s",sign);
2582- oauth_add_param_to_array(argcp, argvp, oarg);
2583- free(sign);
2584-
2585- // build URL params
2586- result = oauth_serialize_url(*argcp, (postargs?1:0), *argvp);
2587-
2588- if(postargs) {
2589- *postargs = result;
2590- result = xstrdup((*argvp)[0]);
2591- }
2592-
2593- if(query) free(query);
2594-
2595- return result;
2596-}
2597-
2598-/**
2599- * free array args
2600- *
2601- * @param argcp pointer to array length int
2602- * @param argvp pointer to array values to be free()d
2603- */
2604-void oauth_free_array(int *argcp, char ***argvp) {
2605- int i;
2606- for (i=0;i<(*argcp);i++) {
2607- free((*argvp)[i]);
2608- }
2609- if(*argvp) free(*argvp);
2610-}
2611-
2612-/**
2613- * http://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/drafts/4/spec.html
2614- */
2615-char *oauth_body_hash_file(char *filename) {
2616- unsigned char fb[BUFSIZ];
2617- EVP_MD_CTX ctx;
2618- size_t len=0;
2619- unsigned char *md;
2620- FILE *F= fopen(filename, "r");
2621- if (!F) return NULL;
2622-
2623- EVP_MD_CTX_init(&ctx);
2624- EVP_DigestInit(&ctx,EVP_sha1());
2625- while (!feof(F) && (len=fread(fb,sizeof(char),BUFSIZ, F))>0) {
2626- EVP_DigestUpdate(&ctx, fb, len);
2627- }
2628- fclose(F);
2629- len=0;
2630- md=(unsigned char*) calloc(EVP_MD_size(EVP_sha1()),sizeof(unsigned char));
2631- EVP_DigestFinal(&ctx, md, (unsigned int *) &len);
2632- EVP_MD_CTX_cleanup(&ctx);
2633- return oauth_body_hash_encode(len, md);
2634-}
2635-
2636-char *oauth_body_hash_data(size_t length, const char *data) {
2637- EVP_MD_CTX ctx;
2638- size_t len=0;
2639- unsigned char *md;
2640- md=(unsigned char*) calloc(EVP_MD_size(EVP_sha1()),sizeof(unsigned char));
2641- EVP_MD_CTX_init(&ctx);
2642- EVP_DigestInit(&ctx,EVP_sha1());
2643- EVP_DigestUpdate(&ctx, data, length);
2644- EVP_DigestFinal(&ctx, md, (unsigned int *) &len);
2645- EVP_MD_CTX_cleanup(&ctx);
2646- return oauth_body_hash_encode(len, md);
2647-}
2648-
2649-/**
2650- * base64 encode digest, free it and return a URL parameter
2651- * with the oauth_body_hash
2652- */
2653-char *oauth_body_hash_encode(size_t len, unsigned char *digest) {
2654- char *sign=oauth_encode_base64(len,digest);
2655- char *sig_url = malloc(17+strlen(sign));
2656- sprintf(sig_url,"oauth_body_hash=%s", sign);
2657- free(sign);
2658- free(digest);
2659- return sig_url;
2660-}
2661-
2662-
2663-/**
2664- * xep-0235 - TODO
2665- */
2666-char *oauth_sign_xmpp (const char *xml,
2667- OAuthMethod method,
2668- const char *c_secret, //< consumer secret - used as 1st part of secret-key
2669- const char *t_secret //< token secret - used as 2st part of secret-key
2670- ) {
2671-
2672- return NULL;
2673-}
2674-
2675-// vi: sts=2 sw=2 ts=2
2676
2677=== removed file 'libubuntuoneui/oauth.h'
2678--- libubuntuoneui/oauth.h 2010-01-06 16:48:47 +0000
2679+++ libubuntuoneui/oauth.h 1970-01-01 00:00:00 +0000
2680@@ -1,539 +0,0 @@
2681-/**
2682- * @brief oAuth.net implementation in POSIX-C.
2683- * @file oauth.h
2684- * @author Robin Gareus <robin@gareus.org>
2685- *
2686- * Copyright 2007, 2008, 2009 Robin Gareus <robin@gareus.org>
2687- *
2688- * Permission is hereby granted, free of charge, to any person obtaining a copy
2689- * of this software and associated documentation files (the "Software"), to deal
2690- * in the Software without restriction, including without limitation the rights
2691- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2692- * copies of the Software, and to permit persons to whom the Software is
2693- * furnished to do so, subject to the following conditions:
2694- *
2695- * The above copyright notice and this permission notice shall be included in
2696- * all copies or substantial portions of the Software.
2697- *
2698- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2699- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2700- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2701- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2702- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2703- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2704- * THE SOFTWARE.
2705- *
2706- */
2707-#ifndef _OAUTH_H
2708-#define _OAUTH_H 1
2709-
2710-#ifndef DOXYGEN_IGNORE
2711-// liboauth version
2712-#define LIBOAUTH_VERSION "0.5.3"
2713-#define LIBOAUTH_VERSION_MAJOR 0
2714-#define LIBOAUTH_VERSION_MINOR 5
2715-#define LIBOAUTH_VERSION_MICRO 3
2716-
2717-//interface revision number
2718-//http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
2719-#define LIBOAUTH_CUR 3
2720-#define LIBOAUTH_REV 0
2721-#define LIBOAUTH_AGE 3
2722-#endif
2723-
2724-#ifdef __GNUC__
2725-# define OA_GCC_VERSION_AT_LEAST(x,y) (__GNUC__ > x || __GNUC__ == x && __GNUC_MINOR__ >= y)
2726-#else
2727-# define OA_GCC_VERSION_AT_LEAST(x,y) 0
2728-#endif
2729-
2730-#ifndef attribute_deprecated
2731-#if OA_GCC_VERSION_AT_LEAST(3,1)
2732-# define attribute_deprecated __attribute__((deprecated))
2733-#else
2734-# define attribute_deprecated
2735-#endif
2736-#endif
2737-
2738-/** \enum OAuthMethod
2739- * signature method to used for signing the request.
2740- */
2741-typedef enum {
2742- OA_HMAC=0, ///< use HMAC-SHA1 request signing method
2743- OA_RSA, ///< use RSA signature (not implemented)
2744- OA_PLAINTEXT ///< use plain text signature (for testing only)
2745- } OAuthMethod;
2746-
2747-/**
2748- * Base64 encode and return size data in 'src'. The caller must free the
2749- * returned string.
2750- *
2751- * @param size The size of the data in src
2752- * @param src The data to be base64 encode
2753- * @return encoded string otherwise NULL
2754- */
2755-char *oauth_encode_base64(int size, const unsigned char *src);
2756-
2757-/**
2758- * Decode the base64 encoded string 'src' into the memory pointed to by
2759- * 'dest'.
2760- *
2761- * @param dest Pointer to memory for holding the decoded string.
2762- * Must be large enough to recieve the decoded string.
2763- * @param src A base64 encoded string.
2764- * @return the length of the decoded string if decode
2765- * succeeded otherwise 0.
2766- */
2767-int oauth_decode_base64(unsigned char *dest, const char *src);
2768-
2769-/**
2770- * Escape 'string' according to RFC3986 and
2771- * http://oauth.net/core/1.0/#encoding_parameters.
2772- *
2773- * @param string The data to be encoded
2774- * @return encoded string otherwise NULL
2775- * The caller must free the returned string.
2776- */
2777-char *oauth_url_escape(const char *string);
2778-
2779-/**
2780- * Parse RFC3986 encoded 'string' back to unescaped version.
2781- *
2782- * @param string The data to be unescaped
2783- * @param olen unless NULL the length of the returned string is stored there.
2784- * @return decoded string or NULL
2785- * The caller must free the returned string.
2786- */
2787-char *oauth_url_unescape(const char *string, size_t *olen);
2788-
2789-
2790-/**
2791- * returns base64 encoded HMAC-SHA1 signature for
2792- * given message and key.
2793- * both data and key need to be urlencoded.
2794- *
2795- * the returned string needs to be freed by the caller
2796- *
2797- * @param m message to be signed
2798- * @param k key used for signing
2799- * @return signature string.
2800- */
2801-char *oauth_sign_hmac_sha1 (const char *m, const char *k);
2802-
2803-/**
2804- * same as \ref oauth_sign_hmac_sha1 but allows
2805- * to specify length of message and key (in case they contain null chars).
2806- *
2807- * @param m message to be signed
2808- * @param ml length of message
2809- * @param k key used for signing
2810- * @param kl length of key
2811- * @return signature string.
2812- */
2813-char *oauth_sign_hmac_sha1_raw (const char *m, const size_t ml, const char *k, const size_t kl);
2814-
2815-/**
2816- * returns plaintext signature for the given key.
2817- *
2818- * the returned string needs to be freed by the caller
2819- *
2820- * @param m message to be signed
2821- * @param k key used for signing
2822- * @return signature string
2823- */
2824-char *oauth_sign_plaintext (const char *m, const char *k);
2825-
2826-/**
2827- * returns RSA-SHA1 signature for given data.
2828- * the returned signature needs to be freed by the caller.
2829- *
2830- * @param m message to be signed
2831- * @param k private-key PKCS and Base64-encoded
2832- * @return base64 encoded signature string.
2833- */
2834-char *oauth_sign_rsa_sha1 (const char *m, const char *k);
2835-
2836-/**
2837- * verify RSA-SHA1 signature.
2838- *
2839- * returns the output of EVP_VerifyFinal() for a given message,
2840- * cert/pubkey and signature.
2841- *
2842- * @param m message to be verified
2843- * @param c public-key or x509 certificate
2844- * @param s base64 encoded signature
2845- * @return 1 for a correct signature, 0 for failure and -1 if some other error occurred
2846- */
2847-int oauth_verify_rsa_sha1 (const char *m, const char *c, const char *s);
2848-
2849-/**
2850- * url-escape strings and concatenate with '&' separator.
2851- * The number of strings to be concatenated must be
2852- * given as first argument.
2853- * all arguments thereafter must be of type (char *)
2854- *
2855- * @param len the number of arguments to follow this parameter
2856- *
2857- * @return pointer to memory holding the concatenated
2858- * strings - needs to be free(d) by the caller. or NULL
2859- * in case we ran out of memory.
2860- */
2861-char *oauth_catenc(int len, ...);
2862-
2863-/**
2864- * splits the given url into a parameter array.
2865- * (see \ref oauth_serialize_url and \ref oauth_serialize_url_parameters for the reverse)
2866- * (see \ref oauth_split_post_paramters for a more generic version)
2867- *
2868- * @param url the url or query-string to parse; may be NULL
2869- * @param argv pointer to a (char *) array where the results are stored.
2870- * The array is re-allocated to match the number of parameters and each
2871- * parameter-string is allocated with strdup. - The memory needs to be freed
2872- * by the caller.
2873- *
2874- * @return number of parameter(s) in array.
2875- */
2876-int oauth_split_url_parameters(const char *url, char ***argv);
2877-
2878-/**
2879- * splits the given url into a parameter array.
2880- * (see \ref oauth_serialize_url and \ref oauth_serialize_url_parameters for the reverse)
2881- *
2882- * @param url the url or query-string to parse.
2883- * @param argv pointer to a (char *) array where the results are stored.
2884- * The array is re-allocated to match the number of parameters and each
2885- * parameter-string is allocated with strdup. - The memory needs to be freed
2886- * by the caller.
2887- * @param qesc use query parameter escape (vs post-param-escape) - if set
2888- * to 1 all '+' are treated as spaces ' '
2889- *
2890- * @return number of parameter(s) in array.
2891- */
2892-int oauth_split_post_paramters(const char *url, char ***argv, short qesc);
2893-
2894-/**
2895- * build a url query string from an array.
2896- *
2897- * @param argc the total number of elements in the array
2898- * @param start element in the array at which to start concatenating.
2899- * @param argv parameter-array to concatenate.
2900- * @return url string needs to be freed by the caller.
2901- *
2902- */
2903-char *oauth_serialize_url (int argc, int start, char **argv);
2904-
2905-/**
2906- * encode query parameters from an array.
2907- *
2908- * @param argc the total number of elements in the array
2909- * @param start element in the array at which to start concatenating.
2910- * @param argv parameter-array to concatenate.
2911- * @param sep separator for parameters (usually "&")
2912- * @return url string needs to be freed by the caller.
2913- */
2914-char *oauth_serialize_url_sep (int argc, int start, char **argv, char *sep);
2915-
2916-/**
2917- * build a query parameter string from an array.
2918- *
2919- * This function is a shortcut for \ref oauth_serialize_url (argc, 1, argv).
2920- * It strips the leading host/path, which is usually the first
2921- * element when using oauth_split_url_parameters on an URL.
2922- *
2923- * @param argc the total number of elements in the array
2924- * @param argv parameter-array to concatenate.
2925- * @return url string needs to be freed by the caller.
2926- */
2927-char *oauth_serialize_url_parameters (int argc, char **argv);
2928-
2929-/**
2930- * generate a random string between 15 and 32 chars length
2931- * and return a pointer to it. The value needs to be freed by the
2932- * caller
2933- *
2934- * @return zero terminated random string.
2935- */
2936-char *oauth_gen_nonce();
2937-
2938-/**
2939- * string compare function for oauth parameters.
2940- *
2941- * used with qsort. needed to normalize request parameters.
2942- * see http://oauth.net/core/1.0/#anchor14
2943- */
2944-int oauth_cmpstringp(const void *p1, const void *p2);
2945-
2946-
2947-/**
2948- * search array for parameter key.
2949- * @param argv length of array to search
2950- * @param argc parameter array to search
2951- * @param key key of parameter to check.
2952- *
2953- * @return FALSE (0) if array does not contain a paramater with given key, TRUE (1) otherwise.
2954- */
2955-int oauth_param_exists(char **argv, int argc, char *key);
2956-
2957-/**
2958- * add query parameter to array
2959- *
2960- * @param argcp pointer to array length int
2961- * @param argvp pointer to array values
2962- * @param addparam parameter to add (eg. "foo=bar")
2963- */
2964-void oauth_add_param_to_array(int *argcp, char ***argvp, const char *addparam);
2965-
2966-/**
2967- * free array args
2968- *
2969- * @param argcp pointer to array length int
2970- * @param argvp pointer to array values to be free()d
2971- */
2972-void oauth_free_array(int *argcp, char ***argvp);
2973-
2974-/**
2975- * calculate oAuth-signature for a given HTTP request URL, parameters and oauth-tokens.
2976- *
2977- * if 'postargs' is NULL a "GET" request is signed and the
2978- * signed URL is returned. Else this fn will modify 'postargs'
2979- * to point to memory that contains the signed POST-variables
2980- * and returns the base URL.
2981- *
2982- * both, the return value and (if given) 'postargs' need to be freed
2983- * by the caller.
2984- *
2985- * @param url The request URL to be signed. append all GET or POST
2986- * query-parameters separated by either '?' or '&' to this parameter.
2987- *
2988- * @param postargs This parameter points to an area where the return value
2989- * is stored. If 'postargs' is NULL, no value is stored.
2990- *
2991- * @param method specify the signature method to use. It is of type
2992- * \ref OAuthMethod and most likely \ref OA_HMAC.
2993- *
2994- * @param http_method The HTTP request method to use (ie "GET", "PUT",..)
2995- * If NULL is given as 'http_method' this defaults to "GET" when
2996- * 'postargs' is also NULL and when postargs is not NULL "POST" is used.
2997- *
2998- * @param c_key consumer key
2999- * @param c_secret consumer secret
3000- * @param t_key token key
3001- * @param t_secret token secret
3002- *
3003- * @return the signed url or NULL if an error occurred.
3004- *
3005- */
3006-char *oauth_sign_url2 (const char *url, char **postargs,
3007- OAuthMethod method,
3008- const char *http_method, //< HTTP request method
3009- const char *c_key, //< consumer key - posted plain text
3010- const char *c_secret, //< consumer secret - used as 1st part of secret-key
3011- const char *t_key, //< token key - posted plain text in URL
3012- const char *t_secret //< token secret - used as 2st part of secret-key
3013- );
3014-
3015-/**
3016- * @deprecated Use oauth_sign_url2() instead.
3017- */
3018-char *oauth_sign_url (const char *url, char **postargs,
3019- OAuthMethod method,
3020- const char *c_key, //< consumer key - posted plain text
3021- const char *c_secret, //< consumer secret - used as 1st part of secret-key
3022- const char *t_key, //< token key - posted plain text in URL
3023- const char *t_secret //< token secret - used as 2st part of secret-key
3024- ) attribute_deprecated;
3025-
3026-/**
3027- * same as /ref oauth_sign_url
3028- * with the url already split into parameter array
3029- *
3030- * @param argcp pointer to array length int
3031- * @param argvp pointer to array values
3032- * (argv[0]="http://example.org:80/" argv[1]="first=QueryParamater" ..)
3033- *
3034- * @param postargs This parameter points to an area where the return value
3035- * is stored. If 'postargs' is NULL, no value is stored.
3036- *
3037- * @param method specify the signature method to use. It is of type
3038- * \ref OAuthMethod and most likely \ref OA_HMAC.
3039- *
3040- * @param http_method The HTTP request method to use (ie "GET", "PUT",..)
3041- * If NULL is given as 'http_method' this defaults to "GET" when
3042- * 'postargs' is also NULL and when postargs is not NULL "POST" is used.
3043- *
3044- * @param c_key consumer key
3045- * @param c_secret consumer secret
3046- * @param t_key token key
3047- * @param t_secret token secret
3048- *
3049- * @return the signed url or NULL if an error occurred.
3050- */
3051-char *oauth_sign_array2 (int *argcp, char***argvp,
3052- char **postargs,
3053- OAuthMethod method,
3054- const char *http_method, //< HTTP request method
3055- const char *c_key, //< consumer key - posted plain text
3056- const char *c_secret, //< consumer secret - used as 1st part of secret-key
3057- const char *t_key, //< token key - posted plain text in URL
3058- const char *t_secret //< token secret - used as 2st part of secret-key
3059- );
3060-
3061-/**
3062- * @deprecated Use oauth_sign_array2() instead.
3063- */
3064-char *oauth_sign_array (int *argcp, char***argvp,
3065- char **postargs,
3066- OAuthMethod method,
3067- const char *c_key, //< consumer key - posted plain text
3068- const char *c_secret, //< consumer secret - used as 1st part of secret-key
3069- const char *t_key, //< token key - posted plain text in URL
3070- const char *t_secret //< token secret - used as 2st part of secret-key
3071- ) attribute_deprecated;
3072-
3073-
3074-/**
3075- * calculate body hash (sha1sum) of given file and return
3076- * a oauth_body_hash=xxxx parameter to be added to the request.
3077- * The returned string needs to be freed by the calling function.
3078- *
3079- * see
3080- * http://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/drafts/4/spec.html
3081- *
3082- * @param filename the filename to calculate the hash for
3083- *
3084- * @return URL oauth_body_hash parameter string
3085- */
3086-char *oauth_body_hash_file(char *filename);
3087-
3088-/**
3089- * calculate body hash (sha1sum) of given data and return
3090- * a oauth_body_hash=xxxx parameter to be added to the request.
3091- * The returned string needs to be freed by the calling function.
3092- * The returned string is not yet url-escaped and suitable to be
3093- * passed as argument to \ref oauth_catenc.
3094- *
3095- * see
3096- * http://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/drafts/4/spec.html
3097- *
3098- * @param length length of the data parameter in bytes
3099- * @param data to calculate the hash for
3100- *
3101- * @return URL oauth_body_hash parameter string
3102- */
3103-char *oauth_body_hash_data(size_t length, const char *data);
3104-
3105-/**
3106- * base64 encode digest, free it and return a URL parameter
3107- * with the oauth_body_hash. The returned hash needs to be freed by the
3108- * calling function. The returned string is not yet url-escaped and
3109- * thus suitable to be passed to \ref oauth_catenc.
3110- *
3111- * @param len length of the digest to encode
3112- * @param digest hash value to encode
3113- *
3114- * @return URL oauth_body_hash parameter string
3115- */
3116-char *oauth_body_hash_encode(size_t len, unsigned char *digest);
3117-
3118-/**
3119- * xep-0235 - TODO
3120- */
3121-char *oauth_sign_xmpp (const char *xml,
3122- OAuthMethod method,
3123- const char *c_secret, //< consumer secret - used as 1st part of secret-key
3124- const char *t_secret //< token secret - used as 2st part of secret-key
3125- );
3126-
3127-/**
3128- * do a HTTP GET request, wait for it to finish
3129- * and return the content of the reply.
3130- * (requires libcurl or a command-line HTTP client)
3131- *
3132- * If compiled <b>without</b> libcurl this function calls
3133- * a command-line executable defined in the environment variable
3134- * OAUTH_HTTP_GET_CMD - it defaults to
3135- * <tt>curl -sA 'liboauth-agent/0.1' '%%u'</tt>
3136- * where %%u is replaced with the URL and query parameters.
3137- *
3138- * bash & wget example:
3139- * <tt>export OAUTH_HTTP_CMD="wget -q -U 'liboauth-agent/0.1' '%%u' "</tt>
3140- *
3141- * WARNING: this is a tentative function. it's convenient and handy for testing
3142- * or developing oAuth code. But don't rely on this function
3143- * to become a stable part of this API. It does not do
3144- * much error checking or handling for one thing..
3145- *
3146- * NOTE: \a u and \a q are just concatenated with a '?' in between,
3147- * unless \a q is NULL. in which case only \a u will be used.
3148- *
3149- * @param u base url to get
3150- * @param q query string to send along with the HTTP request or NULL.
3151- * @return In case of an error NULL is returned; otherwise a pointer to the
3152- * replied content from HTTP server. latter needs to be freed by caller.
3153- */
3154-char *oauth_http_get (const char *u, const char *q);
3155-
3156-
3157-/**
3158- * do a HTTP POST request, wait for it to finish
3159- * and return the content of the reply.
3160- * (requires libcurl or a command-line HTTP client)
3161- *
3162- * If compiled <b>without</b> libcurl this function calls
3163- * a command-line executable defined in the environment variable
3164- * OAUTH_HTTP_CMD - it defaults to
3165- * <tt>curl -sA 'liboauth-agent/0.1' -d '%%p' '%%u'</tt>
3166- * where %%p is replaced with the postargs and %%u is replaced with
3167- * the URL.
3168- *
3169- * bash & wget example:
3170- * <tt>export OAUTH_HTTP_CMD="wget -q -U 'liboauth-agent/0.1' --post-data='%%p' '%%u' "</tt>
3171- *
3172- * NOTE: This function uses the curl's default HTTP-POST Content-Type:
3173- * application/x-www-form-urlencoded which is the only option allowed
3174- * by oauth core 1.0 spec. Experimental code can use the Environment variable
3175- * to transmit custom HTTP headers or parameters.
3176- *
3177- * WARNING: this is a tentative function. it's convenient and handy for testing
3178- * or developing oAuth code. But don't rely on this function
3179- * to become a stable part of this API. It does not do
3180- * much error checking for one thing..
3181- *
3182- * @param u url to query
3183- * @param p postargs to send along with the HTTP request.
3184- * @return replied content from HTTP server. needs to be freed by caller.
3185- */
3186-char *oauth_http_post (const char *u, const char *p);
3187-
3188-/**
3189- * http post raw data from file.
3190- * the returned string needs to be freed by the caller
3191- * (requires libcurl)
3192- *
3193- * see dislaimer: /ref oauth_http_post
3194- *
3195- * @param u url to retrieve
3196- * @param fn filename of the file to post along
3197- * @param len length of the file in bytes. set to '0' for autodetection
3198- * @param customheader specify custom HTTP header (or NULL for default)
3199- * @return returned HTTP reply or NULL on error
3200- */
3201-char *oauth_post_file (const char *u, const char *fn, size_t len, const char *customheader);
3202-
3203-/**
3204- * http post raw data
3205- * the returned string needs to be freed by the caller
3206- * (requires libcurl)
3207- *
3208- * see dislaimer: /ref oauth_http_post
3209- *
3210- * @param u url to retrieve
3211- * @param data data to post
3212- * @param len length of the data in bytes.
3213- * @param customheader specify custom HTTP header (or NULL for default)
3214- * @return returned HTTP reply or NULL on error
3215- */
3216-char *oauth_post_data (const char *u, const char *data, size_t len, const char *customheader);
3217-
3218-#endif
3219-/* vi:set ts=8 sts=2 sw=2: */
3220
3221=== modified file 'libubuntuoneui/u1-codec-installer.c'
3222--- libubuntuoneui/u1-codec-installer.c 2012-01-27 17:09:25 +0000
3223+++ libubuntuoneui/u1-codec-installer.c 2012-04-05 18:42:22 +0000
3224@@ -1,9 +1,9 @@
3225 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3226 /*
3227- * Copyright (C) 2011 Canonical, Ltd.
3228+ * Copyright (C) 2011-2012 Canonical Ltd.
3229 *
3230 * This library is free software; you can redistribute it and/or
3231- * modify it under the terms of version 2 of the GNU Lesser General Public
3232+ * modify it under the terms of version 3 of the GNU Lesser General Public
3233 * License as published by the Free Software Foundation.
3234 *
3235 * This program is distributed in the hope that it will be useful,
3236
3237=== modified file 'libubuntuoneui/u1-codec-installer.h'
3238--- libubuntuoneui/u1-codec-installer.h 2011-04-01 17:19:03 +0000
3239+++ libubuntuoneui/u1-codec-installer.h 2012-04-05 18:42:22 +0000
3240@@ -1,9 +1,9 @@
3241 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3242 /*
3243- * Copyright (C) 2011 Canonical, Ltd.
3244+ * Copyright (C) 2011-2012 Canonical Ltd.
3245 *
3246 * This library is free software; you can redistribute it and/or
3247- * modify it under the terms of version 2 of the GNU Lesser General Public
3248+ * modify it under the terms of version 3 of the GNU Lesser General Public
3249 * License as published by the Free Software Foundation.
3250 *
3251 * This program is distributed in the hope that it will be useful,
3252
3253=== modified file 'libubuntuoneui/u1-music-store.c'
3254--- libubuntuoneui/u1-music-store.c 2012-04-02 17:27:16 +0000
3255+++ libubuntuoneui/u1-music-store.c 2012-04-05 18:42:22 +0000
3256@@ -1,11 +1,11 @@
3257 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3258 /*
3259- * Copyright (C) 2009-2010 Canonical Services Ltd (www.canonical.com)
3260+ * Copyright (C) 2009-2012 Canonical Ltd.
3261 *
3262 * Authors: Rodrigo Moya <rodrigo.moya@canonical.com>
3263 *
3264 * This library is free software; you can redistribute it and/or
3265- * modify it under the terms of version 2 of the GNU Lesser General Public
3266+ * modify it under the terms of version 3 of the GNU Lesser General Public
3267 * License as published by the Free Software Foundation.
3268 *
3269 * This program is distributed in the hope that it will be useful,
3270@@ -29,7 +29,7 @@
3271 #include <libsoup/soup-gnome-features.h>
3272 #include <libsoup/soup-uri.h>
3273 #include <libsyncdaemon/libsyncdaemon.h>
3274-#include "oauth.h"
3275+#include <oauth.h>
3276 #include "u1-music-store.h"
3277 #include "u1-marshal.h"
3278 #include "u1-codec-installer.h"
3279
3280=== modified file 'libubuntuoneui/u1-music-store.h'
3281--- libubuntuoneui/u1-music-store.h 2010-08-26 23:20:11 +0000
3282+++ libubuntuoneui/u1-music-store.h 2012-04-05 18:42:22 +0000
3283@@ -1,11 +1,11 @@
3284 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3285 /*
3286- * Copyright (C) 2009 Canonical Services Ltd (www.canonical.com)
3287+ * Copyright (C) 2009-2012 Canonical Ltd.
3288 *
3289 * Authors: Rodrigo Moya <rodrigo.moya@canonical.com>
3290 *
3291 * This library is free software; you can redistribute it and/or
3292- * modify it under the terms of version 2 of the GNU Lesser General Public
3293+ * modify it under the terms of version 3 of the GNU Lesser General Public
3294 * License as published by the Free Software Foundation.
3295 *
3296 * This program is distributed in the hope that it will be useful,
3297
3298=== modified file 'libubuntuoneui/u1-request-chrome.c'
3299--- libubuntuoneui/u1-request-chrome.c 2011-03-11 21:14:47 +0000
3300+++ libubuntuoneui/u1-request-chrome.c 2012-04-05 18:42:22 +0000
3301@@ -1,9 +1,9 @@
3302 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3303 /*
3304- * Copyright (C) 2011 Canonical, Ltd.
3305+ * Copyright (C) 2011-2012 Canonical Ltd.
3306 *
3307 * This library is free software; you can redistribute it and/or
3308- * modify it under the terms of version 2 of the GNU Lesser General Public
3309+ * modify it under the terms of version 3 of the GNU Lesser General Public
3310 * License as published by the Free Software Foundation.
3311 *
3312 * This program is distributed in the hope that it will be useful,
3313
3314=== modified file 'libubuntuoneui/u1-request-chrome.h'
3315--- libubuntuoneui/u1-request-chrome.h 2011-03-11 20:06:30 +0000
3316+++ libubuntuoneui/u1-request-chrome.h 2012-04-05 18:42:22 +0000
3317@@ -1,9 +1,9 @@
3318 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3319 /*
3320- * Copyright (C) 2011 Canonical, Ltd.
3321+ * Copyright (C) 2011-2012 Canonical Ltd.
3322 *
3323 * This library is free software; you can redistribute it and/or
3324- * modify it under the terms of version 2 of the GNU Lesser General Public
3325+ * modify it under the terms of version 3 of the GNU Lesser General Public
3326 * License as published by the Free Software Foundation.
3327 *
3328 * This program is distributed in the hope that it will be useful,
3329
3330=== removed file 'libubuntuoneui/xmalloc.c'
3331--- libubuntuoneui/xmalloc.c 2010-01-06 16:48:47 +0000
3332+++ libubuntuoneui/xmalloc.c 1970-01-01 00:00:00 +0000
3333@@ -1,151 +0,0 @@
3334-/* xmalloc.c -- malloc with out of memory checking
3335- Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 99 Free Software Foundation, Inc.
3336-
3337- This program is free software; you can redistribute it and/or modify
3338- it under the terms of the GNU General Public License as published by
3339- the Free Software Foundation; either version 2, or (at your option)
3340- any later version.
3341-
3342- This program is distributed in the hope that it will be useful,
3343- but WITHOUT ANY WARRANTY; without even the implied warranty of
3344- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3345- GNU General Public License for more details.
3346-
3347- You should have received a copy of the GNU General Public License
3348- along with this program; if not, write to the Free Software Foundation,
3349- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
3350-
3351-#if HAVE_CONFIG_H
3352-# include <config.h>
3353-#endif
3354-
3355-#ifndef USE_LGPL
3356-// TODO better use #define in header file?!
3357-#include <string.h>
3358-#include <stdlib.h>
3359-void *xmalloc (size_t n) {return malloc(n);}
3360-void *xcalloc (size_t n, size_t s) {return calloc(n,s);}
3361-void *xrealloc (void *p, size_t n) {return realloc(p,n);}
3362-char *xstrdup (const char *p) {return strdup(p);}
3363-
3364-#else // LGPL LICENSED CODE
3365-#if __STDC__
3366-# define VOID void
3367-#else
3368-# define VOID char
3369-#endif
3370-
3371-#include <stdio.h> /* for stderr */
3372-
3373-#if STDC_HEADERS
3374-
3375-#include <sys/types.h>
3376-#include <string.h> /* for strlen etc. */
3377-#include <stdlib.h>
3378-
3379-#else /* !STDC_HEADERS */
3380-
3381-extern size_t strlen ();
3382-extern char *strcpy ();
3383-
3384-VOID *calloc ();
3385-VOID *malloc ();
3386-VOID *realloc ();
3387-void free ();
3388-#endif
3389-
3390-#if ENABLE_NLS
3391-# include <libintl.h>
3392-# define _(Text) gettext (Text)
3393-#else
3394-# define textdomain(Domain)
3395-# define _(Text) Text
3396-#endif
3397-
3398-/* Prototypes for functions defined here. */
3399-#if defined (__STDC__) && __STDC__
3400-static VOID *fixup_null_alloc (size_t n);
3401-VOID *xmalloc (size_t n);
3402-VOID *xcalloc (size_t n, size_t s);
3403-VOID *xrealloc (VOID *p, size_t n);
3404-char *xstrdup (const char *p);
3405-#endif
3406-
3407-
3408-static VOID *
3409-fixup_null_alloc (n)
3410- size_t n;
3411-{
3412- VOID *p;
3413-
3414- p = 0;
3415- if (n == 0)
3416- p = malloc ((size_t) 1);
3417- if (p == 0)
3418- {
3419- /* possible revisions: release some memory and re-try, print
3420- more information (e.g. line number of input file) */
3421- fprintf(stderr, _("liboauth: Memory exhausted"));
3422- exit(1);
3423- }
3424- return p;
3425-}
3426-
3427-/* Allocate N bytes of memory dynamically, with error checking. */
3428-
3429-VOID *
3430-xmalloc (n)
3431- size_t n;
3432-{
3433- VOID *p;
3434-
3435- p = malloc (n);
3436- if (p == 0)
3437- p = fixup_null_alloc (n);
3438- return p;
3439-}
3440-
3441-/* Allocate memory for N elements of S bytes, with error checking. */
3442-
3443-VOID *
3444-xcalloc (n, s)
3445- size_t n, s;
3446-{
3447- VOID *p;
3448-
3449- p = calloc (n, s);
3450- if (p == 0)
3451- p = fixup_null_alloc (n);
3452- return p;
3453-}
3454-
3455-/* Change the size of an allocated block of memory P to N bytes,
3456- with error checking.
3457- If P is NULL, run xmalloc. */
3458-
3459-VOID *
3460-xrealloc (p, n)
3461- VOID *p;
3462- size_t n;
3463-{
3464- if (p == 0)
3465- return xmalloc (n);
3466- p = realloc (p, n);
3467- if (p == 0)
3468- p = fixup_null_alloc (n);
3469- return p;
3470-}
3471-
3472-/* Make a copy of a string in a newly allocated block of memory. */
3473-
3474-char *
3475-xstrdup (str)
3476- const char *str;
3477-{
3478- VOID *p;
3479-
3480- p = xmalloc (strlen (str) + 1);
3481- strcpy (p, str);
3482- return p;
3483-}
3484-#endif
3485
3486=== removed file 'libubuntuoneui/xmalloc.h'
3487--- libubuntuoneui/xmalloc.h 2010-01-06 16:48:47 +0000
3488+++ libubuntuoneui/xmalloc.h 1970-01-01 00:00:00 +0000
3489@@ -1,12 +0,0 @@
3490-/* Prototypes for functions defined in xmalloc.c */
3491-
3492-void *xmalloc (size_t n);
3493-void *xcalloc (size_t n, size_t s);
3494-void *xrealloc (void *p, size_t n);
3495-char *xstrdup (const char *p);
3496-
3497-/* POSIX prototypes - avoid compiler warnings with '-posix' */
3498-int strncasecmp(const char *s1, const char *s2, size_t n);
3499-int snprintf(char *str, size_t size, const char *format, ...);
3500-FILE *popen(const char *command, const char *type);
3501-int pclose(FILE *stream);
3502
3503=== modified file 'po/POTFILES.in'
3504--- po/POTFILES.in 2012-01-27 20:48:39 +0000
3505+++ po/POTFILES.in 2012-04-05 18:42:22 +0000
3506@@ -1,3 +1,2 @@
3507 libubuntuoneui/u1-codec-installer.c
3508 libubuntuoneui/u1-music-store.c
3509-libubuntuoneui/xmalloc.c
3510
3511=== removed file 'po/POTFILES.skip'
3512--- po/POTFILES.skip 2011-02-16 15:30:29 +0000
3513+++ po/POTFILES.skip 1970-01-01 00:00:00 +0000
3514@@ -1,1 +0,0 @@
3515-bindings/python/ubuntuone/__init__.py
3516
3517=== modified file 'tests/test-music-store.c'
3518--- tests/test-music-store.c 2012-01-27 20:48:39 +0000
3519+++ tests/test-music-store.c 2012-04-05 18:42:22 +0000
3520@@ -1,11 +1,11 @@
3521 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3522 /*
3523- * Copyright (C) 2009 Canonical Services Ltd (www.canonical.com)
3524+ * Copyright (C) 2009-2012 Canonical Ltd.
3525 *
3526 * Authors: Rodrigo Moya <rodrigo.moya@canonical.com>
3527 *
3528 * This library is free software; you can redistribute it and/or
3529- * modify it under the terms of version 2 of the GNU Lesser General Public
3530+ * modify it under the terms of version 3 of the GNU Lesser General Public
3531 * License as published by the Free Software Foundation.
3532 *
3533 * This program is distributed in the hope that it will be useful,

Subscribers

People subscribed via source and target branches