Browse Source

Import of revision 66 from svn.trinitydesktop.org

Please keep this in sync with the upstream SVN


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/dbus-tqt@1225998 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
tags/v3.5.13
tpearson 9 years ago
commit
8bf92ab485
32 changed files with 26102 additions and 0 deletions
  1. +16
    -0
      AUTHORS
  2. +82
    -0
      CMakeLists.txt
  3. +551
    -0
      COPYING
  4. +13661
    -0
      ChangeLog
  5. +22
    -0
      ConfigureChecks.cmake
  6. +200
    -0
      HACKING
  7. +294
    -0
      INSTALL
  8. +504
    -0
      NEWS
  9. +101
    -0
      README
  10. +168
    -0
      connection.cpp
  11. +84
    -0
      connection.h
  12. +81
    -0
      dbus-qt.h
  13. +164
    -0
      dbus-qthread.cpp
  14. +6
    -0
      debian/changelog
  15. +1
    -0
      debian/compat
  16. +39
    -0
      debian/control
  17. +214
    -0
      debian/copyright
  18. +1
    -0
      debian/libdbus-tqt-1-1c2.install
  19. +5
    -0
      debian/libdbus-tqt-1-dev.install
  20. +12
    -0
      debian/rules
  21. +530
    -0
      depcomp
  22. +323
    -0
      install-sh
  23. +244
    -0
      integrator.cpp
  24. +94
    -0
      integrator.h
  25. +6871
    -0
      ltmain.sh
  26. +561
    -0
      message.cpp
  27. +131
    -0
      message.h
  28. +360
    -0
      missing
  29. +37
    -0
      qt3/Makefile.am
  30. +597
    -0
      qt3/Makefile.in
  31. +90
    -0
      server.cpp
  32. +58
    -0
      server.h

+ 16
- 0
AUTHORS View File

@@ -0,0 +1,16 @@
Olivier Andrieu <oliv__a@users.sourceforge.net>
Philip Blundell <pb@nexus.co.uk>
Anders Carlsson <andersca@gnome.org>
Kristian Hogsberg <krh@redhat.com>
Alex Larsson <alexl@redhat.com>
Robert McQueen <robot101@debian.org>
Michael Meeks <michael@ximian.com>
Seth Nickell <seth@gnome.org>
John (J5) Palmieri <johnp@redhat.com>
Havoc Pennington <hp@redhat.com>
Harri Porten <porten@kde.org>
Matthew Rickard <mjricka@epoch.ncsc.mil>
Zack Rusin <zack@kde.org>
Joe Shaw <joe@assbarn.com>
Colin Walters <walters@verbum.org>
David Zeuthen <david@fubar.dk>

+ 82
- 0
CMakeLists.txt View File

@@ -0,0 +1,82 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################

project( dbus-tqt-1 )


##### cmake setup ###############################

cmake_minimum_required( VERSION 2.8 )

include( FindPkgConfig )
include( CheckCXXSourceCompiles )

set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include( TDEMacros )
include( ConfigureChecks.cmake )


##### install paths setup #######################

tde_setup_install_path( EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" )
tde_setup_install_path( LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" )
tde_setup_install_path( INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" )
tde_setup_install_path( PKGCONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig" )


##### install headers ###########################

install( FILES
dbus-qt.h message.h connection.h server.h
DESTINATION ${INCLUDE_INSTALL_DIR}/dbus-1.0/dbus )


##### write pkgconfig file ######################

# string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_EXEC_PREFIX ${EXEC_INSTALL_PREFIX} )
# string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_INCLUDE_DIR ${INCLUDE_INSTALL_DIR} )
# string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_LIB_DIR ${LIB_INSTALL_DIR} )
# configure_file( dbus-tqt.pc.cmake dbus-tqt.pc @ONLY )
# install( FILES ${CMAKE_CURRENT_BINARY_DIR}/dbus-tqt.pc DESTINATION ${PKGCONFIG_INSTALL_DIR} )


##### build setup ###############################

set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include tqt.h" )
set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )

add_definitions(
-DQT_THREAD_SUPPORT
${TQT_CFLAGS_OTHER}
)

include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${TQT_INCLUDE_DIRS}
${DBUS_INCLUDE_DIRS}
)

link_directories(
${TQT_LIBRARY_DIRS}
)


##### dbus-tqt-1 (shared) #########################

tde_add_library( dbus-tqt-1 SHARED AUTOMOC
SOURCES
dbus-qthread.cpp message.cpp connection.cpp
integrator.cpp server.cpp
VERSION 0.0.0
LINK ${TQT_LIBRARIES} ${DBUS_LIBRARIES}
DESTINATION ${LIB_INSTALL_DIR}
)

+ 551
- 0
COPYING View File

@@ -0,0 +1,551 @@
D-BUS is licensed to you under your choice of the Academic Free
License version 2.1, or the GNU General Public License version 2.
Both licenses are included here. Some of the standalone binaries are
under the GPL only; in particular, but not limited to,
tools/dbus-cleanup-sockets.c and test/decode-gcov.c. Each source code
file is marked with the proper copyright information.



The Academic Free License
v. 2.1

This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following notice immediately following the copyright notice for the Original Work:

Licensed under the Academic Free License version 2.1

1) Grant of Copyright License. Licensor hereby grants You a
world-wide, royalty-free, non-exclusive, perpetual, sublicenseable
license to do the following:

a) to reproduce the Original Work in copies;

b) to prepare derivative works ("Derivative Works") based upon the Original Work;

c) to distribute copies of the Original Work and Derivative Works to the public;

d) to perform the Original Work publicly; and

e) to display the Original Work publicly.

2) Grant of Patent License. Licensor hereby grants You a world-wide,
royalty-free, non-exclusive, perpetual, sublicenseable license, under
patent claims owned or controlled by the Licensor that are embodied in
the Original Work as furnished by the Licensor, to make, use, sell and
offer for sale the Original Work and Derivative Works.

3) Grant of Source Code License. The term "Source Code" means the
preferred form of the Original Work for making modifications to it and
all available documentation describing how to modify the Original
Work. Licensor hereby agrees to provide a machine-readable copy of the
Source Code of the Original Work along with each copy of the Original
Work that Licensor distributes. Licensor reserves the right to satisfy
this obligation by placing a machine-readable copy of the Source Code
in an information repository reasonably calculated to permit
inexpensive and convenient access by You for as long as Licensor
continues to distribute the Original Work, and by publishing the
address of that information repository in a notice immediately
following the copyright notice that applies to the Original Work.

4) Exclusions From License Grant. Neither the names of Licensor, nor
the names of any contributors to the Original Work, nor any of their
trademarks or service marks, may be used to endorse or promote
products derived from this Original Work without express prior written
permission of the Licensor. Nothing in this License shall be deemed to
grant any rights to trademarks, copyrights, patents, trade secrets or
any other intellectual property of Licensor except as expressly stated
herein. No patent license is granted to make, use, sell or offer to
sell embodiments of any patent claims other than the licensed claims
defined in Section 2. No right is granted to the trademarks of
Licensor even if such marks are included in the Original Work. Nothing
in this License shall be interpreted to prohibit Licensor from
licensing under different terms from this License any Original Work
that Licensor otherwise would have a right to license.

5) This section intentionally omitted.

6) Attribution Rights. You must retain, in the Source Code of any
Derivative Works that You create, all copyright, patent or trademark
notices from the Source Code of the Original Work, as well as any
notices of licensing and any descriptive text identified therein as an
"Attribution Notice." You must cause the Source Code for any
Derivative Works that You create to carry a prominent Attribution
Notice reasonably calculated to inform recipients that You have
modified the Original Work.

7) Warranty of Provenance and Disclaimer of Warranty. Licensor
warrants that the copyright in and to the Original Work and the patent
rights granted herein by Licensor are owned by the Licensor or are
sublicensed to You under the terms of this License with the permission
of the contributor(s) of those copyrights and patent rights. Except as
expressly stated in the immediately proceeding sentence, the Original
Work is provided under this License on an "AS IS" BASIS and WITHOUT
WARRANTY, either express or implied, including, without limitation,
the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL
WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential
part of this License. No license to Original Work is granted hereunder
except under this disclaimer.

8) Limitation of Liability. Under no circumstances and under no legal
theory, whether in tort (including negligence), contract, or
otherwise, shall the Licensor be liable to any person for any direct,
indirect, special, incidental, or consequential damages of any
character arising as a result of this License or the use of the
Original Work including, without limitation, damages for loss of
goodwill, work stoppage, computer failure or malfunction, or any and
all other commercial damages or losses. This limitation of liability
shall not apply to liability for death or personal injury resulting
from Licensor's negligence to the extent applicable law prohibits such
limitation. Some jurisdictions do not allow the exclusion or
limitation of incidental or consequential damages, so this exclusion
and limitation may not apply to You.

9) Acceptance and Termination. If You distribute copies of the
Original Work or a Derivative Work, You must make a reasonable effort
under the circumstances to obtain the express assent of recipients to
the terms of this License. Nothing else but this License (or another
written agreement between Licensor and You) grants You permission to
create Derivative Works based upon the Original Work or to exercise
any of the rights granted in Section 1 herein, and any attempt to do
so except under the terms of this License (or another written
agreement between Licensor and You) is expressly prohibited by
U.S. copyright law, the equivalent laws of other countries, and by
international treaty. Therefore, by exercising any of the rights
granted to You in Section 1 herein, You indicate Your acceptance of
this License and all of its terms and conditions.

10) Termination for Patent Action. This License shall terminate
automatically and You may no longer exercise any of the rights granted
to You by this License as of the date You commence an action,
including a cross-claim or counterclaim, against Licensor or any
licensee alleging that the Original Work infringes a patent. This
termination provision shall not apply for an action alleging patent
infringement by combinations of the Original Work with other software
or hardware.

11) Jurisdiction, Venue and Governing Law. Any action or suit relating
to this License may be brought only in the courts of a jurisdiction
wherein the Licensor resides or in which Licensor conducts its primary
business, and under the laws of that jurisdiction excluding its
conflict-of-law provisions. The application of the United Nations
Convention on Contracts for the International Sale of Goods is
expressly excluded. Any use of the Original Work outside the scope of
this License or after its termination shall be subject to the
requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101
et seq., the equivalent laws of other countries, and international
treaty. This section shall survive the termination of this License.

12) Attorneys Fees. In any action to enforce the terms of this License
or seeking damages relating thereto, the prevailing party shall be
entitled to recover its costs and expenses, including, without
limitation, reasonable attorneys' fees and costs incurred in
connection with such action, including any appeal of such action. This
section shall survive the termination of this License.

13) Miscellaneous. This License represents the complete agreement
concerning the subject matter hereof. If any provision of this License
is held to be unenforceable, such provision shall be reformed only to
the extent necessary to make it enforceable.

14) Definition of "You" in This License. "You" throughout this
License, whether in upper or lower case, means an individual or a
legal entity exercising rights under, and complying with all of the
terms of, this License. For legal entities, "You" includes any entity
that controls, is controlled by, or is under common control with
you. For purposes of this definition, "control" means (i) the power,
direct or indirect, to cause the direction or management of such
entity, whether by contract or otherwise, or (ii) ownership of fifty
percent (50%) or more of the outstanding shares, or (iii) beneficial
ownership of such entity.

15) Right to Use. You may use the Original Work in all ways not
otherwise restricted or conditioned by this License or by law, and
Licensor promises not to interfere with or be responsible for such
uses by You.

This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights
reserved. Permission is hereby granted to copy and distribute this
license without modification. This license may not be modified without
the express written permission of its copyright owner.


--
END OF ACADEMIC FREE LICENSE. The following is intended to describe the essential
differences between the Academic Free License (AFL) version 1.0 and other
open source licenses:

The Academic Free License is similar to the BSD, MIT, UoI/NCSA and Apache
licenses in many respects but it is intended to solve a few problems with
those licenses.
* The AFL is written so as to make it clear what software is being
licensed (by the inclusion of a statement following the copyright notice
in the software). This way, the license functions better than a template
license. The BSD, MIT and UoI/NCSA licenses apply to unidentified software.
* The AFL tqcontains a complete copyright grant to the software. The BSD
and Apache licenses are vague and incomplete in that respect.
* The AFL tqcontains a complete patent grant to the software. The BSD, MIT,
UoI/NCSA and Apache licenses rely on an implied patent license and contain
no explicit patent grant.
* The AFL makes it clear that no trademark rights are granted to the
licensor's trademarks. The Apache license tqcontains such a provision, but the
BSD, MIT and UoI/NCSA licenses do not.
* The AFL includes the warranty by the licensor that it either owns the
copyright or that it is distributing the software under a license. None of
the other licenses contain that warranty. All other warranties are disclaimed,
as is the case for the other licenses.

* The AFL is itself copyrighted (with the right granted to copy and distribute
without modification). This ensures that the owner of the copyright to the
license will control changes. The Apache license tqcontains a copyright notice,
but the BSD, MIT and UoI/NCSA licenses do not.
--
START OF GNU GENERAL PUBLIC LICENSE
--

GNU GENERAL PUBLIC LICENSE
Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Preamble

The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.

When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.

We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License applies to any program or other work which tqcontains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.

b) You must cause any work that you distribute or publish, that in
whole or in part tqcontains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.

c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,

b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,

c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it tqcontains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.

9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

NO WARRANTY

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:

Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.

<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

+ 13661
- 0
ChangeLog
File diff suppressed because it is too large
View File


+ 22
- 0
ConfigureChecks.cmake View File

@@ -0,0 +1,22 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################

# dbus-1
pkg_search_module( DBUS dbus-1 )
if( NOT DBUS_FOUND )
tde_message_fatal( "dbus-1 is required, but was not found on your system" )
endif( )

# qt3
find_package( Qt )

# tqt
find_package( TQt )

+ 200
- 0
HACKING View File

@@ -0,0 +1,200 @@
The guidelines in this file are the ideals; it's better to send a
not-fully-following-guidelines patch than no patch at all, though. We
can always polish it up.

Mailing list
===

The D-BUS mailing list is message-bus-list@freedesktop.org; discussion
of patches, etc. should go there.

Security
===

Most of D-BUS is security sensitive. Guidelines related to that:

- avoid memcpy(), sprintf(), strlen(), snprintf, strlcat(),
strstr(), strtok(), or any of this stuff. Use DBusString.
If DBusString doesn't have the feature you need, add it
to DBusString.

There are some exceptions, for example
if your strings are just used to index a hash table
and you don't do any parsing/modification of them, perhaps
DBusString is wasteful and wouldn't help much. But definitely
if you're doing any parsing, reallocation, etc. use DBusString.

- do not include system headers outside of dbus-memory.c,
dbus-sysdeps.c, and other places where they are already
included. This gives us one place to audit all external
dependencies on features in libc, etc.

- do not use libc features that are "complicated"
and may contain security holes. For example, you probably shouldn't
try to use regcomp() to compile an untrusted regular expression.
Regular expressions are just too complicated, and there are many
different libc's out there.

- we need to design the message bus daemon (and any similar features)
to use limited privileges, run in a chroot jail, and so on.

http://vsftpd.beasts.org/ has other good security suggestions.

Coding Style
===

- The C library uses GNU coding conventions, with GLib-like
extensions (e.g. lining up function arguments). The
Qt wrapper uses KDE coding conventions.

- Write docs for all non-static functions and structs and so on. try
"doxygen Doxyfile" prior to commit and be sure there are no
warnings printed.

- All external interfaces (network protocols, file formats, etc.)
should have documented specifications sufficient to allow an
alternative implementation to be written. Our implementation should
be strict about specification compliance (should not for example
heuristically parse a file and accept not-well-formed
data). Avoiding heuristics is also important for security reasons;
if it looks funny, ignore it (or exit, or disconnect).

Making a release
===

To make a release of D-BUS, do the following:

- check out a fresh copy from CVS

- verify that the libtool versioning/library soname is
changed if it needs to be, or not changed if not

- update the file NEWS based on the ChangeLog

- add a ChangeLog entry containing the version number
you're releasing ("Released 0.3" or something)
so people can see which changes were before and after
a given release.

- "make distcheck" (DO NOT just "make dist" - pass the check!)

- if make distcheck fails, fix it.

- once distcheck succeeds, "cvs commit"

- if someone else made changes and the commit fails,
you have to "cvs up" and run "make distcheck" again

- once the commit succeeds, "cvs tag DBUS_X_Y_Z" where
X_Y_Z map to version X.Y.Z

- bump the version number up in configure.in, and commit
it. Make sure you do this *after* tagging the previous
release!

- scp your tarball to freedesktop.org server and copy it
to /srv/dbus.freedesktop.org/releases. This should
be possible if you're in group "dbus"

- update the wiki page http://www.freedesktop.org/Software/dbus by
adding the new release under the Download heading. Then, cut the
link and changelog for the previous that was there.

- update the wiki page
http://www.freedesktop.org/Software/DbusReleaseArchive pasting the
previous release. Note that bullet points for each of the changelog
items must be indented three more spaces to conform to the
formatting of the other releases there.
- post to dbus@lists.freedesktop.org announcing the release.

Environment variables
===

These are the environment variables that are used by the D-BUS client library

DBUS_VERBOSE=1
Turns on printing verbose messages. This only works if D-BUS has been
compiled with --enable-verbose-mode

DBUS_MALLOC_FAIL_NTH=n
Can be set to a number, causing every nth call to dbus_alloc or
dbus_realloc to fail. This only works if D-BUS has been compiled with
--enable-tests.

DBUS_MALLOC_FAIL_GREATER_THAN=n
Can be set to a number, causing every call to dbus_alloc or
dbus_realloc to fail if the number of bytes to be allocated is greater
than the specified number. This only works if D-BUS has been compiled with
--enable-tests.

DBUS_TEST_MALLOC_FAILURES=n
Many of the D-BUS tests will run over and over, once for each malloc
involved in the test. Each run will fail a different malloc, plus some
number of mallocs following that malloc (because a fair number of bugs
only happen if two or more mallocs fail in a row, e.g. error recovery
that itself involves malloc). This env variable sets the number of
mallocs to fail.
Here's why you care: If set to 0, then the malloc checking is skipped,
which makes the test suite a heck of a lot faster. Just run with this
env variable unset before you commit.

Tests
===

These are the test programs that are built if dbus is compiled using
--enable-tests.

dbus/dbus-test
This is the main unit test program that tests all aspects of the D-BUS
client library.

dbus/bus-test
This it the unit test program for the message bus.

test/break-loader
A test that tries to break the message loader by passing it randomly
created invalid messages.

"make check" runs all the deterministic test programs (i.e. not break-loader).

"make check-coverage" is available if you configure with --enable-gcov and
gives a complete report on test suite coverage. You can also run
"test/decode-gcov foo.c" on any source file to get annotated source,
after running make check with a gcov-enabled tree.

Patches
===

Please file them at http://bugzilla.freedesktop.org under component
dbus, and also post to the mailing list for discussion. The commit
rules are:

- for fixes that don't affect API or protocol, they can be committed
if any one qualified reviewer other than patch author
reviews and approves

- for fixes that do affect API or protocol, two people
in the reviewer group have to review and approve the commit, and
posting to the list is definitely mandatory

- if there's a live unresolved controversy about a change,
don't commit it while the argument is still raging.

- regardless of reviews, to commit a patch:
- make check must pass
- the test suite must be extended to cover the new code
as much as reasonably feasible
- the patch has to follow the portability, security, and
style guidelines
- the patch should as much as reasonable do one thing,
not many unrelated changes
No reviewer should approve a patch without these attributes, and
failure on these points is grounds for reverting the patch.

The reviewer group that can approve patches: Havoc Pennington, Michael
Meeks, Alex Larsson, Zack Rusin, Joe Shaw, Mikael Hallendal, Richard
Hult, Owen Fraser-Green, Olivier Andrieu, Colin Walters.



+ 294
- 0
INSTALL View File

@@ -0,0 +1,294 @@
DBus Installation
=================

Quick start
===========

DBus uses GNU AutoTools for its build system, thus the basic install
procedure can be summarized as:

./configure --prefix=/usr
make
su make install

The configure script will automatically determine whether to try and
build bindings for GLib, Qt, Qt3, Python and Mono based on what tools
are installed on the host system. The default build behaviour can be
overridden using the --enable-XXX/--disable-XXX arguments to configure.
A typical scenario in which it is desirable to override automatic
detection, is during packaging of binary builds, where a predictable
dependancy chain is required. For more details on GNU AutoTools
installation, consult the generic instructions later in this document

External software dependancies
==============================

The only fundamental requirement to build DBus is an XML parser,
however, there are a number of other software packages which (if
present) will enhance functionality.

Core library
------------

Requisite:

- Gettext
- expat or libxml-2

NB, expat is the recommended XML parser because it has more robust
handling of OOM conditions.

Optional:

- libselinux (for SELinux integration)
- dnotify (for automatic service file reload)
- doxygen (for API documentation)
- xmlto (for Spec & other XML documentation)

GLib Bindings
-------------

Requisite:

- GLib >= 2.4

Optional:

- GTK+ >= 2.4 (for dbus-viewer tool)

Qt Bindings
-----------

Requisite:

- QtCore and QtXml >= 4.1.3

Optional:

- QtTest (for Qt Unit tests)
- QtGui >= 4.1.3 (for the chat example program)

Note: Qt 4.1.3 is not available in released form. You need to download
the 4.1.3 snapshots from Trolltech. However, the Qt binding compiles
and works in Qt 4.1.2, but not the dbusidl2cpp tool.

Note that DBus detects QtCore and QtXml during the configure process
using pkg-config. You may need to set the PKG_CONFIG_PATH to include
the Qt4 library directory. If you don't have your Qt4 installed, then
you may also need to use the --with-qt-tqmoc directive to point to the
Qt4 tqmoc executable (e.g. $QTDIR/bin/tqmoc).


Qt 3 Bindings
-------------

Requisite:

- Qt >= 3.1

Mono Bindings
-------------

Requisite:

- Mono >= 0.95

Optional:

- MonoDoc >= 0.16 (for API documentation)

Python Bindings
---------------

Requisite:

- Python >= 2.4
- Pyrex

====================================================================

The rest of this document tqcontains the generic GNU AutoTools install
insructions....

Basic Installation
==================

These are generic installation instructions.

The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').

If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
tqcontains results you don't want to keep, you may remove or edit it.

The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.

The simplest way to compile this package is:

1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.

Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.

2. Type `make' to compile the package.

3. Optionally, type `make check' to run any self-tests that come with
the package.

4. Type `make install' to install the programs and any data files and
documentation.

5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.

Compilers and Options
=====================

Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure

Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure

Compiling For Multiple Architectures
====================================

You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.

If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.

Installation Names
==================

By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.

You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.

In addition, if you use an unusual directory tqlayout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.

If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.

Optional Features
=================

Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.

For packages that use the X Window System, `configure' can usually
tqfind the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.

Specifying the System Type
==========================

There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM

See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.

If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.

Sharing Defaults
================

If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.

Operation Controls
==================

`configure' recognizes the following options to control how it
operates.

`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.

`--help'
Print a summary of the options to `configure', and exit.

`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).

`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.

`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.

`configure' also accepts some other, not widely useful, options.

+ 504
- 0
NEWS View File

@@ -0,0 +1,504 @@
D-BUS 0.62 (12 June 2006)
==
- Doc fixes
- Added support for all data-types for the dbus tools
- Fixed eavesdropping on method calls (dbus-monitor)
- Fixed silent dropping of method calls with interface=NULL
- Fixed console ownership problems in Solaris
- Fixed installation of dbus-signature.h and #include it in dbus/dbus.h
- Flush the user database cache on config reload
- GLib bindings:
- Fix memory leaks
- Fix properties in DBusGProxy so that they can be given in any
order
- Added lots of assertions to ensure correct use
- Remove duplicated code
- Fix static string pointer uses in GPtrArray-based collections
- Python bindings:
- Remove reference to sys/cdefs.h
- Qt4 bindings:
- Code reorganized
- Added the dbusidl2cpp, dbuscpp2xml and dbus tools
- Added example programs (ping-pong, complex ping-pong, listnames, chat)
- Updated selftests
- Fixed compilation and .tqmoc- and .ui-file processing and cleaning
- Made central classes derive from QObject
- Enhance error reporting
- Many bugfixes
- Mono bindings:
- Minor bugfixes

D-BUS 0.61 (24 Febuary 2006)
==
- Documentation all around
- dbus-launch now produces correct sh and csh syntax
- Nested arrays now work correctly
- GLib bindings:
- Inheriting from DBusGProxy is now possible
- GPtrArrays can now be marshalled
- org.freedesktop.DBus.GLib.ClientCSymbol annotation added
- Openning connections to arbitrary addresses now supported
- Python bindings:
- sender_keyword and path_keyword keywords added to signal listener API
- Byte types now demarshal to unsigned char
- calling methods now do the correct thing
- Qt bindings:
- both Qt3 and Qt4 bindings can be built at the same time
- Use the standard org.freedesktop.DBus.Method.NoReply annotation
for the "async" calls instead of creating one for us.
- Mono bindings:
- 64bit arch fixes
- Massive bug fixing all around

D-BUS 0.60 (30 November 2005)
==

- major ABI/API changes - sonames changed
- RequestName queuing behavior has changed (refer to dbus-specification)
- DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT has been removed and
DBUS_NAME_FLAG_ALLOW_REPLACEMENT has been added to the flags
- Q_SIGNALS emitted by the bus now show up in the introspect data
- auth EXTERNAL now supported on BSD varients
- ReleaseName method added to the bus to allow a service
to remove itself as owner of a bus name
- dbus_connection_read_write added for getting messages off the bus
in the absence of a mainloop
- Qt4 bindings added and the Qt3 bindings have been depricated
- python bindings:
- marshal using introspect data if available
- better exception handling and propigation
- private connections are now supported
- UTF-8 cleanups
- out_signature added to method decorators for specifying
how the return values should be marshaled
- sender_keyword added to method decorators for specifying
and argument to provide the unique name of the method caller
- async_callbacks added to method decorators
- multiple inheritance of classes now supported
- GLib bindings:
- respect NoReply annotations
- dbus_g_method_return_get_reply and dbus_g_method_return_send_reply
added to the lowlevel code for use when the dbus-glib marshalling
code is not adiquate
- numerous bug fixes all around

D-BUS 0.50 (06 September 2005)
===
This is a minor release from 0.36.2. The series number has changed
not because of any technical reasons but as an indication that we
are moving closer to 1.0. It is hoped that this will be the last
series to see major changes, most of which will be isolated to the
GLib and Python bindings, as we transition to concentrate more on
bug busting and code auditing.

- D-Bus builds on the Cygwin platform
- Makefile cleanups
- Various bug fixes
- Optimization of the dbus object tree
- Memleaks and GIL crasher bugs have been fixed in the Python bindings

D-BUS 0.36.2 (29 August 2005)
===
- Security: Restrict other users from connecting to another users
session bus

D-BUS 0.36.1 (24 August 2005)
===
- Python Bindings:
- fixed to work with hal-tqdevice-manager
- For 64bit builds everything is installed to lib64/python2.4/
since Python can't handle multilib

D-BUS 0.36 (23 August 2005)
===
- Maximum sized of cached messages have been reduced to 10K
- Match rules now allow matching on arguments inside the message
- introspect.xsl XSLT style sheet added for formatting introspection
data into XHTML for analysis
- Python bindings:
- now have working type objects for explicit
typecasting
- Variant type has been added
- Dictionaries, Variants and Arrays can all be passed the signiture or
type(s) of their tqchildren
- the optional timeout= keyword has been added when making method calls
- match on args has been implemented
- a .pth file has been added for dealing with libraries and python files
being in different directories such as in 64bit installs
- various bug fixes
- GLib bindings:
- deeply recursive types now supported
- many symbols are no longer exported as part of the public API
- various memleak and other bug fixes

D-BUS 0.35.2 (17 July 2005)
===
- Rename Unix Security Context to SELinux Security Context in API
- Fixed more dist errors that distcheck didn't pick up on
- Fixed various bugs in the python bindings that prevented them from working

D-BUS 0.35.1 (16 July 2005)
===
- Fixed dist error where python/dbus_bindings.pxd was being shipped
instead of dbus_bindings.pxd.in
- Use this instead of the 0.35 tarball

D-BUS 0.35 (15 July 2005)
===
- --with-dbus-user added to the configure scripts for configuring the
user the system bus runs on
- --with-console-auth-dir added to configure scripts for configuring the
directory to look in for console user locks
- service files for auto-starting D-Bus services now has the ability to pass
in command line arguments to the executable
- Huge auto-start bug squashed which caused some services not to start when
requested in rapid succession
- SE-Linux security contexts can now be appended to messages for inspection
by services that enforce their own security policies
- Colin says the GLib binding are ready for general consumption
- New GLib tutorial
- New GLib example code
- Python bindings are now version (0,42,0)
- Python bindings API has changed on the service side
- dbus.service has been split out as a seperate module
- dbus.service.Service is renamed to dbus.service.BusName
- dbus.service.Object has swapped the bus_name and object_path constructor
parameters to make it easier to do inheritance over the bus
- dbus.glib has been seperated out in order to lessen the dependency on glib
and to allow other mainloops to be integrated with the bindings including
a planned generic mainloop for non-gui apps.
- Python bindings now aquire the GIL when calling back into the python
interpreter. Fixes crashes when using threading and other random segfaults.
- New Python tutorial
- Numerous D-Bus bug fixes all around

D-BUS 0.34 (15 June 2005)
===
- dbus_connection_disconnect is deprecated in favor of dbus_connection_close
- The bus can now use D_NOTIFY (if available) to check when configuration files
have changed and reload them
- New dbus_message_has_path/member/interface API added
- The Ping message from the org.freedesktop.DBus.Peer interface is now handled
- Complete glib bindings overhaul (and are still under construction)
- Tutorial now has an updated GLib section
- GLib bindings can now send/receive hash tables, arrays and other complex types
- Python bindings overhaul (most public facing API's done)
- Python bindings have been split up into separate files
- Python added new type classes for hinting to the marshaler what type
to send over the wire
- Python bindings now have decorators for specifying exported methods and Q_SIGNALS
- Numerous bug fixes

D-BUS 0.33 (25 Apr 2005)
===

- downgrade requirement from GTK+-2.6 to 2.4 for building gtk components
- python binding API's have been overhalled to be more "pythonic" and cleaner
- python bindings now export dbus.version which is set to (0,40,0)
- python bindings now implement the org.freedesktop.DBus.Introspectable interface
- python binding match rules are now more flexable
- make check has been fixed
- many, many major bug fixes

D-BUS 0.32 (29 Mar 2005)
===

- mono bindings now compiles correctly
- mono binding cleanups
- glib bindings generates wrappers for bus methods in dbus-glib-bindings.h
- glib binding cleanus
- users and groups can now be specified by UID and GID in config files
- numerous memory leak fixes
- various other fixes

D-BUS 0.31 (07 Mar 2005)
===

- land the new message args API and recursive type system
- add docs and fixed Doxygen warnings throught source
- split out some functions not needed in libdbus to *-util.c source files
- take out type convienience functions
- libdbus now back below 150K
- booleans are now 32-bit instead of 8-bit
- specification updated
- grand renaming to strip out the use of "service"
just say "name" instead (or "bus name" when ambiguous)
- rename dbus-daemon-1 to dbus-daemon throughout
- rename activation to auto-start
- auto-start on by default now
- note that libdbus is the low-level API
- python bindings updated to the new API
- mono bindings updated to the new API
- add 16 bit types
- dictionaries are now ARRAYS of DICT_ENTRY
- dbus-glib-tool renamed to dbus-binding-tool
- massive rewrite of the glib bindings
- saner names for the dbus interface, object path and service defines
- new functions for handling type signitures
- bump sonames for libdbus and libdbus-glib
- various small fixes

D-BUS 0.23 (11 Jan 2005)
===

- add setgroups() to drop supplementary groups
- updated SELinux support
- add an "at console" security policy
- fix a bug where org.freedesktop.DBus wasn't recognized as an existing
service.
- error out if --enable-mono is explicitly set and mono libs can't be found
- set the max_match_rules_per_connection limit from the config file.
- removed dbus_bug_get_with_g_main since it's been tqreplaced by
dbus_g_bus_get
- fix fd leaks in socket code
- lots and lots of mono binding updates, including fixes to make it
compatible with Mono 1.1.3
- added --nofork option to override config file setting at runtime
- added support for int64 and uint64 to the python bindings
- lots of python binding updates
- config file DTD updates
- use SerivceOwnerChanges signal instead of ServiceCreated and
ServiceDeleted
- fixes to the authentication code
- new init script for Slackware
- print out the pid even when --fork is passed
- increase preallocation sizes in DBusMessage to heavily reduce
reallocs
- lots of performance enhancements
- lots more small bug fixes

D-BUS 0.22
===

- add --reply-timeout to dbus-send
- fix a memleak
- fix Solaris/Forte build
- switch to AFL 2.1 rather than 2.0 to address patent termination clause
concerns
- add SELinux support
- mostly repair libxml backend for config parser, still doesn't
pass out of memory tests
- fix distcheck to include language bindings
- add GetConnectionUnixUser method on bus driver
- also for UnixProcessID
- lots of Python, Mono, other binding fixes
- change GLib bindings to not include dbus/dbus.h (fully encapsulate libdbus)
- pass paths as strings, not arrays of string
- add message signature header field
- cleanups to marshaling code
- clean up authentication code
- reload conf files on SIGHUP
- rename SERVICE/SENDER_SERVICE to DESTINATION/SENDER
- fix circular conf file inclusion
- allow empty arrays
- tons of other small bugfixes

D-BUS 0.21
===

- implement "auto activation" flag on messages, so the destination
service can be launched automatically
- fix a bug in custom type marshaling
- optimize case where multiple apps activate the same service
(avoid "thundering herd")
- add dynamic service file discovery/reloading
- fix a busy loop when blocking for a reply
- fix a 64-bit crash involving varargs
- fix a bus crash when processing an AcquireService
- allow appending TYPE_BYTE via append_args_valist
- fix dicts-inside-dicts
- enhancements to Python and Qt bindings

D-BUS 0.20
===

This release lands some very large API changes and numerous bugfixes.
The list of changes is too large to fully document here; please refer
to the documentation, and message-bus-list archives.

D-BUS 0.13
===

This is probably the last release before landing the large API changes
on the "dbus-object-names" branch.

- fix system bus to always use filesystem socket; anyone
can create any abstract socket, which isn't secure
since if you can crash the system bus you'd be able
to tqreplace it.
- add DTD for configuration file
- improve specification a bit

D-BUS 0.12
===

- fix "service messagebus status" on Red Hat
- fix demarshaling of DBUS_TYPE_NAMED
- fix "eval `dbus-launch --exit-with-session`" to exit properly
- fix build without --prefix
- useless fooling with Mono bindings
- useless fooling with gcj bindings
- fix srcdir != builddir
- fix various compiler warnings and other issues
- add get/set data to DBusMessage
- fix headers for C++
- OS X build fixes
- abstract domain sockets support (Linux only)
- add dbus-cleanup-sockets utility for people
not using linux
- be consistent about defaulting to --session/--system
with command line tools
- merge in policies from included config files
- fix build on non-x86
- docs updates
- lots of other bugfixes

D-BUS 0.11
===

- add --enable-docs to turn off/on the docbook stuff
(doesn't cover doxygen stuff yet)
- make people define DBUS_API_SUBJECT_TO_CHANGE
and read warning in README so they don't
expect the API to be frozen already
- rename .pc files to "dbus-1.pc" instead of
"dbus-1.0.pc" etc. - this will require changing
pkg-config invocations
- some docs cleanups
- add man pages for all executables
- allow send to/from bus driver in the default system.conf
- fix user lookup bug
- implement dbus-launch to launch the session message bus
- fix some thread deadlocks
- some performance profiling/optimization
- add dbus_bus_activate_service() function
- fix some minor bugs here and there
- install Red Hat initscript in the right place

D-BUS 0.10
===

- reversed order of args to dbus_message_new()
- renamed dbus_message_name_is() and some other
functions
- change DBusWatch to have dbus_watch_handle()
similar to dbus_timeout_handle(), drop
connection/server-specific handle routines
- change message serials to be unsigned
- implemented <allow>/<deny>/<limit> features for
config file; system bus now has a deny-all policy
by default.
- system.conf has <includedir>system.d</includedir>
so packages can install additions to the default
policy to <allow> the messages they need. e.g.
CUPS might install a cups.conf - see
test/data/valid-config-files/system.d/test.conf
for an example.
- add timeouts for authentication, activation
- add glib-style "checks" on public API, enable
those by default, disable assertions by default
- add GMainContext argument to GLib setup functions,
can be NULL for default context. Needed for threads.
- add 64-bit integer type
- validate type of standard message header fields
- consider messages in the org.freedesktop.Local
namespace to be invalid (to avoid fake disconnect
messages for example)
- fix assorted memory leaks and other bugs in
the SHA-1 auth mechanism
- cache user database information (groups user is
in, etc.) helps a lot with NIS
- always store uid_t, pid_t, gid_t in "ulong"
rather than "int"
- implement config file settings for which
users can connect
- SHA-1 unit test
- dbus-send, dbus-monitor command line utilities
- fixed lots of misc crashes and other bugs

D-BUS 0.9
===

- implemented a test case for service activation,
and fixed many bugs exposed by that
- implemented recursive argument marshaling/demarshaling
for messages, allowing multidimensional arrays
- fixed up integration of message dispatch with
main loop by adding a callback on change of
dispatch status
- add a pidfile feature to daemon
- some build fixes
- clean up unix domain sockets on exit
- add --print-address and the ability
to create a random server address
in a temporary directory

D-BUS 0.8
===

- fix dumb bug in 0.7

D-BUS 0.7
===

- implement configuration file used to control bus characteristics
- implement daemon mode, changing user ID, and other system
bus features
- add init scripts for systemwide bus
- add "make check-coverage" target to check test coverage
- more test suite additions
- many, many bugfixes
- many API changes/fixes

D-BUS 0.6
===
- Vastly improved bus daemon test suite
- Lots of misc. bugfixes and memory leak fixes
- Support for marshalling key/value data
- Activation improvements.

D-BUS 0.5
===

- Specification updates
- port to OS X and other BSD variants
- port to Solaris
- Partial work on cookie-based authentication
- Thread safety fixes
- Lots of misc. bugfixes
- Support for more array types
- Add data Q_SLOTS to DBusServer
- DBusString security audit fixes
- Fix for systems (or valgrind) with unaligned malloc blocks

D-BUS 0.4
===

- Preliminary activation support.
- Better authentication test suite
- Bus test program
- Specification updates
- Thread safety
- Bug fixes

D-BUS 0.3
===

- Preliminary limitations
- Message sending works
- Bus client
- Array marshalling/demarshalling
- Services
- Better OOM handling in the bus
- In-proc debug transport
- Transport/server address support

D-BUS 0.2
===

- Include test code in the tarball.

D-BUS 0.1
===

- Initial release.

+ 101
- 0
README View File

@@ -0,0 +1,101 @@
D-BUS is a simple IPC library based on messages.

See also the file HACKING for notes of interest to developers working on D-BUS.

See http://www.freedesktop.org/software/dbus/ for lots of documentation,
mailing lists, etc.

Note
===

A core concept of the D-BUS implementation is that "libdbus" is
intended to be a low-level API, similar to Xlib. Most programmers are
intended to use the bindings to GLib, Qt, Python, Mono, Java, or
whatever. These bindings have varying levels of completeness.

Configuration flags
===

These are the dbus-specific configuration flags that can be given to
the ./configure program.

--enable-qt enable Qt-friendly client library (note: Qt4)
--enable-qt-debug enable Qt-friendly client library, linked to debug
Qt libraries
--enable-qt3 enable Qt3-friendly client library
--enable-glib enable GLib-friendly client library
--enable-gtk enable GTK-requiring executables
--enable-tests enable unit test code
--enable-ansi enable -ansi -pedantic gcc flags
--enable-verbose-mode support verbose debug mode
--enable-asserts include assertion checks
--enable-checks include sanity checks on public API
--enable-xml-docs build XML documentation (requires xmlto)
--enable-doxygen-docs build DOXYGEN documentation (requires Doxygen)
--enable-gcov compile with coverage profiling instrumentation (gcc only)
--enable-abstract-sockets
use abstract socket namespace (linux only)
--enable-gcj build gcj bindings
--enable-mono build mono bindings
--enable-mono-docs build mono docs
--enable-python build python bindings
--enable-selinux build with SELinux support
--enable-dnotify build with dnotify support (linux only)

--with-qt-tqmoc=<path> tqmoc for Qt
--with-qt3-tqmoc=<path> tqmoc for Qt3
--with-xml=libxml/expat XML library to use
--with-init-scripts=redhat Style of init scripts to install
--with-session-socket-dir=dirname Where to put sockets for the per-login-session message bus
--with-test-socket-dir=dirname Where to put sockets for make check
--with-system-pid-file=pidfile PID file for systemwide daemon
--with-system-socket=filename UNIX domain socket for systemwide daemon
--with-console-auth-dir=dirname directory to check for console ownerhip
--with-dbus-user=<user> User for running the DBUS daemon (messagebus)
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-tags[=TAGS] include additional configurations [automatic]
--with-x use the X Window System


API/ABI Policy
===

D-BUS API/ABI and protocol necessarily remain in flux until we are
sure it will meet the various needs it's intended to meet. This means
we need to see some significant sample usage in the contexts of GNOME,
KDE, desktop applications, and systemwide uses such as print queue
monitoring, hotplug events, or whatever. We need the flexibility to
incorporate feedback from this sample usage.

Once we feel confident in the protocol and the API, we will release a
version 1.0. At that point, the intent is:

- The protocol will never be broken again; any message bus should
work with any client forever. However, extensions are possible
where the protocol is extensible.

- If the library API is modified incompatibly, we will rename it
as in http://ometer.com/parallel.html - in other words,
it will always be possible to compile against and use the older
API, and apps will always get the API they expect.

Until 1.0 is released, feedback that requires API changes may be
incorporated into D-BUS. This may break the API, the ABI, the
protocol, or all three.

To avoid a huge soname, the plan is to increment the soname only
between official stable releases, not with every development snapshot.
Versions numbered 0.x are considered development snapshots.

Until 1.0 is released, you have to define -DDBUS_API_SUBJECT_TO_CHANGE
just as a safety check to be sure everyone is aware of this API/ABI
policy and has the right expectations.

We do need people to test the APIs, so please do use the development
snapshots of D-BUS. They are intended to work and we do actively
address bugs.

However, if you're shipping a commercial binary-only application that
needs to keep running on M future versions of N operating systems, you
might want to include your own copy of D-BUS rather than relying on
the installed copy, for example.

+ 168
- 0
connection.cpp View File

@@ -0,0 +1,168 @@
// -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
/* connection.cpp: TQt wrapper for DBusConnection
*
* Copyright (C) 2003 Zack Rusin <zack@kde.org>
*
* Licensed under the Academic Free License version 2.0
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#include "connection.h"

using namespace DBusQt;

#include "integrator.h"
using Internal::Integrator;

struct Connection::Private
{
Private( Connection *qq );
void setConnection( DBusConnection *c );
DBusConnection *connection;
int connectionSlot;
DBusError error;
Integrator *integrator;
int timeout;
Connection *q;
};

Connection::Private::Private( Connection *qq )
: connection( 0 ), connectionSlot( 0 ), integrator( 0 ),
timeout( -1 ), q( qq )
{
dbus_error_init( &error );
}

void Connection::Private::setConnection( DBusConnection *c )
{
if (!c) {
qDebug( "error: %s, %s", error.name, error.message );
dbus_error_free( &error );
return;
}
connection = c;
integrator = new Integrator( c, q );
connect( integrator, TQT_SIGNAL(readReady()), q, TQT_SLOT(dispatchRead()) );
}

Connection::Connection( TQObject *tqparent )
: TQObject( tqparent )
{
d = new Private( this );
}

Connection::Connection( const TQString& host, TQObject *tqparent )
: TQObject( tqparent )
{
d = new Private( this );

if ( !host.isEmpty() )
init( host );
}

Connection::Connection( DBusBusType type, TQObject* tqparent )
: TQObject( tqparent )
{
d = new Private( this );
d->setConnection( dbus_bus_get(type, &d->error) );
}

void Connection::init( const TQString& host )
{
d->setConnection( dbus_connection_open( host.ascii(), &d->error) );
//dbus_connection_allocate_data_slot( &d->connectionSlot );
//dbus_connection_set_data( d->connection, d->connectionSlot, 0, 0 );
}

bool Connection::isConnected() const
{
return dbus_connection_get_is_connected( d->connection );
}

bool Connection::isAuthenticated() const
{
return dbus_connection_get_is_authenticated( d->connection );
}

void Connection::open( const TQString& host )
{
if ( host.isEmpty() ) return;

init( host );
}

void Connection::close()
{
dbus_connection_close( d->connection );
}

void Connection::flush()
{
dbus_connection_flush( d->connection );
}

void Connection::dispatchRead()
{
while ( dbus_connection_dispatch( d->connection ) == DBUS_DISPATCH_DATA_REMAINS )
;
}

DBusConnection* Connection::connection() const
{
return d->connection;
}

Connection::Connection( DBusConnection *connection, TQObject *tqparent )
: TQObject( tqparent )
{
d = new Private(this);
d->setConnection(connection);
}

void Connection::send( const Message &m )
{
dbus_connection_send(d->connection, m.message(), 0);
}

void Connection::sendWithReply( const Message& )
{
}

Message Connection::sendWithReplyAndBlock( const Message &m )
{
DBusMessage *reply;
reply = dbus_connection_send_with_reply_and_block( d->connection, m.message(), d->timeout, &d->error );
if (dbus_error_is_set(&d->error)) {
qDebug("error: %s, %s", d->error.name, d->error.message);
dbus_error_free(&d->error);
}
return Message( reply );
}

void* Connection::virtual_hook( int, void* )
{
}

void Connection::dbus_connection_setup_with_qt_main (DBusConnection *connection)
{
d->setConnection( connection );
}



/////////////////////////////////////////////////////////

#include "connection.moc"

+ 84
- 0
connection.h View File

@@ -0,0 +1,84 @@
// -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
/* connection.h: TQt wrapper for DBusConnection
*
* Copyright (C) 2003 Zack Rusin <zack@kde.org>
*
* Licensed under the Academic Free License version 2.1
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef DBUS_TQT_CONNECTION_H
#define DBUS_TQT_CONNECTION_H

#include "message.h"

#include <tqobject.h>
#include <tqstring.h>

#include "dbus/dbus.h"

namespace DBusQt {
namespace Internal {
class Integrator;
}

class Connection : public TQObject
{
Q_OBJECT
TQ_OBJECT
public:
Connection( TQObject *tqparent =0 );
Connection( const TQString& host,
TQObject *tqparent = 0 );
Connection( DBusBusType type, TQObject* tqparent = 0 );

bool isConnected() const;
bool isAuthenticated() const;

Message borrowMessage();
Message popMessage();
void stealBorrowMessage( const Message& );
void dbus_connection_setup_with_qt_main (DBusConnection *connection);

public slots:
void open( const TQString& );
void close();
void flush();
void send( const Message& );
void sendWithReply( const Message& );
Message sendWithReplyAndBlock( const Message& );

protected slots:
void dispatchRead();

protected:
void init( const TQString& host );
virtual void *virtual_hook( int id, void *data );

private:
friend class Internal::Integrator;
DBusConnection *connection() const;
Connection( DBusConnection *connection, TQObject *tqparent );

private:
struct Private;
Private *d;
};

}


#endif

+ 81
- 0
dbus-qt.h View File

@@ -0,0 +1,81 @@
/* -*- mode: C; c-file-style: "gnu" -*- */
/*
* dbus-qt.h TQt integration
*
* Copyright (C) 2002 DBus Developers
*
* Licensed under the Academic Free License version 2.1
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307 USA
*
*/
#ifndef DBUS_TQT_H
#define DBUS_TQT_H

#include <dbus/dbus.h>
/*
* Two approaches - one presented below a DBusQtConnection
* object which is a TQt wrapper around DBusConnection
class DBusQtConnection : public TQObject {
TQ_OBJECT
public:
DBusQtConnection( const char *address=0, TQObject *tqparent=0,
const char *name=0 );

bool open( const char *address );
bool isConnected() const;
int numMessages() const;

public slots:
void disconnect();
void flush();
void sendMessage( DBusMessage *message );

signals:
void message( DBusMessage* message );
void error( const char* error );
private:
DBusConnection *mConnection;
TQSocketNotifier *mReadNotifier;
TQSocketNotifier *mWriteNotifier;
};
*
* Second approach is to have a static TQt dispatcher like:
class DBusQtNotifier : public TQObject {
TQ_OBJECT
public:
static DBusQtNotifier* dbus_qt_notifier();
void addConnection(DBusConnection* connection);
signals:
void message (DBusConnection* connection, DBusMessage* message);

private:
DBusQtNotifier(TQObject *tqparent);
private slots:
void processNotifiers( int socket );
private:
//implemented in terms of TQSocketNotifiers
TQAsciiDict<DBusConnection> mReadNotifiers;