imported D-Bus C++ library

git-svn-id: http://dev.openwengo.org/svn/openwengo/wengophone-ng/branches/wengophone-dbus-api/libs/dbus@7382 30a43799-04e7-0310-8b2b-ea0d24f86d0e
This commit is contained in:
pdurante 2006-09-05 13:36:22 +00:00
commit acfeb85b87
89 changed files with 92818 additions and 0 deletions

1
AUTHORS Normal file
View file

@ -0,0 +1 @@
Paolo Durante <shackan@gmail.com>

504
COPYING Normal file
View file

@ -0,0 +1,504 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
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 and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete 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 distribute a copy of this License along with the
Library.
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 Library or any portion
of it, thus forming a work based on the Library, 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) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
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 Library, 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 Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you 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.
If distribution of 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 satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be 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.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library 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.
9. 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 Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
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 with
this License.
11. 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 Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library 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 Library.
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.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library 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.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser 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 Library
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 Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
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
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "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
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. 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 LIBRARY 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
LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. 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 library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

0
ChangeLog Normal file
View file

236
INSTALL Normal file
View file

@ -0,0 +1,236 @@
Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
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, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. (Caching is
disabled by default to prevent problems with accidental use of stale
cache files.)
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 you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You only need
`configure.ac' 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. Run `./configure --help' for
details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
*Note Defining Variables::, for more details.
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 support 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' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' 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
find 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' cannot figure out automatically,
but needs to determine by the type of machine the package will run on.
Usually, assuming the package is built to be run on the _same_
architectures, `configure' can figure that out, but if it prints a
message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
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 machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
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.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script). Here is a another example:
/bin/bash ./configure CONFIG_SHELL=/bin/bash
Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
configuration-related scripts to be executed by `/bin/bash'.
`configure' Invocation
======================
`configure' recognizes the following options to control how it operates.
`--help'
`-h'
Print a summary of the options to `configure', and exit.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--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.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.

4
Makefile.am Normal file
View file

@ -0,0 +1,4 @@
SUBDIRS = src tools data examples tests doc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = dbus-c++-0.3.pc

655
Makefile.in Normal file
View file

@ -0,0 +1,655 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/dbus-c++-0.3.pc.in \
$(top_srcdir)/configure \
$(top_srcdir)/include/dbus-c++/config.h.in AUTHORS COPYING \
ChangeLog INSTALL NEWS config.guess config.sub depcomp \
install-sh ltmain.sh missing mkinstalldirs
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno configure.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/dbus-c++/config.h
CONFIG_CLEAN_FILES = dbus-c++-0.3.pc
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-exec-recursive install-info-recursive \
install-recursive installcheck-recursive installdirs-recursive \
pdf-recursive ps-recursive uninstall-info-recursive \
uninstall-recursive
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
pkgconfigDATA_INSTALL = $(INSTALL_DATA)
DATA = $(pkgconfig_DATA)
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBUS_DOXYGEN_DOCS_ENABLED_FALSE = @DBUS_DOXYGEN_DOCS_ENABLED_FALSE@
DBUS_DOXYGEN_DOCS_ENABLED_TRUE = @DBUS_DOXYGEN_DOCS_ENABLED_TRUE@
DEBUG_FLAGS = @DEBUG_FLAGS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DOXYGEN = @DOXYGEN@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
dbus_CFLAGS = @dbus_CFLAGS@
dbus_LIBS = @dbus_LIBS@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
xml_CFLAGS = @xml_CFLAGS@
xml_LIBS = @xml_LIBS@
SUBDIRS = src tools data examples tests doc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = dbus-c++-0.3.pc
all: all-recursive
.SUFFIXES:
am--refresh:
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
cd $(srcdir) && $(AUTOMAKE) --gnu \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
include/dbus-c++/config.h: include/dbus-c++/stamp-h1
@if test ! -f $@; then \
rm -f include/dbus-c++/stamp-h1; \
$(MAKE) include/dbus-c++/stamp-h1; \
else :; fi
include/dbus-c++/stamp-h1: $(top_srcdir)/include/dbus-c++/config.h.in $(top_builddir)/config.status
@rm -f include/dbus-c++/stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status include/dbus-c++/config.h
$(top_srcdir)/include/dbus-c++/config.h.in: $(am__configure_deps)
cd $(top_srcdir) && $(AUTOHEADER)
rm -f include/dbus-c++/stamp-h1
touch $@
distclean-hdr:
-rm -f include/dbus-c++/config.h include/dbus-c++/stamp-h1
dbus-c++-0.3.pc: $(top_builddir)/config.status $(srcdir)/dbus-c++-0.3.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $@
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)"
@list='$(pkgconfig_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
$(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
done
uninstall-pkgconfigDATA:
@$(NORMAL_UNINSTALL)
@list='$(pkgconfig_DATA)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
done
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
$(mkdir_p) $(distdir)/. $(distdir)/doc $(distdir)/include/dbus-c++
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(mkdir_p) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
distdir) \
|| exit 1; \
fi; \
done
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& cd $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
distuninstallcheck:
@cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile $(DATA)
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr \
distclean-libtool distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
info: info-recursive
info-am:
install-data-am: install-pkgconfigDATA
install-exec-am:
install-info: install-info-recursive
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-info-am uninstall-pkgconfigDATA
uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
check-am clean clean-generic clean-libtool clean-recursive \
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
dist-shar dist-tarZ dist-zip distcheck distclean \
distclean-generic distclean-hdr distclean-libtool \
distclean-recursive distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-pkgconfigDATA install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic maintainer-clean-recursive \
mostlyclean mostlyclean-generic mostlyclean-libtool \
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-am uninstall-info-am \
uninstall-pkgconfigDATA
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

0
NEWS Normal file
View file

0
README Normal file
View file

84
SConscript Normal file
View file

@ -0,0 +1,84 @@
#
# library
#
env = WengoGetEnvironment()
env.ParseConfig('pkg-config --cflags --libs dbus-1')
libs = [
'expat'
]
lib_path = []
include_path = [
'include'
]
defines = {
'DBUS_API_SUBJECT_TO_CHANGE':1,
'DEBUG':1
}
headers = []
sources = [
'src/connection.cpp',
'src/debug.cpp',
'src/dispatcher.cpp',
'src/error.cpp',
'src/eventloop.cpp',
'src/interface.cpp',
'src/introspection.cpp',
'src/message.cpp',
'src/object.cpp',
'src/pendingcall.cpp',
'src/server.cpp',
'src/types.cpp',
'src/xml.cpp'
]
env.WengoAddDefines(defines)
env.WengoAddIncludePath(include_path)
env.WengoUseLibraries(libs)
env.WengoStaticLibrary('dbus-c++', sources)
#
# tools
#
tools_env = WengoGetEnvironment()
tools_libs = [
'dbus-c++'
]
tools_defines = {
'DBUS_API_SUBJECT_TO_CHANGE':1,
}
introspect_sources = [
'tools/introspect.cpp',
]
xml2cpp_sources = [
'tools/xml2cpp.cpp'
]
#tools_env.Append(LINKFLAGS = '-z origin')
#tools_env.Append(RPATH = env.Literal('\\$$ORIGIN\.'))
tools_env.WengoAddDefines(tools_defines)
tools_env.WengoAddIncludePath(include_path)
tools_env.WengoUseLibraries(tools_libs)
dbusxx_introspect = tools_env.WengoProgram('dbusxx-introspect', introspect_sources)
dbusxx_xml2cpp = tools_env.WengoProgram('dbusxx-xml2cpp', xml2cpp_sources)
#
# xml translator
#
def dbusxx_xml2cpp_emitter(target, source, env):
env.Depends(target, dbusxx_xml2cpp)
return (target, source)
dbusxx_xml2cpp_builder = Builder(action = dbusxx_xml2cpp[0].abspath + ' $SOURCE --adaptor=$TARGET',
emitter = dbusxx_xml2cpp_emitter,
suffix = '.h', src_suffix = '.xml')
Export('dbusxx_xml2cpp_builder')

7424
aclocal.m4 vendored Normal file

File diff suppressed because it is too large Load diff

18
autogen.sh Executable file
View file

@ -0,0 +1,18 @@
#!/bin/sh
function autocmd()
{
echo "Running ${1}..."
$* || {
echo "Error running ${1}"
exit 1
}
}
autocmd aclocal
autocmd automake -acf
autocmd autoconf
autocmd libtoolize -f
autocmd autoheader
echo "Autogen done, now you can ./configure"

0
autom4te.cache/output.0 Normal file
View file

20576
autom4te.cache/output.1 Normal file

File diff suppressed because it is too large Load diff

20588
autom4te.cache/output.2 Normal file

File diff suppressed because it is too large Load diff

466
autom4te.cache/requests Normal file
View file

@ -0,0 +1,466 @@
# This file was generated by Autom4te Mon Nov 14 19:48:41 UTC 2005.
# It contains the lists of macros which have been traced.
# It can be safely removed.
@request = (
bless( [
'0',
1,
[
'/usr/share/autoconf'
],
[
'/usr/share/autoconf/autoconf/autoconf.m4f',
'configure.ac'
],
{
'm4_pattern_forbid' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_C_VOLATILE' => 1,
'AC_TYPE_OFF_T' => 1,
'AC_FUNC_CLOSEDIR_VOID' => 1,
'AC_REPLACE_FNMATCH' => 1,
'AC_PROG_LIBTOOL' => 1,
'AC_FUNC_STAT' => 1,
'AC_FUNC_WAIT3' => 1,
'AC_HEADER_TIME' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'AC_FUNC_LSTAT' => 1,
'AC_STRUCT_TM' => 1,
'AC_FUNC_GETMNTENT' => 1,
'AC_TYPE_MODE_T' => 1,
'AC_FUNC_STRTOD' => 1,
'AC_CHECK_HEADERS' => 1,
'AC_FUNC_STRNLEN' => 1,
'm4_sinclude' => 1,
'AC_PROG_CXX' => 1,
'AC_PATH_X' => 1,
'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
'AC_PROG_AWK' => 1,
'_m4_warn' => 1,
'AC_HEADER_STDC' => 1,
'AC_HEADER_MAJOR' => 1,
'AC_FUNC_ERROR_AT_LINE' => 1,
'AC_PROG_GCC_TRADITIONAL' => 1,
'AC_LIBSOURCE' => 1,
'AC_FUNC_MBRTOWC' => 1,
'AC_STRUCT_ST_BLOCKS' => 1,
'AC_TYPE_SIGNAL' => 1,
'AC_TYPE_UID_T' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'AC_PROG_MAKE_SET' => 1,
'm4_pattern_allow' => 1,
'sinclude' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'AC_FUNC_STRERROR_R' => 1,
'AC_PROG_CC' => 1,
'AC_DECL_SYS_SIGLIST' => 1,
'AC_FUNC_FORK' => 1,
'AC_FUNC_STRCOLL' => 1,
'AC_FUNC_VPRINTF' => 1,
'AC_PROG_YACC' => 1,
'AC_STRUCT_TIMEZONE' => 1,
'AC_INIT' => 1,
'AC_FUNC_CHOWN' => 1,
'AC_SUBST' => 1,
'AC_FUNC_ALLOCA' => 1,
'AC_CANONICAL_HOST' => 1,
'AC_FUNC_GETPGRP' => 1,
'AC_PROG_RANLIB' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_FUNC_SETPGRP' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AC_FUNC_MMAP' => 1,
'AC_FUNC_REALLOC' => 1,
'AC_TYPE_SIZE_T' => 1,
'AC_CONFIG_LINKS' => 1,
'AC_CHECK_TYPES' => 1,
'AC_CHECK_MEMBERS' => 1,
'AM_MAINTAINER_MODE' => 1,
'AC_FUNC_UTIME_NULL' => 1,
'AC_FUNC_SELECT_ARGTYPES' => 1,
'AC_HEADER_STAT' => 1,
'AC_FUNC_STRFTIME' => 1,
'AC_C_INLINE' => 1,
'AC_PROG_CPP' => 1,
'AM_ENABLE_MULTILIB' => 1,
'AC_C_CONST' => 1,
'AC_PROG_LEX' => 1,
'AC_TYPE_PID_T' => 1,
'AC_CONFIG_FILES' => 1,
'include' => 1,
'AC_FUNC_SETVBUF_REVERSED' => 1,
'AC_PROG_INSTALL' => 1,
'AM_GNU_GETTEXT' => 1,
'AC_FUNC_OBSTACK' => 1,
'AC_CHECK_LIB' => 1,
'AC_FUNC_MALLOC' => 1,
'AC_FUNC_GETGROUPS' => 1,
'AC_FUNC_GETLOADAVG' => 1,
'AH_OUTPUT' => 1,
'AC_FUNC_FSEEKO' => 1,
'AM_PROG_CC_C_O' => 1,
'AC_FUNC_MKTIME' => 1,
'AM_CONDITIONAL' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_HEADER_SYS_WAIT' => 1,
'AC_FUNC_MEMCMP' => 1,
'AC_PROG_LN_S' => 1,
'm4_include' => 1,
'AC_HEADER_DIRENT' => 1,
'AC_CHECK_FUNCS' => 1
}
], 'Autom4te::Request' ),
bless( [
'1',
1,
[
'/usr/share/autoconf'
],
[
'/usr/share/autoconf/autoconf/autoconf.m4f',
'aclocal.m4',
'configure.ac'
],
{
'_LT_AC_TAGCONFIG' => 1,
'm4_pattern_forbid' => 1,
'AC_CANONICAL_TARGET' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_TYPE_OFF_T' => 1,
'AC_C_VOLATILE' => 1,
'AC_FUNC_CLOSEDIR_VOID' => 1,
'AC_REPLACE_FNMATCH' => 1,
'AC_PROG_LIBTOOL' => 1,
'AC_FUNC_STAT' => 1,
'AC_HEADER_TIME' => 1,
'AC_FUNC_WAIT3' => 1,
'AC_STRUCT_TM' => 1,
'AC_FUNC_LSTAT' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'AC_TYPE_MODE_T' => 1,
'AC_FUNC_GETMNTENT' => 1,
'AC_CHECK_HEADERS' => 1,
'AC_FUNC_STRTOD' => 1,
'AC_FUNC_STRNLEN' => 1,
'm4_sinclude' => 1,
'AC_PROG_CXX' => 1,
'AC_PATH_X' => 1,
'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
'AC_PROG_AWK' => 1,
'_m4_warn' => 1,
'AC_HEADER_STDC' => 1,
'AC_HEADER_MAJOR' => 1,
'AC_FUNC_ERROR_AT_LINE' => 1,
'AC_PROG_GCC_TRADITIONAL' => 1,
'AC_LIBSOURCE' => 1,
'AC_FUNC_MBRTOWC' => 1,
'AC_STRUCT_ST_BLOCKS' => 1,
'AC_TYPE_SIGNAL' => 1,
'AC_CANONICAL_BUILD' => 1,
'AC_TYPE_UID_T' => 1,
'AC_PROG_MAKE_SET' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'sinclude' => 1,
'm4_pattern_allow' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'AC_FUNC_STRERROR_R' => 1,
'AC_PROG_CC' => 1,
'AC_FUNC_FORK' => 1,
'AC_DECL_SYS_SIGLIST' => 1,
'AC_FUNC_VPRINTF' => 1,
'AC_FUNC_STRCOLL' => 1,
'AC_PROG_YACC' => 1,
'AC_STRUCT_TIMEZONE' => 1,
'AC_INIT' => 1,
'AC_FUNC_CHOWN' => 1,
'AC_SUBST' => 1,
'AC_FUNC_ALLOCA' => 1,
'AC_CANONICAL_HOST' => 1,
'AC_FUNC_GETPGRP' => 1,
'AC_PROG_RANLIB' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_FUNC_SETPGRP' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AC_FUNC_MMAP' => 1,
'AC_FUNC_REALLOC' => 1,
'AC_TYPE_SIZE_T' => 1,
'AC_CONFIG_LINKS' => 1,
'AC_CHECK_TYPES' => 1,
'LT_SUPPORTED_TAG' => 1,
'AC_CHECK_MEMBERS' => 1,
'AM_MAINTAINER_MODE' => 1,
'AC_FUNC_UTIME_NULL' => 1,
'AC_FUNC_SELECT_ARGTYPES' => 1,
'AC_FUNC_STRFTIME' => 1,
'AC_HEADER_STAT' => 1,
'AC_PROG_CPP' => 1,
'AC_C_INLINE' => 1,
'AC_TYPE_PID_T' => 1,
'AC_PROG_LEX' => 1,
'AC_C_CONST' => 1,
'AM_ENABLE_MULTILIB' => 1,
'AC_CONFIG_FILES' => 1,
'include' => 1,
'AC_FUNC_SETVBUF_REVERSED' => 1,
'AC_PROG_INSTALL' => 1,
'AM_GNU_GETTEXT' => 1,
'AC_CHECK_LIB' => 1,
'AC_FUNC_OBSTACK' => 1,
'AC_FUNC_MALLOC' => 1,
'AC_FUNC_GETGROUPS' => 1,
'AC_FUNC_GETLOADAVG' => 1,
'AH_OUTPUT' => 1,
'AC_FUNC_FSEEKO' => 1,
'AM_PROG_CC_C_O' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AM_CONDITIONAL' => 1,
'AC_FUNC_MKTIME' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_HEADER_SYS_WAIT' => 1,
'AC_PROG_LN_S' => 1,
'AC_FUNC_MEMCMP' => 1,
'm4_include' => 1,
'AC_HEADER_DIRENT' => 1,
'AC_CHECK_FUNCS' => 1
}
], 'Autom4te::Request' ),
bless( [
'2',
1,
[
'/usr/share/autoconf'
],
[
'/usr/share/autoconf/autoconf/autoconf.m4f',
'/usr/share/aclocal/libtool.m4',
'/usr/share/aclocal/pkg.m4',
'/usr/share/aclocal-1.9/amversion.m4',
'/usr/share/aclocal-1.9/auxdir.m4',
'/usr/share/aclocal-1.9/cond.m4',
'/usr/share/aclocal-1.9/depend.m4',
'/usr/share/aclocal-1.9/depout.m4',
'/usr/share/aclocal-1.9/header.m4',
'/usr/share/aclocal-1.9/init.m4',
'/usr/share/aclocal-1.9/install-sh.m4',
'/usr/share/aclocal-1.9/lead-dot.m4',
'/usr/share/aclocal-1.9/make.m4',
'/usr/share/aclocal-1.9/missing.m4',
'/usr/share/aclocal-1.9/mkdirp.m4',
'/usr/share/aclocal-1.9/options.m4',
'/usr/share/aclocal-1.9/runlog.m4',
'/usr/share/aclocal-1.9/sanity.m4',
'/usr/share/aclocal-1.9/strip.m4',
'/usr/share/aclocal-1.9/tar.m4',
'configure.ac'
],
{
'AM_ENABLE_STATIC' => 1,
'AC_LIBTOOL_LANG_RC_CONFIG' => 1,
'AC_C_VOLATILE' => 1,
'AC_TYPE_OFF_T' => 1,
'_LT_AC_SHELL_INIT' => 1,
'AC_FUNC_CLOSEDIR_VOID' => 1,
'AC_REPLACE_FNMATCH' => 1,
'AC_DEFUN' => 1,
'AC_PROG_LIBTOOL' => 1,
'_LT_AC_LANG_CXX_CONFIG' => 1,
'AM_PROG_MKDIR_P' => 1,
'AC_FUNC_STAT' => 1,
'AC_FUNC_WAIT3' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'AC_FUNC_LSTAT' => 1,
'AC_STRUCT_TM' => 1,
'AC_CHECK_HEADERS' => 1,
'AC_FUNC_STRTOD' => 1,
'AM_MISSING_PROG' => 1,
'AC_FUNC_STRNLEN' => 1,
'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1,
'AC_PROG_CXX' => 1,
'_LT_AC_LANG_C_CONFIG' => 1,
'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
'AM_PROG_INSTALL_STRIP' => 1,
'AC_PROG_AWK' => 1,
'_m4_warn' => 1,
'AC_LIBTOOL_OBJDIR' => 1,
'AC_HEADER_MAJOR' => 1,
'AM_SANITY_CHECK' => 1,
'AC_LIBTOOL_PROG_COMPILER_PIC' => 1,
'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1,
'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1,
'_LT_AC_CHECK_DLFCN' => 1,
'_AM_PROG_TAR' => 1,
'AC_LIBTOOL_GCJ' => 1,
'AC_PROG_GCC_TRADITIONAL' => 1,
'AC_LIBSOURCE' => 1,
'AC_STRUCT_ST_BLOCKS' => 1,
'_LT_AC_LANG_F77' => 1,
'AC_LIBTOOL_CONFIG' => 1,
'AC_PROG_MAKE_SET' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'sinclude' => 1,
'AM_DISABLE_SHARED' => 1,
'_LT_AC_LANG_CXX' => 1,
'AM_PROG_LIBTOOL' => 1,
'_LT_AC_FILE_LTDLL_C' => 1,
'AM_PROG_LD' => 1,
'AC_FUNC_STRERROR_R' => 1,
'AC_DECL_SYS_SIGLIST' => 1,
'AC_FUNC_FORK' => 1,
'AU_DEFUN' => 1,
'AC_FUNC_VPRINTF' => 1,
'AC_PROG_NM' => 1,
'AC_LIBTOOL_DLOPEN' => 1,
'AC_PROG_LD' => 1,
'AC_PROG_LD_GNU' => 1,
'AC_ENABLE_FAST_INSTALL' => 1,
'AC_INIT' => 1,
'AC_STRUCT_TIMEZONE' => 1,
'AC_SUBST' => 1,
'AC_FUNC_ALLOCA' => 1,
'_AM_SET_OPTION' => 1,
'AC_CANONICAL_HOST' => 1,
'_LT_LINKER_BOILERPLATE' => 1,
'AC_LIBTOOL_PROG_CC_C_O' => 1,
'AC_LIBTOOL_LANG_CXX_CONFIG' => 1,
'AC_PROG_RANLIB' => 1,
'AC_FUNC_SETPGRP' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AC_FUNC_MMAP' => 1,
'AC_TYPE_SIZE_T' => 1,
'AC_CHECK_TYPES' => 1,
'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
'AC_CHECK_MEMBERS' => 1,
'AC_DEFUN_ONCE' => 1,
'AC_FUNC_UTIME_NULL' => 1,
'AC_FUNC_SELECT_ARGTYPES' => 1,
'_LT_AC_LANG_GCJ' => 1,
'AC_FUNC_STRFTIME' => 1,
'AC_HEADER_STAT' => 1,
'AC_C_INLINE' => 1,
'AC_LIBTOOL_RC' => 1,
'_LT_AC_PROG_ECHO_BACKSLASH' => 1,
'AC_DISABLE_FAST_INSTALL' => 1,
'AC_CONFIG_FILES' => 1,
'_LT_AC_TRY_DLOPEN_SELF' => 1,
'_LT_AC_SYS_LIBPATH_AIX' => 1,
'include' => 1,
'LT_AC_PROG_SED' => 1,
'AM_ENABLE_SHARED' => 1,
'AM_GNU_GETTEXT' => 1,
'_LT_AC_LANG_GCJ_CONFIG' => 1,
'AC_ENABLE_SHARED' => 1,
'AC_CHECK_LIB' => 1,
'AC_FUNC_OBSTACK' => 1,
'AC_FUNC_MALLOC' => 1,
'AC_FUNC_GETGROUPS' => 1,
'AC_FUNC_GETLOADAVG' => 1,
'AC_ENABLE_STATIC' => 1,
'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1,
'AC_FUNC_FSEEKO' => 1,
'_LT_AC_TAGVAR' => 1,
'AM_PROG_CC_C_O' => 1,
'AC_LIBTOOL_LANG_F77_CONFIG' => 1,
'AM_CONDITIONAL' => 1,
'AC_FUNC_MKTIME' => 1,
'AC_HEADER_SYS_WAIT' => 1,
'AC_FUNC_MEMCMP' => 1,
'AC_PROG_LN_S' => 1,
'AM_PROG_INSTALL_SH' => 1,
'm4_include' => 1,
'AC_PROG_EGREP' => 1,
'AC_HEADER_DIRENT' => 1,
'AC_PATH_MAGIC' => 1,
'_AC_AM_CONFIG_HEADER_HOOK' => 1,
'AM_MAKE_INCLUDE' => 1,
'_LT_AC_TAGCONFIG' => 1,
'm4_pattern_forbid' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_LIBTOOL_COMPILER_OPTION' => 1,
'AC_DISABLE_SHARED' => 1,
'_LT_COMPILER_BOILERPLATE' => 1,
'AC_LIBTOOL_SETUP' => 1,
'AC_LIBTOOL_WIN32_DLL' => 1,
'AC_PROG_LD_RELOAD_FLAG' => 1,
'AC_HEADER_TIME' => 1,
'AM_MISSING_HAS_RUN' => 1,
'AC_FUNC_GETMNTENT' => 1,
'AC_TYPE_MODE_T' => 1,
'AC_LIBTOOL_DLOPEN_SELF' => 1,
'm4_sinclude' => 1,
'AC_PATH_X' => 1,
'AC_LIBTOOL_PROG_LD_SHLIBS' => 1,
'_PKG_SHORT_ERRORS_SUPPORTED' => 1,
'AC_HEADER_STDC' => 1,
'AC_LIBTOOL_LINKER_OPTION' => 1,
'PKG_CHECK_EXISTS' => 1,
'AC_LIBTOOL_CXX' => 1,
'LT_AC_PROG_RC' => 1,
'LT_AC_PROG_GCJ' => 1,
'AC_FUNC_ERROR_AT_LINE' => 1,
'AM_DISABLE_STATIC' => 1,
'_LT_AC_PROG_CXXCPP' => 1,
'AM_DEP_TRACK' => 1,
'AM_CONFIG_HEADER' => 1,
'_AC_PROG_LIBTOOL' => 1,
'AC_FUNC_MBRTOWC' => 1,
'AC_TYPE_SIGNAL' => 1,
'_AM_IF_OPTION' => 1,
'AC_TYPE_UID_T' => 1,
'AC_PATH_TOOL_PREFIX' => 1,
'm4_pattern_allow' => 1,
'AC_LIBTOOL_F77' => 1,
'AM_SET_LEADING_DOT' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'_AM_DEPENDENCIES' => 1,
'AC_LIBTOOL_LANG_C_CONFIG' => 1,
'_LT_AC_SYS_COMPILER' => 1,
'AC_PROG_CC' => 1,
'AM_PROG_NM' => 1,
'PKG_CHECK_MODULES' => 1,
'AC_FUNC_STRCOLL' => 1,
'AC_PROG_YACC' => 1,
'AC_LIBLTDL_CONVENIENCE' => 1,
'AC_DEPLIBS_CHECK_METHOD' => 1,
'AC_FUNC_CHOWN' => 1,
'AC_LIBLTDL_INSTALLABLE' => 1,
'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1,
'AC_FUNC_GETPGRP' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_FUNC_REALLOC' => 1,
'AC_DISABLE_STATIC' => 1,
'AC_CONFIG_LINKS' => 1,
'AM_MAINTAINER_MODE' => 1,
'_LT_AC_LOCK' => 1,
'_LT_AC_LANG_RC_CONFIG' => 1,
'AC_PROG_CPP' => 1,
'AC_C_CONST' => 1,
'AC_PROG_LEX' => 1,
'AC_TYPE_PID_T' => 1,
'AC_LIBTOOL_POSTDEP_PREDEP' => 1,
'AC_FUNC_SETVBUF_REVERSED' => 1,
'AM_AUX_DIR_EXPAND' => 1,
'AC_PROG_INSTALL' => 1,
'_LT_AC_LANG_F77_CONFIG' => 1,
'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1,
'_AM_SET_OPTIONS' => 1,
'_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
'AM_RUN_LOG' => 1,
'AC_LIBTOOL_PICMODE' => 1,
'AH_OUTPUT' => 1,
'AC_CHECK_LIBM' => 1,
'AC_LIBTOOL_SYS_LIB_STRIP' => 1,
'_AM_MANGLE_OPTION' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1,
'AC_CONFIG_HEADERS' => 1,
'AM_SET_DEPDIR' => 1,
'PKG_PROG_PKG_CONFIG' => 1,
'_LT_CC_BASENAME' => 1,
'AC_CHECK_FUNCS' => 1
}
], 'Autom4te::Request' )
);

0
autom4te.cache/traces.0 Normal file
View file

441
autom4te.cache/traces.1 Normal file
View file

@ -0,0 +1,441 @@
m4trace:configure.ac:4: -1- AC_INIT([libdbus-c++], [0.3.0], [shackan@gmail.com])
m4trace:configure.ac:4: -1- m4_pattern_forbid([^_?A[CHUM]_])
m4trace:configure.ac:4: -1- m4_pattern_forbid([_AC_])
m4trace:configure.ac:4: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
m4trace:configure.ac:4: -1- m4_pattern_allow([^AS_FLAGS$])
m4trace:configure.ac:4: -1- m4_pattern_forbid([^_?m4_])
m4trace:configure.ac:4: -1- m4_pattern_forbid([^dnl$])
m4trace:configure.ac:4: -1- m4_pattern_forbid([^_?AS_])
m4trace:configure.ac:4: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
m4trace:configure.ac:4: -1- AC_SUBST([PATH_SEPARATOR])
m4trace:configure.ac:4: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
m4trace:configure.ac:4: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
m4trace:configure.ac:4: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
m4trace:configure.ac:4: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
m4trace:configure.ac:4: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
m4trace:configure.ac:4: -1- AC_SUBST([exec_prefix], [NONE])
m4trace:configure.ac:4: -1- AC_SUBST([prefix], [NONE])
m4trace:configure.ac:4: -1- AC_SUBST([program_transform_name], [s,x,x,])
m4trace:configure.ac:4: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
m4trace:configure.ac:4: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
m4trace:configure.ac:4: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
m4trace:configure.ac:4: -1- AC_SUBST([datadir], ['${prefix}/share'])
m4trace:configure.ac:4: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
m4trace:configure.ac:4: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
m4trace:configure.ac:4: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
m4trace:configure.ac:4: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
m4trace:configure.ac:4: -1- AC_SUBST([includedir], ['${prefix}/include'])
m4trace:configure.ac:4: -1- AC_SUBST([oldincludedir], ['/usr/include'])
m4trace:configure.ac:4: -1- AC_SUBST([infodir], ['${prefix}/info'])
m4trace:configure.ac:4: -1- AC_SUBST([mandir], ['${prefix}/man'])
m4trace:configure.ac:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
m4trace:configure.ac:4: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
#undef PACKAGE_NAME])
m4trace:configure.ac:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
m4trace:configure.ac:4: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME])
m4trace:configure.ac:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
m4trace:configure.ac:4: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
#undef PACKAGE_VERSION])
m4trace:configure.ac:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
m4trace:configure.ac:4: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
#undef PACKAGE_STRING])
m4trace:configure.ac:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
m4trace:configure.ac:4: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT])
m4trace:configure.ac:4: -1- AC_SUBST([build_alias])
m4trace:configure.ac:4: -1- AC_SUBST([host_alias])
m4trace:configure.ac:4: -1- AC_SUBST([target_alias])
m4trace:configure.ac:4: -1- AC_SUBST([DEFS])
m4trace:configure.ac:4: -1- AC_SUBST([ECHO_C])
m4trace:configure.ac:4: -1- AC_SUBST([ECHO_N])
m4trace:configure.ac:4: -1- AC_SUBST([ECHO_T])
m4trace:configure.ac:4: -1- AC_SUBST([LIBS])
m4trace:configure.ac:6: -1- AM_INIT_AUTOMAKE([libdbus-c++], [0.3.0])
m4trace:configure.ac:6: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
m4trace:configure.ac:6: -1- AM_AUTOMAKE_VERSION([1.9.6])
m4trace:configure.ac:6: -1- AC_PROG_INSTALL
m4trace:configure.ac:6: -1- AC_SUBST([INSTALL_PROGRAM])
m4trace:configure.ac:6: -1- AC_SUBST([INSTALL_SCRIPT])
m4trace:configure.ac:6: -1- AC_SUBST([INSTALL_DATA])
m4trace:configure.ac:6: -1- AC_SUBST([CYGPATH_W])
m4trace:configure.ac:6: -1- AC_SUBST([PACKAGE], [libdbus-c++])
m4trace:configure.ac:6: -1- AC_SUBST([VERSION], [0.3.0])
m4trace:configure.ac:6: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE])
m4trace:configure.ac:6: -1- AH_OUTPUT([PACKAGE], [/* Name of package */
#undef PACKAGE])
m4trace:configure.ac:6: -1- AC_DEFINE_TRACE_LITERAL([VERSION])
m4trace:configure.ac:6: -1- AH_OUTPUT([VERSION], [/* Version number of package */
#undef VERSION])
m4trace:configure.ac:6: -1- AC_SUBST([ACLOCAL])
m4trace:configure.ac:6: -1- AC_SUBST([AUTOCONF])
m4trace:configure.ac:6: -1- AC_SUBST([AUTOMAKE])
m4trace:configure.ac:6: -1- AC_SUBST([AUTOHEADER])
m4trace:configure.ac:6: -1- AC_SUBST([MAKEINFO])
m4trace:configure.ac:6: -1- AC_SUBST([install_sh])
m4trace:configure.ac:6: -1- AC_SUBST([STRIP])
m4trace:configure.ac:6: -1- AC_SUBST([ac_ct_STRIP])
m4trace:configure.ac:6: -1- AC_SUBST([INSTALL_STRIP_PROGRAM])
m4trace:configure.ac:6: -1- AC_SUBST([mkdir_p])
m4trace:configure.ac:6: -1- AC_PROG_AWK
m4trace:configure.ac:6: -1- AC_SUBST([AWK])
m4trace:configure.ac:6: -1- AC_PROG_MAKE_SET
m4trace:configure.ac:6: -1- AC_SUBST([SET_MAKE])
m4trace:configure.ac:6: -1- AC_SUBST([am__leading_dot])
m4trace:configure.ac:6: -1- AC_SUBST([AMTAR])
m4trace:configure.ac:6: -1- AC_SUBST([am__tar])
m4trace:configure.ac:6: -1- AC_SUBST([am__untar])
m4trace:configure.ac:7: -1- _m4_warn([obsolete], [The macro `AM_CONFIG_HEADER' is obsolete.
You should run autoupdate.], [aclocal.m4:6915: AM_CONFIG_HEADER is expanded from...
configure.ac:7: the top level])
m4trace:configure.ac:7: -1- AC_CONFIG_HEADERS([include/dbus-c++/config.h])
m4trace:configure.ac:9: -1- AC_CANONICAL_HOST
m4trace:configure.ac:9: -1- AC_CANONICAL_BUILD
m4trace:configure.ac:9: -1- AC_SUBST([build], [$ac_cv_build])
m4trace:configure.ac:9: -1- AC_SUBST([build_cpu], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])
m4trace:configure.ac:9: -1- AC_SUBST([build_vendor], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])
m4trace:configure.ac:9: -1- AC_SUBST([build_os], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])
m4trace:configure.ac:9: -1- AC_SUBST([host], [$ac_cv_host])
m4trace:configure.ac:9: -1- AC_SUBST([host_cpu], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])
m4trace:configure.ac:9: -1- AC_SUBST([host_vendor], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])
m4trace:configure.ac:9: -1- AC_SUBST([host_os], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])
m4trace:configure.ac:23: -1- _m4_warn([obsolete], [The macro `AC_LANG_CPLUSPLUS' is obsolete.
You should run autoupdate.], [autoconf/c.m4:103: AC_LANG_CPLUSPLUS is expanded from...
configure.ac:23: the top level])
m4trace:configure.ac:25: -1- AC_PROG_CC
m4trace:configure.ac:25: -1- AC_SUBST([CC])
m4trace:configure.ac:25: -1- AC_SUBST([CFLAGS])
m4trace:configure.ac:25: -1- AC_SUBST([LDFLAGS])
m4trace:configure.ac:25: -1- AC_SUBST([CPPFLAGS])
m4trace:configure.ac:25: -1- AC_SUBST([CC])
m4trace:configure.ac:25: -1- AC_SUBST([ac_ct_CC])
m4trace:configure.ac:25: -1- AC_SUBST([CC])
m4trace:configure.ac:25: -1- AC_SUBST([ac_ct_CC])
m4trace:configure.ac:25: -1- AC_SUBST([CC])
m4trace:configure.ac:25: -1- AC_SUBST([CC])
m4trace:configure.ac:25: -1- AC_SUBST([ac_ct_CC])
m4trace:configure.ac:25: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
m4trace:configure.ac:25: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
m4trace:configure.ac:25: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])
m4trace:configure.ac:25: -1- AC_SUBST([am__include])
m4trace:configure.ac:25: -1- AC_SUBST([am__quote])
m4trace:configure.ac:25: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
m4trace:configure.ac:25: -1- AC_SUBST([AMDEP_TRUE])
m4trace:configure.ac:25: -1- AC_SUBST([AMDEP_FALSE])
m4trace:configure.ac:25: -1- AC_SUBST([AMDEPBACKSLASH])
m4trace:configure.ac:25: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type])
m4trace:configure.ac:25: -1- AM_CONDITIONAL([am__fastdepCC], [
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3])
m4trace:configure.ac:25: -1- AC_SUBST([am__fastdepCC_TRUE])
m4trace:configure.ac:25: -1- AC_SUBST([am__fastdepCC_FALSE])
m4trace:configure.ac:26: -1- AC_PROG_CXX
m4trace:configure.ac:26: -1- AC_SUBST([CXX])
m4trace:configure.ac:26: -1- AC_SUBST([CXXFLAGS])
m4trace:configure.ac:26: -1- AC_SUBST([LDFLAGS])
m4trace:configure.ac:26: -1- AC_SUBST([CPPFLAGS])
m4trace:configure.ac:26: -1- AC_SUBST([CXX])
m4trace:configure.ac:26: -1- AC_SUBST([ac_ct_CXX])
m4trace:configure.ac:26: -1- AC_SUBST([CXXDEPMODE], [depmode=$am_cv_CXX_dependencies_compiler_type])
m4trace:configure.ac:26: -1- AM_CONDITIONAL([am__fastdepCXX], [
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_CXX_dependencies_compiler_type" = gcc3])
m4trace:configure.ac:26: -1- AC_SUBST([am__fastdepCXX_TRUE])
m4trace:configure.ac:26: -1- AC_SUBST([am__fastdepCXX_FALSE])
m4trace:configure.ac:30: -1- AC_PROG_LIBTOOL
m4trace:configure.ac:30: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
autoconf/general.m4:1303: AC_ARG_ENABLE is expanded from...
aclocal.m4:1950: AC_ENABLE_SHARED is expanded from...
configure.ac:30: AC_ENABLE_SHARED is required by...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.ac:30: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.ac:30: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
aclocal.m4:6337: AM_PROG_LIBTOOL is expanded from...
configure.ac:30: the top level])
m4trace:configure.ac:30: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
autoconf/general.m4:1303: AC_ARG_ENABLE is expanded from...
aclocal.m4:1989: AC_ENABLE_STATIC is expanded from...
configure.ac:30: AC_ENABLE_STATIC is required by...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.ac:30: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.ac:30: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
aclocal.m4:6337: AM_PROG_LIBTOOL is expanded from...
configure.ac:30: the top level])
m4trace:configure.ac:30: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
autoconf/general.m4:1303: AC_ARG_ENABLE is expanded from...
aclocal.m4:2028: AC_ENABLE_FAST_INSTALL is expanded from...
configure.ac:30: AC_ENABLE_FAST_INSTALL is required by...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.ac:30: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.ac:30: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
aclocal.m4:6337: AM_PROG_LIBTOOL is expanded from...
configure.ac:30: the top level])
m4trace:configure.ac:30: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
autoconf/general.m4:1331: AC_ARG_WITH is expanded from...
aclocal.m4:2225: AC_PROG_LD is expanded from...
configure.ac:30: AC_PROG_LD is required by...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.ac:30: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.ac:30: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
aclocal.m4:6337: AM_PROG_LIBTOOL is expanded from...
configure.ac:30: the top level])
m4trace:configure.ac:30: -1- AC_SUBST([EGREP])
m4trace:configure.ac:30: -1- AC_PROG_LN_S
m4trace:configure.ac:30: -1- AC_SUBST([LN_S], [$as_ln_s])
m4trace:configure.ac:30: -1- AC_SUBST([ECHO])
m4trace:configure.ac:30: -1- AC_SUBST([AR])
m4trace:configure.ac:30: -1- AC_SUBST([ac_ct_AR])
m4trace:configure.ac:30: -1- AC_SUBST([RANLIB])
m4trace:configure.ac:30: -1- AC_SUBST([ac_ct_RANLIB])
m4trace:configure.ac:30: -1- AC_SUBST([STRIP])
m4trace:configure.ac:30: -1- AC_SUBST([ac_ct_STRIP])
m4trace:configure.ac:30: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
autoconf/general.m4:1303: AC_ARG_ENABLE is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.ac:30: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.ac:30: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
aclocal.m4:6337: AM_PROG_LIBTOOL is expanded from...
configure.ac:30: the top level])
m4trace:configure.ac:30: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
autoconf/general.m4:1331: AC_ARG_WITH is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.ac:30: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.ac:30: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
aclocal.m4:6337: AM_PROG_LIBTOOL is expanded from...
configure.ac:30: the top level])
m4trace:configure.ac:30: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
You should run autoupdate.], [autoconf/general.m4:2223: AC_TRY_LINK is expanded from...
autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from...
aclocal.m4:614: _LT_AC_LOCK is expanded from...
configure.ac:30: _LT_AC_LOCK is required by...
aclocal.m4:1100: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
aclocal.m4:2737: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:2668: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.ac:30: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.ac:30: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
aclocal.m4:6337: AM_PROG_LIBTOOL is expanded from...
configure.ac:30: the top level])
m4trace:configure.ac:30: -1- AC_CHECK_HEADERS([dlfcn.h])
m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H])
m4trace:configure.ac:30: -1- AC_HEADER_STDC
m4trace:configure.ac:30: -1- AC_PROG_CPP
m4trace:configure.ac:30: -1- AC_SUBST([CPP])
m4trace:configure.ac:30: -1- AC_SUBST([CPPFLAGS])
m4trace:configure.ac:30: -1- AC_SUBST([CPP])
m4trace:configure.ac:30: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
m4trace:configure.ac:30: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS])
m4trace:configure.ac:30: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default])
m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H])
m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H])
m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H])
m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H])
m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H])
m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H])
m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H])
m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H])
m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H])
m4trace:configure.ac:30: -1- AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [
lt_cv_dlopen="dyld"
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
])
m4trace:configure.ac:30: -1- AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen],
[lt_cv_dlopen="dlopen"],
[AC_CHECK_LIB([dl], [dlopen],
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
[AC_CHECK_LIB([svld], [dlopen],
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
[AC_CHECK_LIB([dld], [dld_link],
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
])
])
])
])
m4trace:configure.ac:30: -1- AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen],
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
[AC_CHECK_LIB([dld], [dld_link],
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
])
])
m4trace:configure.ac:30: -1- AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link],
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
])
m4trace:configure.ac:30: -1- AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
m4trace:configure.ac:30: -1- _LT_AC_TAGCONFIG
m4trace:configure.ac:30: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
autoconf/general.m4:1331: AC_ARG_WITH is expanded from...
aclocal.m4:1904: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.ac:30: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.ac:30: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
aclocal.m4:6337: AM_PROG_LIBTOOL is expanded from...
configure.ac:30: the top level])
m4trace:configure.ac:30: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me:$LINENO: error: tag name \"$tagname\" already exists], [aclocal.m4:1904: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.ac:30: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.ac:30: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
aclocal.m4:6337: AM_PROG_LIBTOOL is expanded from...
configure.ac:30: the top level])
m4trace:configure.ac:30: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me: error: tag name \"$tagname\" already exists], [aclocal.m4:1904: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.ac:30: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.ac:30: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
aclocal.m4:6337: AM_PROG_LIBTOOL is expanded from...
configure.ac:30: the top level])
m4trace:configure.ac:30: -1- AC_SUBST([CXXCPP])
m4trace:configure.ac:30: -1- AC_SUBST([CPPFLAGS])
m4trace:configure.ac:30: -1- AC_SUBST([CXXCPP])
m4trace:configure.ac:30: -1- AC_SUBST([F77])
m4trace:configure.ac:30: -1- AC_SUBST([FFLAGS])
m4trace:configure.ac:30: -1- AC_SUBST([LDFLAGS])
m4trace:configure.ac:30: -1- AC_SUBST([F77])
m4trace:configure.ac:30: -1- AC_SUBST([ac_ct_F77])
m4trace:configure.ac:30: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete.
You should run autoupdate.], [autoconf/lang.m4:166: AC_LANG_SAVE is expanded from...
aclocal.m4:4058: _LT_AC_LANG_GCJ_CONFIG is expanded from...
aclocal.m4:4010: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from...
aclocal.m4:1904: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.ac:30: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.ac:30: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
aclocal.m4:6337: AM_PROG_LIBTOOL is expanded from...
configure.ac:30: the top level])
m4trace:configure.ac:30: -1- _m4_warn([obsolete], [instead of using `AC_LANG', `AC_LANG_SAVE',
and `AC_LANG_RESTORE', you should use `AC_LANG_PUSH' and `AC_LANG_POP'.], [autoconf/lang.m4:166: AC_LANG_SAVE is expanded from...
aclocal.m4:4058: _LT_AC_LANG_GCJ_CONFIG is expanded from...
aclocal.m4:4010: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from...
aclocal.m4:1904: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.ac:30: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.ac:30: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
aclocal.m4:6337: AM_PROG_LIBTOOL is expanded from...
configure.ac:30: the top level])
m4trace:configure.ac:30: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete.
You should run autoupdate.], [autoconf/lang.m4:172: AC_LANG_RESTORE is expanded from...
aclocal.m4:4058: _LT_AC_LANG_GCJ_CONFIG is expanded from...
aclocal.m4:4010: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from...
aclocal.m4:1904: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.ac:30: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.ac:30: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
aclocal.m4:6337: AM_PROG_LIBTOOL is expanded from...
configure.ac:30: the top level])
m4trace:configure.ac:30: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete.
You should run autoupdate.], [autoconf/lang.m4:166: AC_LANG_SAVE is expanded from...
aclocal.m4:4102: _LT_AC_LANG_RC_CONFIG is expanded from...
aclocal.m4:4066: AC_LIBTOOL_LANG_RC_CONFIG is expanded from...
aclocal.m4:1904: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.ac:30: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.ac:30: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
aclocal.m4:6337: AM_PROG_LIBTOOL is expanded from...
configure.ac:30: the top level])
m4trace:configure.ac:30: -1- _m4_warn([obsolete], [instead of using `AC_LANG', `AC_LANG_SAVE',
and `AC_LANG_RESTORE', you should use `AC_LANG_PUSH' and `AC_LANG_POP'.], [autoconf/lang.m4:166: AC_LANG_SAVE is expanded from...
aclocal.m4:4102: _LT_AC_LANG_RC_CONFIG is expanded from...
aclocal.m4:4066: AC_LIBTOOL_LANG_RC_CONFIG is expanded from...
aclocal.m4:1904: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.ac:30: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.ac:30: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
aclocal.m4:6337: AM_PROG_LIBTOOL is expanded from...
configure.ac:30: the top level])
m4trace:configure.ac:30: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete.
You should run autoupdate.], [autoconf/lang.m4:172: AC_LANG_RESTORE is expanded from...
aclocal.m4:4102: _LT_AC_LANG_RC_CONFIG is expanded from...
aclocal.m4:4066: AC_LIBTOOL_LANG_RC_CONFIG is expanded from...
aclocal.m4:1904: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:226: AC_LIBTOOL_SETUP is expanded from...
configure.ac:30: AC_LIBTOOL_SETUP is required by...
aclocal.m4:81: _AC_PROG_LIBTOOL is expanded from...
configure.ac:30: _AC_PROG_LIBTOOL is required by...
aclocal.m4:61: AC_PROG_LIBTOOL is expanded from...
aclocal.m4:6337: AM_PROG_LIBTOOL is expanded from...
configure.ac:30: the top level])
m4trace:configure.ac:30: -1- AC_SUBST([LIBTOOL])
m4trace:configure.ac:32: -1- m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4trace:configure.ac:32: -1- m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
m4trace:configure.ac:32: -1- AC_SUBST([PKG_CONFIG])
m4trace:configure.ac:32: -1- AC_SUBST([PKG_CONFIG], [$ac_cv_path_PKG_CONFIG])
m4trace:configure.ac:32: -1- AC_SUBST([ac_pt_PKG_CONFIG], [$ac_cv_path_ac_pt_PKG_CONFIG])
m4trace:configure.ac:41: -1- AC_SUBST([dbus_CFLAGS])
m4trace:configure.ac:41: -1- AC_SUBST([dbus_LIBS])
m4trace:configure.ac:42: -1- AC_SUBST([dbus_CFLAGS])
m4trace:configure.ac:43: -1- AC_SUBST([dbus_LIBS])
m4trace:configure.ac:47: -1- AC_CHECK_LIB([expat], [XML_ParserCreate_MM], [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ], [have_expat=false])
m4trace:configure.ac:47: -1- AC_CHECK_HEADERS([expat.h], [have_expat=true], [have_expat=false])
m4trace:configure.ac:47: -1- AH_OUTPUT([HAVE_EXPAT_H], [/* Define to 1 if you have the <expat.h> header file. */
#undef HAVE_EXPAT_H])
m4trace:configure.ac:57: -1- AC_SUBST([xml_CFLAGS])
m4trace:configure.ac:58: -1- AC_SUBST([xml_LIBS])
m4trace:configure.ac:63: -1- AC_SUBST([DEBUG_FLAGS])
m4trace:configure.ac:68: -1- AC_SUBST([DOXYGEN], [$ac_cv_path_DOXYGEN])
m4trace:configure.ac:88: -1- AM_CONDITIONAL([DBUS_DOXYGEN_DOCS_ENABLED], [test x$enable_doxygen_docs = xyes])
m4trace:configure.ac:88: -1- AC_SUBST([DBUS_DOXYGEN_DOCS_ENABLED_TRUE])
m4trace:configure.ac:88: -1- AC_SUBST([DBUS_DOXYGEN_DOCS_ENABLED_FALSE])
m4trace:configure.ac:104: -1- AC_CONFIG_FILES([Makefile
src/Makefile
tools/Makefile
data/Makefile
doc/Makefile
doc/Doxyfile
doc/html/Makefile
examples/Makefile
tests/Makefile
dbus-c++-0.3.pc
])
m4trace:configure.ac:104: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
You should run autoupdate.], [])
m4trace:configure.ac:104: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
m4trace:configure.ac:104: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])

9339
autom4te.cache/traces.2 Normal file

File diff suppressed because it is too large Load diff

1
config.guess vendored Symbolic link
View file

@ -0,0 +1 @@
/usr/share/libtool/config.guess

1
config.sub vendored Symbolic link
View file

@ -0,0 +1 @@
/usr/share/libtool/config.sub

20576
configure vendored Executable file

File diff suppressed because it is too large Load diff

104
configure.ac Normal file
View file

@ -0,0 +1,104 @@
# Autojunk script for libdbus++
AC_PREREQ(2.59)
AC_INIT([libdbus-c++], 0.3.0, [shackan@gmail.com])
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_CONFIG_HEADER([include/dbus-c++/config.h])
AC_CANONICAL_HOST
# Set configuration options
AC_ARG_ENABLE(doxygen-docs,
AS_HELP_STRING([--enable-doxygen-docs],
[build DOXYGEN documentation (requires Doxygen)]),
enable_doxygen_docs=$enableval,enable_doxygen_docs=auto
)
# Check for programs
AC_LANG_CPLUSPLUS
AC_PROG_CC
AC_PROG_CXX
#AM_ENABLE_STATIC
#AM_DISABLE_SHARED
AM_PROG_LIBTOOL
PKG_PROG_PKG_CONFIG
# Check for dependencies
DBUS_REQUIRED_VERSION=0.60
PKG_CHECK_MODULES([dbus], dbus-1 >= $DBUS_REQUIRED_VERSION,,
AC_MSG_ERROR([You need the DBus libraries (version 0.6 or better)]
[http://www.freedesktop.org/wiki/Software_2fdbus])
)
AC_SUBST(dbus_CFLAGS)
AC_SUBST(dbus_LIBS)
AC_CHECK_LIB([expat], XML_ParserCreate_MM,
[ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ],
have_expat=false)
if ! $have_expat; then
AC_MSG_ERROR([You need the eXpat xml parser]
[http://expat.sourceforge.net/])
fi
xml_CFLAGS=
xml_LIBS=-lexpat
AC_SUBST(xml_CFLAGS)
AC_SUBST(xml_LIBS)
CXXFLAGS="-ggdb -O0 -DDEBUG -Wall"
#CXXFLAGS="-O3 -DDEBUG -Wall"
AC_SUBST(DEBUG_FLAGS)
# Doxygen Documentation
AC_PATH_PROG(DOXYGEN, doxygen, no)
AC_MSG_CHECKING([whether to build Doxygen documentation])
if test x$DOXYGEN = xno ; then
have_doxygen=no
else
have_doxygen=yes
fi
if test x$enable_doxygen_docs = xauto ; then
enable_doxygen_docs=no
fi
if test x$enable_doxygen_docs = xyes; then
if test x$have_doxygen = xno; then
AC_MSG_ERROR([Building Doxygen docs explicitly required, but Doxygen not found])
fi
fi
AM_CONDITIONAL(DBUS_DOXYGEN_DOCS_ENABLED, test x$enable_doxygen_docs = xyes)
AC_MSG_RESULT(yes)
# Save processed files
AC_OUTPUT(
Makefile
src/Makefile
tools/Makefile
data/Makefile
doc/Makefile
doc/Doxyfile
doc/html/Makefile
examples/Makefile
tests/Makefile
dbus-c++-0.3.pc
)

0
data/Makefile.am Normal file
View file

318
data/Makefile.in Normal file
View file

@ -0,0 +1,318 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = data
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/dbus-c++/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBUS_DOXYGEN_DOCS_ENABLED_FALSE = @DBUS_DOXYGEN_DOCS_ENABLED_FALSE@
DBUS_DOXYGEN_DOCS_ENABLED_TRUE = @DBUS_DOXYGEN_DOCS_ENABLED_TRUE@
DEBUG_FLAGS = @DEBUG_FLAGS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DOXYGEN = @DOXYGEN@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
dbus_CFLAGS = @dbus_CFLAGS@
dbus_LIBS = @dbus_LIBS@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
xml_CFLAGS = @xml_CFLAGS@
xml_LIBS = @xml_LIBS@
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu data/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -0,0 +1,74 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg name="data" direction="out" type="s"/>
</method>
</interface>
<interface name="org.freedesktop.DBus">
<method name="RequestName">
<arg direction="in" type="s"/>
<arg direction="in" type="u"/>
<arg direction="out" type="u"/>
</method>
<method name="ReleaseName">
<arg direction="in" type="s"/>
<arg direction="out" type="u"/>
</method>
<method name="StartServiceByName">
<arg direction="in" type="s"/>
<arg direction="in" type="u"/>
<arg direction="out" type="u"/>
</method>
<method name="Hello">
<arg direction="out" type="s"/>
</method>
<method name="NameHasOwner">
<arg direction="in" type="s"/>
<arg direction="out" type="b"/>
</method>
<method name="ListNames">
<arg direction="out" type="as"/>
</method>
<method name="AddMatch">
<arg direction="in" type="s"/>
</method>
<method name="RemoveMatch">
<arg direction="in" type="s"/>
</method>
<method name="GetNameOwner">
<arg direction="in" type="s"/>
<arg direction="out" type="s"/>
</method>
<method name="ListQueuedOwners">
<arg direction="in" type="s"/>
<arg direction="out" type="as"/>
</method>
<method name="GetConnectionUnixUser">
<arg direction="in" type="s"/>
<arg direction="out" type="u"/>
</method>
<method name="GetConnectionUnixProcessID">
<arg direction="in" type="s"/>
<arg direction="out" type="u"/>
</method>
<method name="GetConnectionSELinuxSecurityContext">
<arg direction="in" type="s"/>
<arg direction="out" type="ay"/>
</method>
<method name="ReloadConfig">
</method>
<signal name="NameOwnerChanged">
<arg type="s"/>
<arg type="s"/>
<arg type="s"/>
</signal>
<signal name="NameLost">
<arg type="s"/>
</signal>
<signal name="NameAcquired">
<arg type="s"/>
</signal>
</interface>
</node>

11
dbus-c++-0.3.pc.in Normal file
View file

@ -0,0 +1,11 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: dbus-c++
Description: Native C++ bindings for D-Bus.
Requires: dbus-1
Version: @VERSION@
Libs: -L${libdir} -ldbus-c++-0.3
Cflags: -I${includedir}/dbus-c++-0.3 -DDBUS_API_SUBJECT_TO_CHANGE

530
depcomp Executable file
View file

@ -0,0 +1,530 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2005-07-09.11
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by `PROGRAMS ARGS'.
object Object file output by `PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputing dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
;;
esac
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a
# static library. This mecanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
#
# With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two
# compilations output dependencies in in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
tmpdepfile2=$dir$base.o.d # libtool 1.5
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.o.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
tmpdepfile4=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no
for arg in "$@"; do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E |
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
IFS=" "
for arg
do
case "$arg" in
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

251
doc/Doxyfile.in Normal file
View file

@ -0,0 +1,251 @@
# Doxyfile 1.4.6
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = @PACKAGE@
PROJECT_NUMBER = @VERSION@
OUTPUT_DIRECTORY = @top_srcdir@/doc/
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = YES
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 4
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
BUILTIN_STL_SUPPORT = YES
DISTRIBUTE_GROUP_DOC = NO
SUBGROUPING = YES
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = YES
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = NO
EXTRACT_LOCAL_METHODS = NO
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = YES
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_DIRECTORIES = NO
FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = YES
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT =
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = @top_srcdir@/src/ @top_srcdir@/include/
FILE_PATTERNS = *.cpp \
*.h
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = Makefile.* \
ChangeLog \
CHANGES \
CHANGES.* \
README \
README.* \
*.png \
AUTHORS \
DESIGN \
DESIGN.* \
*.desktop \
DESKTOP* \
COMMENTS \
HOWTO \
magic \
NOTES \
TODO \
THANKS
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = YES
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
USE_HTAGS = NO
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT =
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT =
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT =
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION =
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = NO
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH =
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = NO
TEMPLATE_RELATIONS = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 640
MAX_DOT_GRAPH_HEIGHT = 1024
MAX_DOT_GRAPH_DEPTH = 1000
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO

14
doc/Makefile.am Normal file
View file

@ -0,0 +1,14 @@
if DBUS_DOXYGEN_DOCS_ENABLED
SUBDIRS = html
EXTRA_DIST = Doxyfile.in
noinst_PROGRAMS = index.html
index_html_SOURCES = Doxyfile
index.html: Doxyfile
doxygen Doxyfile
endif

519
doc/Makefile.in Normal file
View file

@ -0,0 +1,519 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@DBUS_DOXYGEN_DOCS_ENABLED_TRUE@noinst_PROGRAMS = index.html$(EXEEXT)
subdir = doc
DIST_COMMON = $(srcdir)/Doxyfile.in $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/dbus-c++/config.h
CONFIG_CLEAN_FILES = Doxyfile
PROGRAMS = $(noinst_PROGRAMS)
am__index_html_SOURCES_DIST = Doxyfile
am_index_html_OBJECTS =
index_html_OBJECTS = $(am_index_html_OBJECTS)
index_html_LDADD = $(LDADD)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include/dbus-c++
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(index_html_SOURCES)
DIST_SOURCES = $(am__index_html_SOURCES_DIST)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-exec-recursive install-info-recursive \
install-recursive installcheck-recursive installdirs-recursive \
pdf-recursive ps-recursive uninstall-info-recursive \
uninstall-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = html
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBUS_DOXYGEN_DOCS_ENABLED_FALSE = @DBUS_DOXYGEN_DOCS_ENABLED_FALSE@
DBUS_DOXYGEN_DOCS_ENABLED_TRUE = @DBUS_DOXYGEN_DOCS_ENABLED_TRUE@
DEBUG_FLAGS = @DEBUG_FLAGS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DOXYGEN = @DOXYGEN@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
dbus_CFLAGS = @dbus_CFLAGS@
dbus_LIBS = @dbus_LIBS@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
xml_CFLAGS = @xml_CFLAGS@
xml_LIBS = @xml_LIBS@
@DBUS_DOXYGEN_DOCS_ENABLED_TRUE@SUBDIRS = html
@DBUS_DOXYGEN_DOCS_ENABLED_TRUE@EXTRA_DIST = Doxyfile.in
@DBUS_DOXYGEN_DOCS_ENABLED_TRUE@index_html_SOURCES = Doxyfile
all: all-recursive
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu doc/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
Doxyfile: $(top_builddir)/config.status $(srcdir)/Doxyfile.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
@DBUS_DOXYGEN_DOCS_ENABLED_FALSE@index.html$(EXEEXT): $(index_html_OBJECTS) $(index_html_DEPENDENCIES)
@DBUS_DOXYGEN_DOCS_ENABLED_FALSE@ @rm -f index.html$(EXEEXT)
@DBUS_DOXYGEN_DOCS_ENABLED_FALSE@ $(LINK) $(index_html_LDFLAGS) $(index_html_OBJECTS) $(index_html_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(mkdir_p) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-recursive
all-am: Makefile $(PROGRAMS)
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
info: info-recursive
info-am:
install-data-am:
install-exec-am:
install-info: install-info-recursive
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
clean clean-generic clean-libtool clean-noinstPROGRAMS \
clean-recursive ctags ctags-recursive distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-recursive distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic maintainer-clean-recursive \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am uninstall-info-am
@DBUS_DOXYGEN_DOCS_ENABLED_TRUE@index.html: Doxyfile
@DBUS_DOXYGEN_DOCS_ENABLED_TRUE@ doxygen Doxyfile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

1
doc/html/Makefile.am Normal file
View file

@ -0,0 +1 @@
CLEANFILES = *.html *.css *.png *.gif

320
doc/html/Makefile.in Normal file
View file

@ -0,0 +1,320 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = doc/html
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/dbus-c++/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBUS_DOXYGEN_DOCS_ENABLED_FALSE = @DBUS_DOXYGEN_DOCS_ENABLED_FALSE@
DBUS_DOXYGEN_DOCS_ENABLED_TRUE = @DBUS_DOXYGEN_DOCS_ENABLED_TRUE@
DEBUG_FLAGS = @DEBUG_FLAGS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DOXYGEN = @DOXYGEN@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
dbus_CFLAGS = @dbus_CFLAGS@
dbus_LIBS = @dbus_LIBS@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
xml_CFLAGS = @xml_CFLAGS@
xml_LIBS = @xml_LIBS@
CLEANFILES = *.html *.css *.png *.gif
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/html/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu doc/html/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

8
examples/Makefile.am Normal file
View file

@ -0,0 +1,8 @@
EXTRA_DIST = README
INCLUDES = -I$(top_srcdir)/include
noinst_PROGRAMS = echo_server
echo_server_SOURCES = server.cpp server.h
echo_server_LDADD = $(top_builddir)/src/libdbus-c++-0.3.la

438
examples/Makefile.in Normal file
View file

@ -0,0 +1,438 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
noinst_PROGRAMS = echo_server$(EXEEXT)
subdir = examples
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/dbus-c++/config.h
CONFIG_CLEAN_FILES =
PROGRAMS = $(noinst_PROGRAMS)
am_echo_server_OBJECTS = server.$(OBJEXT)
echo_server_OBJECTS = $(am_echo_server_OBJECTS)
echo_server_DEPENDENCIES = $(top_builddir)/src/libdbus-c++-0.3.la
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include/dbus-c++
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(echo_server_SOURCES)
DIST_SOURCES = $(echo_server_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBUS_DOXYGEN_DOCS_ENABLED_FALSE = @DBUS_DOXYGEN_DOCS_ENABLED_FALSE@
DBUS_DOXYGEN_DOCS_ENABLED_TRUE = @DBUS_DOXYGEN_DOCS_ENABLED_TRUE@
DEBUG_FLAGS = @DEBUG_FLAGS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DOXYGEN = @DOXYGEN@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
dbus_CFLAGS = @dbus_CFLAGS@
dbus_LIBS = @dbus_LIBS@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
xml_CFLAGS = @xml_CFLAGS@
xml_LIBS = @xml_LIBS@
EXTRA_DIST = README
INCLUDES = -I$(top_srcdir)/include
echo_server_SOURCES = server.cpp server.h
echo_server_LDADD = $(top_builddir)/src/libdbus-c++-0.3.la
all: all-am
.SUFFIXES:
.SUFFIXES: .cpp .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu examples/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
echo_server$(EXEEXT): $(echo_server_OBJECTS) $(echo_server_DEPENDENCIES)
@rm -f echo_server$(EXEEXT)
$(CXXLINK) $(echo_server_LDFLAGS) $(echo_server_OBJECTS) $(echo_server_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/server.Po@am__quote@
.cpp.o:
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cpp.obj:
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.cpp.lo:
@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstPROGRAMS ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

11
examples/README Normal file
View file

@ -0,0 +1,11 @@
This is a very simple use case of the c++ wrappers to write a DBus service, you can test it by running ./echo_server and then issuing the following commands:
dbus-send --dest=org.test.cbus --type=method_call --print-reply /org/test/cbus/EchoServer org.test.cbus.EchoServer.Echo string:"hello world"
method return sender=:1.34 -> dest=:1.36
string "hello world"
dbus-send --dest=org.test.cbus --type=method_call --print-reply /org/test/cbus/EchoServer org.test.cbus.EchoServer.Echo int32:10
Error org.freedesktop.DBus.Error.InvalidArgs: String value expected

52
examples/server.cpp Normal file
View file

@ -0,0 +1,52 @@
#include "server.h"
#include <signal.h>
class EchoServer :
public EchoInterface,
public DBus::IntrospectableAdaptor,
public DBus::ObjectAdaptor
{
public:
EchoServer( DBus::Connection& conn ) : DBus::ObjectAdaptor(conn, "/org/test/cbus/EchoServer")
{}
DBus::Message Echo( const DBus::CallMessage& msg )
{
DBus::MessageIter r = msg.r_iter();
DBus::ReturnMessage ret(msg);
DBus::MessageIter w = ret.w_iter();
const char* string = r.get_string();
w.append_string(string);
return ret;
}
};
DBus::BusDispatcher dispatcher;
void niam( int sig )
{
dispatcher.leave();
}
int main()
{
signal(SIGTERM, niam);
signal(SIGINT, niam);
DBus::default_dispatcher = &dispatcher;
DBus::Connection conn = DBus::Connection::SessionBus();
conn.request_name("org.test.cbus");
EchoServer server(conn);
dispatcher.enter();
return 0;
}

19
examples/server.h Normal file
View file

@ -0,0 +1,19 @@
#ifndef __ECHO_SERVER_H
#define __ECHO_SERVER_H
#include <dbus-c++/dbus-c++.h>
class EchoInterface :
public DBus::InterfaceAdaptor
{
public:
EchoInterface() : DBus::InterfaceAdaptor("org.test.cbus.EchoServer")
{
register_method(EchoInterface, Echo, Echo);
}
virtual DBus::Message Echo( const DBus::CallMessage& ) = 0;
};
#endif//__ECHO_SERVER_H

View file

@ -0,0 +1,58 @@
/* include/dbus-c++/config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <expat.h> header file. */
#undef HAVE_EXPAT_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION

View file

@ -0,0 +1,117 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_CONNECTION_H
#define __DBUSXX_CONNECTION_H
#include <list>
#include "types.h"
#include "util.h"
#include "message.h"
#include "pendingcall.h"
namespace DBus {
class Connection;
typedef Slot<bool, const Message&> MessageSlot;
typedef std::list<Connection*> ConnectionPList;
class ObjectAdaptor;
class Dispatcher;
class Connection
{
public:
static Connection SystemBus();
static Connection SessionBus();
static Connection ActivationBus();
struct Private;
typedef std::list<Private*> PrivatePList;
Connection( Private* );
Connection( const char* address, bool priv = false );
Connection( const Connection& c );
virtual ~Connection();
Dispatcher* setup( Dispatcher* );
bool operator == ( const Connection& ) const;
void add_match( const char* rule );
void remove_match( const char* rule );
bool add_filter( MessageSlot& );
void remove_filter( MessageSlot& );
bool unique_name( const char* n );
const char* unique_name() const;
bool connected() const;
void disconnect();
void flush();
bool send( const Message&, unsigned int* serial = NULL );
Message send_blocking( Message& msg, int timeout );
PendingCall send_async( Message& msg, int timeout );
void request_name( const char* name, int flags = 0 );
bool has_name( const char* name );
bool start_service( const char* name, unsigned long flags );
const std::vector<std::string>& names();
private:
void init();
private:
RefPtrI<Private> _pvt;
friend class ObjectAdaptor; // needed in order to register object paths for a connection
};
} /* namespace DBus */
#endif//__DBUSXX_CONNECTION_H

View file

@ -0,0 +1,44 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_DBUSXX_H
#define __DBUSXX_DBUSXX_H
#include "types.h"
#include "interface.h"
#include "object.h"
#include "connection.h"
#include "server.h"
#include "error.h"
#include "message.h"
#include "debug.h"
#include "pendingcall.h"
#include "server.h"
#include "util.h"
#include "dispatcher.h"
#include "eventloop.h"
#include "xml.h"
#include "introspection.h"
#endif//__DBUSXX_DBUSXX_H

36
include/dbus-c++/debug.h Normal file
View file

@ -0,0 +1,36 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_DEBUG_H
#define __DBUSXX_DEBUG_H
namespace DBus {
typedef void (*LogFunction)(const char* format, ...);
extern LogFunction debug_log;
} /* namespace DBus */
#endif

View file

@ -0,0 +1,241 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_DISPATCHER_H
#define __DBUSXX_DISPATCHER_H
#include "connection.h"
namespace DBus {
class Timeout
{
public:
class Internal;
Timeout( Internal* i );
virtual ~Timeout(){}
int interval() const;
bool enabled() const;
bool handle();
virtual void toggle() = 0;
private:
Timeout( const Timeout& );
private:
Internal* _int;
};
class Watch
{
public:
class Internal;
Watch( Internal* i );
virtual ~Watch(){}
int descriptor() const;
int flags() const;
bool enabled() const;
bool handle( int flags );
virtual void toggle() = 0;
private:
Watch( const Watch& );
private:
Internal* _int;
};
class Dispatcher
{
public:
virtual ~Dispatcher()
{}
void queue_connection( Connection::Private* );
void dispatch_pending();
virtual void enter() = 0;
virtual void leave() = 0;
virtual Timeout* add_timeout( Timeout::Internal* ) = 0;
virtual void rem_timeout( Timeout* ) = 0;
virtual Watch* add_watch( Watch::Internal* ) = 0;
virtual void rem_watch( Watch* ) = 0;
struct Private;
private:
Connection::PrivatePList _pending_queue;
};
extern Dispatcher* default_dispatcher;
/* classes for multithreading support
*/
class Mutex
{
public:
virtual ~Mutex() {}
virtual bool lock() = 0;
virtual bool unlock() = 0;
struct Internal;
protected:
Internal* _int;
};
class CondVar
{
public:
virtual ~CondVar() {}
virtual void wait( Mutex* ) = 0;
virtual bool wait_timeout( Mutex*, int timeout ) = 0;
virtual void wake_one() = 0;
virtual void wake_all() = 0;
struct Internal;
protected:
Internal* _int;
};
typedef Mutex* (*MutexNewFn)();
typedef void (*MutexFreeFn)( Mutex* mx );
typedef void (*MutexLockFn)( Mutex* mx );
typedef void (*MutexUnlockFn)( Mutex* mx );
typedef CondVar* (*CondVarNewFn)();
typedef void (*CondVarFreeFn)( CondVar* cv );
typedef void (*CondVarWaitFn)( CondVar* cv, Mutex* mx );
typedef bool (*CondVarWaitTimeoutFn)( CondVar* cv, Mutex* mx, int timeout );
typedef void (*CondVarWakeOneFn)( CondVar* cv );
typedef void (*CondVarWakeAllFn)( CondVar* cv );
void _init_threading(
MutexNewFn, MutexFreeFn, MutexLockFn, MutexUnlockFn,
CondVarNewFn, CondVarFreeFn, CondVarWaitFn, CondVarWaitTimeoutFn, CondVarWakeOneFn, CondVarWakeAllFn
);
template<class Mx, class Cv>
struct Threading
{
static void init()
{
_init_threading(
mutex_new, mutex_free, mutex_lock, mutex_unlock,
condvar_new, condvar_free, condvar_wait, condvar_wait_timeout, condvar_wake_one, condvar_wake_all
);
}
static Mutex* mutex_new()
{
return new Mx;
}
static void mutex_free( Mutex* mx )
{
delete mx;
}
static void mutex_lock( Mutex* mx )
{
mx->lock();
}
static void mutex_unlock( Mutex* mx )
{
mx->unlock();
}
static CondVar* condvar_new()
{
return new Cv;
}
static void condvar_free( CondVar* cv )
{
delete cv;
}
static void condvar_wait( CondVar* cv, Mutex* mx )
{
cv->wait(mx);
}
static bool condvar_wait_timeout( CondVar* cv, Mutex* mx, int timeout )
{
return cv->wait_timeout(mx, timeout);
}
static void condvar_wake_one( CondVar* cv )
{
cv->wake_one();
}
static void condvar_wake_all( CondVar* cv )
{
cv->wake_all();
}
};
} /* namespace DBus */
#endif//__DBUSXX_DISPATCHER_H

231
include/dbus-c++/error.h Normal file
View file

@ -0,0 +1,231 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_ERROR_H
#define __DBUSXX_ERROR_H
#include "util.h"
#include <exception>
namespace DBus {
class Message;
class InternalError;
class Error : public std::exception
{
public:
Error();
Error( InternalError& );
Error( const char* name, const char* message );
Error( Message& );
~Error() throw()
{}
const char* what() const throw();
const char* name();
const char* message();
void set( const char* name, const char* message );
// parameters MUST be static strings
bool is_set();
operator bool()
{
return is_set();
}
private:
RefPtrI<InternalError> _int;
};
struct ErrorFailed : public Error
{
ErrorFailed( const char* message )
: Error("org.freedesktop.DBus.Error.Failed", message)
{}
};
struct ErrorNoMemory : public Error
{
ErrorNoMemory( const char* message )
: Error("org.freedesktop.DBus.Error.NoMemory", message)
{}
};
struct ErrorServiceUnknown : public Error
{
ErrorServiceUnknown( const char* message )
: Error("org.freedesktop.DBus.Error.ServiceUnknown", message)
{}
};
struct ErrorNameHasNoOwner : public Error
{
ErrorNameHasNoOwner( const char* message )
: Error("org.freedesktop.DBus.Error.NameHasNoOwner", message)
{}
};
struct ErrorNoReply : public Error
{
ErrorNoReply( const char* message )
: Error("org.freedesktop.DBus.Error.NoReply", message)
{}
};
struct ErrorIOError : public Error
{
ErrorIOError( const char* message )
: Error("org.freedesktop.DBus.Error.IOError", message)
{}
};
struct ErrorBadAddress : public Error
{
ErrorBadAddress( const char* message )
: Error("org.freedesktop.DBus.Error.BadAddress", message)
{}
};
struct ErrorNotSupported : public Error
{
ErrorNotSupported( const char* message )
: Error("org.freedesktop.DBus.Error.NotSupported", message)
{}
};
struct ErrorLimitsExceeded : public Error
{
ErrorLimitsExceeded( const char* message )
: Error("org.freedesktop.DBus.Error.LimitsExceeded", message)
{}
};
struct ErrorAccessDenied : public Error
{
ErrorAccessDenied( const char* message )
: Error("org.freedesktop.DBus.Error.AccessDenied", message)
{}
};
struct ErrorAuthFailed : public Error
{
ErrorAuthFailed( const char* message )
: Error("org.freedesktop.DBus.Error.AuthFailed", message)
{}
};
struct ErrorNoServer : public Error
{
ErrorNoServer( const char* message )
: Error("org.freedesktop.DBus.Error.NoServer", message)
{}
};
struct ErrorTimeout : public Error
{
ErrorTimeout( const char* message )
: Error("org.freedesktop.DBus.Error.Timeout", message)
{}
};
struct ErrorNoNetwork : public Error
{
ErrorNoNetwork( const char* message )
: Error("org.freedesktop.DBus.Error.NoNetwork", message)
{}
};
struct ErrorAddressInUse : public Error
{
ErrorAddressInUse( const char* message )
: Error("org.freedesktop.DBus.Error.AddressInUse", message)
{}
};
struct ErrorDisconnected : public Error
{
ErrorDisconnected( const char* message )
: Error("org.freedesktop.DBus.Error.Disconnected", message)
{}
};
struct ErrorInvalidArgs : public Error
{
ErrorInvalidArgs( const char* message )
: Error("org.freedesktop.DBus.Error.InvalidArgs", message)
{}
};
struct ErrorFileNotFound : public Error
{
ErrorFileNotFound( const char* message )
: Error("org.freedesktop.DBus.Error.FileNotFound", message)
{}
};
struct ErrorUnknownMethod : public Error
{
ErrorUnknownMethod( const char* message )
: Error("org.freedesktop.DBus.Error.UnknownMethod", message)
{}
};
struct ErrorTimedOut : public Error
{
ErrorTimedOut( const char* message )
: Error("org.freedesktop.DBus.Error.TimedOut", message)
{}
};
struct ErrorMatchRuleNotFound : public Error
{
ErrorMatchRuleNotFound( const char* message )
: Error("org.freedesktop.DBus.Error.MatchRuleNotFound", message)
{}
};
struct ErrorMatchRuleInvalid : public Error
{
ErrorMatchRuleInvalid( const char* message )
: Error("org.freedesktop.DBus.Error.MatchRuleInvalid", message)
{}
};
/* TODO: add the remaining error codes from dbus-protocol.h */
} /* namespace DBus */
#endif//__DBUSXX_ERROR_H

View file

@ -0,0 +1,197 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_EVENTLOOP_H
#define __DBUSXX_EVENTLOOP_H
#include <list>
#include "dispatcher.h"
#include "util.h"
namespace DBus {
class EepleMainLoop;
class EepleTimeout
{
public:
EepleTimeout( int interval, bool repeat, EepleMainLoop* );
virtual ~EepleTimeout();
bool enabled(){ return _enabled; }
void enabled(bool e){ _enabled = e; }
int interval(){ return _interval; }
void interval(int i){ _interval = i; }
bool repeat(){ return _repeat; }
void repeat(bool r){ _repeat = r; }
void* data(){ return _data; }
void data(void* d){ _data = d; }
Slot<void, EepleTimeout&> expired;
private:
bool _enabled;
int _interval;
bool _repeat;
double _expiration;
void* _data;
EepleMainLoop* _disp;
friend class EepleMainLoop;
};
typedef std::list< EepleTimeout* > Timeouts;
class EepleWatch
{
public:
EepleWatch( int fd, int flags, EepleMainLoop* );
virtual ~EepleWatch();
bool enabled(){ return _enabled; }
void enabled(bool e){ _enabled = e; }
int descriptor(){ return _fd; }
int flags(){ return _flags; }
void flags( int f ){ _flags = f; }
int state(){ return _state; }
void* data(){ return _data; }
void data(void* d){ _data = d; }
Slot<void, EepleWatch&> ready;
private:
bool _enabled;
int _fd;
int _flags;
int _state;
void* _data;
EepleMainLoop* _disp;
friend class EepleMainLoop;
};
typedef std::list< EepleWatch* > Watches;
class EepleMainLoop
{
public:
EepleMainLoop();
virtual ~EepleMainLoop();
virtual void dispatch();
private:
Timeouts _timeouts;
Watches _watches;
friend class EepleTimeout;
friend class EepleWatch;
};
/* the classes below are those you are going to implement if you
* want to use another event loop (Qt, Glib, boost, whatever).
*
* Don't forget to set 'default_dispatcher' accordingly!
*/
class BusDispatcher;
class BusTimeout : public Timeout, public EepleTimeout
{
BusTimeout( Timeout::Internal*, BusDispatcher* );
void toggle();
friend class BusDispatcher;
};
class BusWatch : public Watch, public EepleWatch
{
BusWatch( Watch::Internal*, BusDispatcher* );
void toggle();
friend class BusDispatcher;
};
class BusDispatcher : public Dispatcher, public EepleMainLoop
{
public:
BusDispatcher() : _running(false)
{}
~BusDispatcher()
{}
virtual void enter();
virtual void leave();
virtual void do_iteration();
virtual Timeout* add_timeout( Timeout::Internal* );
virtual void rem_timeout( Timeout* );
virtual Watch* add_watch( Watch::Internal* );
virtual void rem_watch( Watch* );
void watch_ready( EepleWatch& );
void timeout_expired( EepleTimeout& );
private:
bool _running;
};
} /* namespace DBus */
#endif//__DBUSXX_EVENTLOOP_H

View file

@ -0,0 +1,152 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_INTERFACE_H
#define __DBUSXX_INTERFACE_H
#include <string>
#include <map>
#include "util.h"
#include "message.h"
namespace DBus {
class Interface;
class IfaceTracker;
typedef std::map<std::string, Interface*> InterfaceTable;
class Object;
class CallMessage;
class SignalMessage;
class IntrospectedInterface;
class IfaceTracker
{
public:
virtual const Object* object() const = 0 ;
protected:
InterfaceTable _interfaces;
virtual ~IfaceTracker()
{}
virtual void remit_signal( SignalMessage& )
{}
virtual Message rinvoke_method( CallMessage& );
};
typedef std::map< std::string, Slot<Message, const CallMessage&> > MethodTable;
typedef std::map< std::string, Slot<void, const SignalMessage&> > SignalTable;
class Interface : public virtual IfaceTracker
{
public:
Interface( const char* name );
virtual ~Interface();
inline const std::string& iname() const;
virtual Message invoke_method( const CallMessage& );
virtual bool dispatch_signal( const SignalMessage& );
virtual IntrospectedInterface* const introspect() const
{
return NULL;
}
private:
void register_interface( const char* name );
private:
std::string _name;
};
/*
*/
const std::string& Interface::iname() const
{
return _name;
}
/*
*/
class InterfaceAdaptor : public Interface
{
public:
InterfaceAdaptor( const char* name );
Message invoke_method( const CallMessage& );
void emit_signal( const SignalMessage& );
protected:
MethodTable _methods;
};
/*
*/
class InterfaceProxy : public Interface
{
public:
InterfaceProxy( const char* name );
Message invoke_method( const CallMessage& );
bool dispatch_signal( const SignalMessage& );
protected:
SignalTable _signals;
};
# define register_method(interface, method, callback) \
InterfaceAdaptor::_methods[ #method ] = \
new DBus::Callback< interface, DBus::Message, const DBus::CallMessage& >(this, & interface :: callback );
# define connect_signal(interface, signal) \
InterfaceProxy::_signals[ #signal ] = \
new DBus::Callback< interface, void, const DBus::SignalMessage& >(this, & interface :: method );
} /* namespace DBus */
#endif//__DBUSXX_INTERFACE_H

View file

@ -0,0 +1,76 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_INTROSPECTION_H
#define __DBUSXX_INTROSPECTION_H
#include "interface.h"
namespace DBus {
struct IntrospectedArgument
{
const char* name;
const char* type;
const bool in;
};
struct IntrospectedMethod
{
const char* name;
const IntrospectedArgument* args;
};
struct IntrospectedInterface
{
const char* name;
const IntrospectedMethod* methods;
const IntrospectedMethod* signals;
};
class IntrospectableAdaptor : public InterfaceAdaptor
{
public:
IntrospectableAdaptor();
Message Introspect( const CallMessage& );
protected:
IntrospectedInterface* const introspect() const;
};
class IntrospectableProxy : public InterfaceProxy
{
public:
IntrospectableProxy();
std::string Introspect();
};
} /* namespace DBus */
#endif//__DBUSXX_INTROSPECTION_H

305
include/dbus-c++/message.h Normal file
View file

@ -0,0 +1,305 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_MESSAGE_H
#define __DBUSXX_MESSAGE_H
#include <string>
#include <map>
#include "util.h"
namespace DBus {
class Message;
class ErrorMessage;
class SignalMessage;
class ReturnMessage;
class Error;
class Connection;
class MessageIter
{
public:
MessageIter() {}
int type();
bool at_end();
bool has_next();
MessageIter& operator ++();
MessageIter operator ++(int);
bool append_byte( unsigned char byte );
unsigned char get_byte();
bool append_bool( bool b );
bool get_bool();
bool append_int16( signed short i );
signed short get_int16();
bool append_uint16( unsigned short u );
unsigned short get_uint16();
bool append_int32( signed int i );
signed int get_int32();
bool append_uint32( unsigned int u );
unsigned int get_uint32();
bool append_int64( signed long long i );
signed long long get_int64();
bool append_uint64( unsigned long long i );
unsigned long long get_uint64();
bool append_double( double d );
double get_double();
bool append_string( const char* chars );
const char* get_string();
bool append_path( const char* chars );
const char* get_path();
bool append_signature( const char* chars );
const char* get_signature();
char* signature() const; //returned string must be manually free()'d
MessageIter recurse();
bool append_array( char type, const void* ptr, size_t length );
int array_type();
int get_array( void* ptr );
MessageIter new_array( const char* sig );
bool is_array();
int array_length();
MessageIter new_dict_entry();
bool is_dict();
MessageIter new_variant( const char* sig );
MessageIter new_struct( const char* sig );
void close_container( MessageIter& container );
Message& msg() const
{
return *_msg;
}
private:
MessageIter(Message& msg) : _msg(&msg) {}
bool append_basic( int type_id, void* value );
void get_basic( int type_id, void* ptr );
private:
/* I'm sorry, but don't want to include dbus.h in the public api
*/
unsigned char _iter[sizeof(void*)*3+sizeof(int)*11];
Message* _msg;
friend class Message;
};
class Message
{
public:
struct Private;
Message( Private* );
Message( const Message& m );
~Message();
Message copy();
int type() const;
int serial() const;
int reply_serial() const;
bool reply_serial( int );
const char* sender() const;
bool sender( const char* s );
const char* destination() const;
bool destination( const char* s );
bool is_error() const;
bool is_signal( const char* interface, const char* member ) const;
MessageIter r_iter() const;
MessageIter w_iter();
bool append( int first_type, ... );
void terminate();
protected:
Message();
protected:
RefPtrI<Private> _pvt;
/* classes who need to read `_pvt` directly
*/
friend class ErrorMessage;
friend class ReturnMessage;
friend class MessageIter;
friend class Error;
friend class Connection;
};
/*
*/
class ErrorMessage : public Message
{
public:
ErrorMessage();
ErrorMessage( const Message&, const char* name, const char* message );
const char* name() const;
bool name( const char* n );
bool operator == ( const ErrorMessage& ) const;
};
/*
*/
class SignalMessage : public Message
{
public:
SignalMessage( const char* name );
SignalMessage( const char* path, const char* interface, const char* name );
const char* interface() const;
bool interface( const char* i );
const char* member() const;
bool member( const char* m );
const char* path() const;
char** path_split() const;
bool path( const char* p );
bool operator == ( const SignalMessage& ) const;
};
/*
*/
class CallMessage : public Message
{
public:
CallMessage();
CallMessage( const char* dest, const char* path, const char* iface, const char* method );
const char* interface() const;
bool interface( const char* i );
const char* member() const;
bool member( const char* m );
const char* path() const;
char** path_split() const;
bool path( const char* p );
const char* signature() const;
bool operator == ( const CallMessage& ) const;
};
/*
*/
class ReturnMessage : public Message
{
public:
ReturnMessage( const CallMessage& callee );
const char* signature() const;
};
} /* namespace DBus */
#endif//__DBUSXX_MESSAGE_H

199
include/dbus-c++/object.h Normal file
View file

@ -0,0 +1,199 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_OBJECT_H
#define __DBUSXX_OBJECT_H
#include <string>
#include <list>
#include <map>
#include "interface.h"
#include "connection.h"
#include "message.h"
#include "types.h"
namespace DBus {
class Object;
typedef std::list<Object*> ObjectPList;
class ObjectAdaptor;
class ObjectProxy;
class Object : protected virtual IfaceTracker
{
protected:
Object( Connection& conn, const char* path, const char* service );
public:
virtual ~Object();
inline const DBus::Path& path() const;
inline const std::string& service() const;
inline const Object* object() const;
inline Connection& conn();
private:
//Object( const Object& );
virtual bool handle_message( const Message& ) = 0;
virtual void register_obj() = 0;
virtual void unregister_obj() = 0;
private:
Connection _conn;
DBus::Path _path;
std::string _service;
};
/*
*/
const Object* Object::object() const
{
return this;
}
Connection& Object::conn()
{
return _conn;
}
const DBus::Path& Object::path() const
{
return _path;
}
const std::string& Object::service() const
{
return _service;
}
/*
*/
class ObjectAdaptor : public Object
{
public:
struct Private;
ObjectAdaptor( Connection& conn, const char* path );
~ObjectAdaptor();
void remit_signal( SignalMessage& );
protected:
class DeferredReturn
{
public:
inline MessageIter& writer();
inline void* tag();
private:
DeferredReturn( Connection& conn, const CallMessage& call, const void* tag );
Connection _conn;
CallMessage _call;
MessageIter _writer;
ReturnMessage _return;
const void* _tag;
friend class ObjectAdaptor;
};
void return_later( const void* tag );
void return_now( DeferredReturn* ret );
void return_error( DeferredReturn* ret, Error& error );
DeferredReturn* find_return( const void* tag );
private:
bool handle_message( const Message& );
void register_obj();
void unregister_obj();
typedef std::map<const void*, DeferredReturn*> DeferredReturnMap;
DeferredReturnMap _deferred_returns;
friend struct Private;
};
void* ObjectAdaptor::DeferredReturn::tag()
{
return const_cast<void*>(_tag);
}
MessageIter& ObjectAdaptor::DeferredReturn::writer()
{
return _writer;
}
/*
*/
class ObjectProxy : public Object
{
public:
ObjectProxy( Connection& conn, const char* path, const char* service = "" );
~ObjectProxy();
Message rinvoke_method( CallMessage& );
private:
bool handle_message( const Message& );
void register_obj();
void unregister_obj();
private:
MessageSlot _filtered;
};
} /* namespace DBus */
#endif//__DBUSXX_OBJECT_H

View file

@ -0,0 +1,70 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_PENDING_CALL_H
#define __DBUSXX_PENDING_CALL_H
#include "util.h"
namespace DBus {
class Connection;
class PendingCall
{
public:
struct Private;
PendingCall( Private* );
virtual ~PendingCall();
bool completed();
void cancel();
void block();
void data( void* );
void* data();
Slot<void, PendingCall&> slot;
private:
PendingCall( const PendingCall& );
private:
RefPtrI<Private> _pvt;
friend struct Private;
friend class Connection;
};
} /* namespace DBus */
#endif//__DBUSXX_PENDING_CALL_H

View file

@ -0,0 +1,45 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_REFPTR_IMPL_H
#define __DBUSXX_REFPTR_IMPL_H
#include "util.h"
namespace DBus {
template <class T>
RefPtrI<T>::RefPtrI( T* ptr )
: __ptr(ptr)
{}
template <class T>
RefPtrI<T>::~RefPtrI()
{
if(__cnt.one()) delete __ptr;
}
} /* namespace DBus */
#endif//__DBUSXX_REFPTR_IMPL_H

72
include/dbus-c++/server.h Normal file
View file

@ -0,0 +1,72 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_SERVER_H
#define __DBUSXX_SERVER_H
#include <list>
#include "error.h"
#include "connection.h"
#include "util.h"
#include "dispatcher.h"
namespace DBus {
class Server;
typedef std::list<Server> ServerList;
class Server
{
public:
Server( const char* address );
Server( const Server& s );
Dispatcher* setup( Dispatcher* );
virtual ~Server();
bool operator == ( const Server& ) const;
bool listening() const;
void disconnect();
struct Private;
protected:
virtual void on_new_connection( Connection& c ) = 0;
private:
RefPtrI<Private> _pvt;
};
} /* namespace DBus */
#endif//__DBUSXX_SERVER_H

484
include/dbus-c++/types.h Normal file
View file

@ -0,0 +1,484 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_TYPES_H
#define __DBUSXX_TYPES_H
#include <string>
#include <vector>
#include <map>
#include "util.h"
#include "message.h"
#include "error.h"
namespace DBus {
typedef unsigned char Byte;
typedef bool Bool;
typedef signed short Int16;
typedef unsigned short UInt16;
typedef signed int Int32;
typedef unsigned int UInt32;
typedef signed long long Int64;
typedef unsigned long long UInt64;
typedef double Double;
typedef std::string String;
struct Path : public std::string
{
Path() {}
Path( const char* c ) : std::string(c) {}
Path& operator = ( std::string& s )
{
std::string::operator = (s);
return *this;
}
};
struct Signature : public std::string
{
Signature() {}
Signature( const char* c ) : std::string(c) {}
Signature& operator = ( std::string& s )
{
std::string::operator = (s);
return *this;
}
};
struct Invalid {};
class Variant
{
public:
Variant();
Variant( MessageIter& it );
Variant& operator = ( const Variant& v );
const char* signature() const;
MessageIter iter() const
{
return _it;
}
private:
Message _msg;
MessageIter _it;
mutable Signature _signature;
};
template <typename E>
struct Array : public std::vector<E> {};
template <typename K, typename V>
struct Dict : public std::map<K, V>
{
bool has_key( const K& key ) const
{
return this->find(key) != this->end();
}
};
template <
typename T1,
typename T2 = Invalid,
typename T3 = Invalid,
typename T4 = Invalid,
typename T5 = Invalid,
typename T6 = Invalid,
typename T7 = Invalid,
typename T8 = Invalid // who needs more than eight?
>
struct Struct
{
T1 _1; T2 _2; T3 _3; T4 _4; T5 _5; T6 _6; T7 _7; T8 _8;
};
template <typename T>
struct type
{
static std::string sig()
{
throw ErrorInvalidArgs("unknown type");
return "";
}
};
template <> struct type<Byte> { static std::string sig(){ return "y"; } };
template <> struct type<Bool> { static std::string sig(){ return "b"; } };
template <> struct type<Int16> { static std::string sig(){ return "n"; } };
template <> struct type<UInt16> { static std::string sig(){ return "q"; } };
template <> struct type<Int32> { static std::string sig(){ return "i"; } };
template <> struct type<UInt32> { static std::string sig(){ return "u"; } };
template <> struct type<Int64> { static std::string sig(){ return "x"; } };
template <> struct type<UInt64> { static std::string sig(){ return "t"; } };
template <> struct type<Double> { static std::string sig(){ return "d"; } };
template <> struct type<String> { static std::string sig(){ return "s"; } };
template <> struct type<Path> { static std::string sig(){ return "o"; } };
template <> struct type<Signature> { static std::string sig(){ return "g"; } };
template <> struct type<Invalid> { static std::string sig(){ return ""; } };
template <typename E>
struct type< std::vector<E> >
{ static std::string sig(){ return "a" + type<E>::sig(); } };
template <typename K, typename V>
struct type< std::map<K,V> >
{ static std::string sig(){ return "a{" + type<K>::sig() + type<V>::sig() + "}"; } };
template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8 // who needs more than eight?
>
struct type< Struct<T1,T2,T3,T4,T5,T6,T7,T8> >
{
static std::string sig()
{
return "("
+ type<T1>::sig()
+ type<T2>::sig()
+ type<T3>::sig()
+ type<T4>::sig()
+ type<T5>::sig()
+ type<T6>::sig()
+ type<T7>::sig()
+ type<T8>::sig()
+ ")";
}
};
} /* namespace DBus */
inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::Invalid& )
{
return iter;
}
inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::Byte& val )
{
iter.append_byte(val);
return iter;
}
inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::Bool& val )
{
iter.append_bool(val);
return iter;
}
inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::Int16& val )
{
iter.append_int16(val);
return iter;
}
inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::UInt16& val )
{
iter.append_uint16(val);
return iter;
}
inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::Int32& val )
{
iter.append_int32(val);
return iter;
}
inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::UInt32& val )
{
iter.append_uint32(val);
return iter;
}
inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::Int64& val )
{
iter.append_int64(val);
return iter;
}
inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::UInt64& val )
{
iter.append_uint64(val);
return iter;
}
inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::Double& val )
{
iter.append_double(val);
return iter;
}
inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::String& val )
{
iter.append_string(val.c_str());
return iter;
}
inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::Path& val )
{
iter.append_path(val.c_str());
return iter;
}
inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::Signature& val )
{
iter.append_signature(val.c_str());
return iter;
}
template<typename E>
inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const std::vector<E>& val )
{
const std::string sig = DBus::type<E>::sig();
DBus::MessageIter ait = iter.new_array(sig.c_str());
typename std::vector<E>::const_iterator vit;
for(vit = val.begin(); vit != val.end(); ++vit)
{
ait << *vit;
}
iter.close_container(ait);
return iter;
}
template<>
inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const std::vector<DBus::Byte>& val )
{
iter.append_array('b', &val.front(), val.size());
return iter;
}
template<typename K, typename V>
inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const std::map<K,V>& val )
{
const std::string sig = DBus::type<K>::sig() + DBus::type<V>::sig();
DBus::MessageIter ait = iter.new_array(sig.c_str());
typename std::map<K,V>::const_iterator mit;
for(mit = val.begin(); mit != val.end(); ++mit)
{
DBus::MessageIter eit = ait.new_dict_entry();
eit << mit->first << mit->second;
ait.close_container(eit);
}
iter.close_container(ait);
return iter;
}
template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8
>
inline DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::Struct<T1,T2,T3,T4,T5,T6,T7,T8>& val )
{
const std::string sig =
DBus::type<T1>::sig() + DBus::type<T2>::sig() + DBus::type<T3>::sig() + DBus::type<T4>::sig() +
DBus::type<T5>::sig() + DBus::type<T6>::sig() + DBus::type<T7>::sig() + DBus::type<T8>::sig();
DBus::MessageIter sit = iter.new_struct(sig.c_str());
sit << val._1 << val._2 << val._3 << val._4 << val._5 << val._6 << val._7 << val._8;
iter.close_container(sit);
return iter;
}
DBus::MessageIter& operator << ( DBus::MessageIter& iter, const DBus::Variant& val );
/*
*/
inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::Invalid& )
{
return iter;
}
inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::Byte& val )
{
val = iter.get_byte();
return ++iter;
}
inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::Bool& val )
{
val = iter.get_bool();
return ++iter;
}
inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::Int16& val )
{
val = iter.get_int16();
return ++iter;
}
inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::UInt16& val )
{
val = iter.get_uint16();
return ++iter;
}
inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::Int32& val )
{
val = iter.get_int32();
return ++iter;
}
inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::UInt32& val )
{
val = iter.get_uint32();
return ++iter;
}
inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::Int64& val )
{
val = iter.get_int64();
return ++iter;
}
inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::UInt64& val )
{
val = iter.get_uint64();
return ++iter;
}
inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::Double& val )
{
val = iter.get_double();
return ++iter;
}
inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::String& val )
{
val = iter.get_string();
return ++iter;
}
template<typename E>
inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, std::vector<E>& val )
{
if(!iter.is_array())
throw DBus::ErrorInvalidArgs("array expected");
DBus::MessageIter ait = iter.recurse();
while(!ait.at_end())
{
E elem;
ait >> elem;
val.push_back(elem);
++ait;
}
return ++iter;
}
template<>
inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, std::vector<DBus::Byte>& val )
{
if(!iter.is_array())
throw DBus::ErrorInvalidArgs("array expected");
if(iter.array_type() != 'b')
throw DBus::ErrorInvalidArgs("byte-array expected");
val.reserve(iter.array_length());
iter.get_array(const_cast<DBus::Byte*>(&val.front()));
return ++iter;
}
template<typename K, typename V>
inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, std::map<K,V>& val )
{
if(!iter.is_dict())
throw DBus::ErrorInvalidArgs("dictionary value expected");
DBus::MessageIter mit = iter.recurse();
while(!mit.at_end())
{
K key; V value;
DBus::MessageIter eit = mit.recurse();
eit >> key >> value;
val[key] = value;
++mit;
}
return ++iter;
}
template <
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8
>
inline DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::Struct<T1,T2,T3,T4,T5,T6,T7,T8>& val)
{
DBus::MessageIter sit = iter.recurse();
sit >> val._1 >> val._2 >> val._3 >> val._4 >> val._5 >> val._6 >> val._7 >> val._8;
return iter;
}
DBus::MessageIter& operator >> ( DBus::MessageIter& iter, DBus::Variant& val );
#endif//__DBUSXX_TYPES_H

272
include/dbus-c++/util.h Normal file
View file

@ -0,0 +1,272 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_UTIL_H
#define __DBUSXX_UTIL_H
#include "debug.h"
namespace DBus {
/*
* Very simple reference counting
*/
class RefCnt
{
public:
RefCnt()
{
__ref = new int;
(*__ref) = 1;
}
RefCnt( const RefCnt& rc )
{
__ref = rc.__ref;
ref();
}
virtual ~RefCnt()
{
unref();
}
RefCnt& operator = ( const RefCnt& ref )
{
ref.ref();
unref();
__ref = ref.__ref;
return *this;
}
bool noref() const
{
return (*__ref) == 0;
}
bool one() const
{
return (*__ref) == 1;
}
private:
void ref() const
{
++ (*__ref);
}
void unref() const
{
-- (*__ref);
if( (*__ref) < 0 )
{
debug_log("%p: refcount dropped below zero!", __ref);
}
if( noref() )
{
delete __ref;
}
}
private:
int *__ref;
};
/*
* Reference counting pointers (emulate boost::shared_ptr)
*/
template <class T>
class RefPtrI // RefPtr to incomplete type
{
public:
RefPtrI( T* ptr = 0 );
~RefPtrI();
RefPtrI& operator = ( const RefPtrI& ref )
{
if( this != &ref )
{
if(__cnt.one()) delete __ptr;
__ptr = ref.__ptr;
__cnt = ref.__cnt;
}
return *this;
}
T& operator *() const
{
return *__ptr;
}
T* operator ->() const
{
if(__cnt.noref()) return 0;
return __ptr;
}
T* get() const
{
if(__cnt.noref()) return 0;
return __ptr;
}
private:
T* __ptr;
RefCnt __cnt;
};
template <class T>
class RefPtr
{
public:
RefPtr( T* ptr = 0)
: __ptr(ptr)
{}
~RefPtr()
{
if(__cnt.one()) delete __ptr;
}
RefPtr& operator = ( const RefPtr& ref )
{
if( this != &ref )
{
if(__cnt.one()) delete __ptr;
__ptr = ref.__ptr;
__cnt = ref.__cnt;
}
return *this;
}
T& operator *() const
{
return *__ptr;
}
T* operator ->() const
{
if(__cnt.noref()) return 0;
return __ptr;
}
T* get() const
{
if(__cnt.noref()) return 0;
return __ptr;
}
private:
T* __ptr;
RefCnt __cnt;
};
/*
* Typed callback template
*/
template <class R, class P>
class Callback_Base
{
public:
virtual R call( P param ) const = 0;
virtual ~Callback_Base()
{}
};
template <class R, class P>
class Slot
{
public:
Slot& operator = ( Callback_Base<R,P>* s )
{
_cb = s;
return *this;
}
R operator()( P param ) const
{
/*if(_cb.get())*/ return _cb->call(param);
}
R call( P param ) const
{
/*if(_cb.get())*/ return _cb->call(param);
}
bool empty()
{
return _cb.get() != 0;
}
private:
RefPtr< Callback_Base<R,P> > _cb;
};
template <class C, class R, class P>
class Callback : public Callback_Base<R,P>
{
public:
typedef R (C::*M)(P);
Callback( C* c, M m )
: _c(c), _m(m)
{}
R call( P param ) const
{
/*if(_c)*/ return (_c->*_m)(param);
}
private:
C* _c; M _m;
};
} /* namespace DBus */
#endif//__DBUSXX_UTIL_H

138
include/dbus-c++/xml.h Normal file
View file

@ -0,0 +1,138 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_XML_H
#define __DBUSXX_XML_H
#include <exception>
#include <string>
#include <vector>
#include <map>
#include <iostream>
#include <sstream>
namespace DBus {
namespace Xml {
class Error : public std::exception
{
public:
Error( const char* error, int line, int column );
~Error() throw()
{}
const char* what() const throw()
{
return _error.c_str();
}
private:
std::string _error;
};
class Node;
class Nodes : public std::vector<Node*>
{
public:
Nodes operator[]( const std::string& key );
Nodes select( const std::string& attr, const std::string& value );
};
class Node
{
public:
typedef std::map<std::string, std::string> Attributes;
typedef std::vector<Node> Children;
std::string name;
std::string cdata;
Children children;
Node( std::string& n, Attributes& a )
: name(n), _attrs(a)
{}
Node( const char* n, const char** a = NULL );
Nodes operator[]( const std::string& key );
std::string get( const std::string& attribute );
void set( const std::string& attribute, std::string value );
std::string to_xml() const;
Node& add( Node child )
{
children.push_back(child);
return children.back();
}
private:
void _raw_xml( std::string& xml, int& depth ) const;
Attributes _attrs;
};
class Document
{
public:
struct Expat;
Node* root;
Document();
Document( const std::string& xml );
~Document();
void from_xml( const std::string& xml );
std::string to_xml() const;
private:
int _depth;
};
} /* namespace Xml */
} /* namespace DBus */
std::istream& operator >> ( std::istream&, DBus::Xml::Document& );
std::ostream& operator << ( std::ostream&, DBus::Xml::Document& );
#endif//__DBUSXX_XML_H

323
install-sh Executable file
View file

@ -0,0 +1,323 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2005-05-14.22
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
chmodcmd="$chmodprog 0755"
chowncmd=
chgrpcmd=
stripcmd=
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=
dst=
dir_arg=
dstarg=
no_target_directory=
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
-c (ignored)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
--help display this help and exit.
--version display version info and exit.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
"
while test -n "$1"; do
case $1 in
-c) shift
continue;;
-d) dir_arg=true
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
--help) echo "$usage"; exit $?;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t) dstarg=$2
shift
shift
continue;;
-T) no_target_directory=true
shift
continue;;
--version) echo "$0 $scriptversion"; exit $?;;
*) # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
test -n "$dir_arg$dstarg" && break
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dstarg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dstarg"
shift # fnord
fi
shift # arg
dstarg=$arg
done
break;;
esac
done
if test -z "$1"; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src ;;
esac
if test -n "$dir_arg"; then
dst=$src
src=
if test -d "$dst"; then
mkdircmd=:
chmodcmd=
else
mkdircmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dstarg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dstarg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst ;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dstarg: Is a directory" >&2
exit 1
fi
dst=$dst/`basename "$src"`
fi
fi
# This sed command emulates the dirname command.
dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# Skip lots of stat calls in the usual case.
if test ! -d "$dstdir"; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
shift
IFS=$oIFS
pathcomp=
while test $# -ne 0 ; do
pathcomp=$pathcomp$1
shift
if test ! -d "$pathcomp"; then
$mkdirprog "$pathcomp"
# mkdir can fail with a `File exist' error in case several
# install-sh are creating the directory concurrently. This
# is OK.
test -d "$pathcomp" || exit
fi
pathcomp=$pathcomp/
done
fi
if test -n "$dir_arg"; then
$doit $mkdircmd "$dst" \
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
else
dstfile=`basename "$dst"`
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
trap '(exit $?); exit' 1 2 13 15
# Copy the file name to the temp name.
$doit $cpprog "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
# Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
|| {
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
if test -f "$dstdir/$dstfile"; then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|| {
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit 1
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
}
}
fi || { (exit 1); exit 1; }
done
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit 0
}
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

1
ltmain.sh Symbolic link
View file

@ -0,0 +1 @@
/usr/share/libtool/ltmain.sh

360
missing Executable file
View file

@ -0,0 +1,360 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2005-06-08.21
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
msg="missing on your system"
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
# Exit code 63 means version mismatch. This often happens
# when the user try to use an ancient version of a tool on
# a file that requires a minimum version. In this case we
# we should proceed has if the program had been absent, or
# if --run hadn't been passed.
if test $? = 63; then
run=:
msg="probably too old"
fi
;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to <bug-automake@gnu.org>."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit $?
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
esac
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
case "$1" in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
tar)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te)
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
# If the file does not exist, the user really needs makeinfo;
# let's fail without touching anything.
test -f $file || exit 1
touch $file
;;
tar)
shift
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

158
mkinstalldirs Executable file
View file

@ -0,0 +1,158 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
scriptversion=2005-06-29.22
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain.
#
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
errstatus=0
dirmode=
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to <bug-automake@gnu.org>."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
exit $?
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--version)
echo "$0 $scriptversion"
exit $?
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
;;
*)
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi
;;
esac
for file
do
case $file in
/*) pathcomp=/ ;;
*) pathcomp= ;;
esac
oIFS=$IFS
IFS=/
set fnord $file
shift
IFS=$oIFS
for d
do
test "x$d" = x && continue
pathcomp=$pathcomp$d
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp=$pathcomp/
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

4
src/.sconsign Normal file
View file

@ -0,0 +1,4 @@
}q(U message_p.hq(cSCons.Node.FS
BuildInfo
qoq}q(U timestampqJ:ÓDUcsigqU 11d6821bf1a2fc6e208ddb951799f04cqubUdispatcher_p.hq (hoq
}q (hJ :ÓDhU b6bc4f718a90563d8d43e7cab48adb14q ubUconnection_p.hq (hoq}q(hJ:ÓDhU bd0a6f3028a08ea4b19de2336b0b08b1qubUpendingcall_p.hq(hoq}q(hJü9ÓDhU a32b3cffedb99c253266da39949d52e2qubu.

30
src/Makefile.am Normal file
View file

@ -0,0 +1,30 @@
INCLUDES = $(dbus_CFLAGS) $(xml_CFLAGS) -I$(top_srcdir)/include
AM_CPPFLAGS = -DDBUS_API_SUBJECT_TO_CHANGE
HEADER_DIR = $(top_srcdir)/include/dbus-c++
HEADER_FILES = \
$(HEADER_DIR)/config.h \
$(HEADER_DIR)/dbus-c++.h \
$(HEADER_DIR)/types.h \
$(HEADER_DIR)/connection.h \
$(HEADER_DIR)/debug.h \
$(HEADER_DIR)/error.h \
$(HEADER_DIR)/interface.h \
$(HEADER_DIR)/message.h \
$(HEADER_DIR)/dispatcher.h \
$(HEADER_DIR)/eventloop.h \
$(HEADER_DIR)/object.h \
$(HEADER_DIR)/pendingcall.h \
$(HEADER_DIR)/server.h \
$(HEADER_DIR)/debug.h \
$(HEADER_DIR)/util.h \
$(HEADER_DIR)/refptr_impl.h \
$(HEADER_DIR)/xml.h \
$(HEADER_DIR)/introspection.h
lib_includedir=$(includedir)/dbus-c++-0.3/dbus-c++
lib_include_HEADERS = $(HEADER_FILES)
lib_LTLIBRARIES = libdbus-c++-0.3.la
libdbus_c___0_3_la_SOURCES = $(HEADER_FILES) interface.cpp object.cpp introspection.cpp debug.cpp eventloop.cpp xml.cpp types.cpp connection.cpp connection_p.h dispatcher.cpp dispatcher_p.h pendingcall.cpp pendingcall_p.h error.cpp internalerror.h message.cpp message_p.h server.cpp server_p.h
libdbus_c___0_3_la_LIBADD = $(dbus_LIBS) $(xml_LIBS)

534
src/Makefile.in Normal file
View file

@ -0,0 +1,534 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src
DIST_COMMON = $(lib_include_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/dbus-c++/config.h
CONFIG_CLEAN_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(lib_includedir)"
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
am__DEPENDENCIES_1 =
libdbus_c___0_3_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
am__objects_1 =
am_libdbus_c___0_3_la_OBJECTS = $(am__objects_1) interface.lo \
object.lo introspection.lo debug.lo eventloop.lo xml.lo \
types.lo connection.lo dispatcher.lo pendingcall.lo error.lo \
message.lo server.lo
libdbus_c___0_3_la_OBJECTS = $(am_libdbus_c___0_3_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include/dbus-c++
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(libdbus_c___0_3_la_SOURCES)
DIST_SOURCES = $(libdbus_c___0_3_la_SOURCES)
lib_includeHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(lib_include_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBUS_DOXYGEN_DOCS_ENABLED_FALSE = @DBUS_DOXYGEN_DOCS_ENABLED_FALSE@
DBUS_DOXYGEN_DOCS_ENABLED_TRUE = @DBUS_DOXYGEN_DOCS_ENABLED_TRUE@
DEBUG_FLAGS = @DEBUG_FLAGS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DOXYGEN = @DOXYGEN@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
dbus_CFLAGS = @dbus_CFLAGS@
dbus_LIBS = @dbus_LIBS@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
xml_CFLAGS = @xml_CFLAGS@
xml_LIBS = @xml_LIBS@
INCLUDES = $(dbus_CFLAGS) $(xml_CFLAGS) -I$(top_srcdir)/include
AM_CPPFLAGS = -DDBUS_API_SUBJECT_TO_CHANGE
HEADER_DIR = $(top_srcdir)/include/dbus-c++
HEADER_FILES = \
$(HEADER_DIR)/config.h \
$(HEADER_DIR)/dbus-c++.h \
$(HEADER_DIR)/types.h \
$(HEADER_DIR)/connection.h \
$(HEADER_DIR)/debug.h \
$(HEADER_DIR)/error.h \
$(HEADER_DIR)/interface.h \
$(HEADER_DIR)/message.h \
$(HEADER_DIR)/dispatcher.h \
$(HEADER_DIR)/eventloop.h \
$(HEADER_DIR)/object.h \
$(HEADER_DIR)/pendingcall.h \
$(HEADER_DIR)/server.h \
$(HEADER_DIR)/debug.h \
$(HEADER_DIR)/util.h \
$(HEADER_DIR)/refptr_impl.h \
$(HEADER_DIR)/xml.h \
$(HEADER_DIR)/introspection.h
lib_includedir = $(includedir)/dbus-c++-0.3/dbus-c++
lib_include_HEADERS = $(HEADER_FILES)
lib_LTLIBRARIES = libdbus-c++-0.3.la
libdbus_c___0_3_la_SOURCES = $(HEADER_FILES) interface.cpp object.cpp introspection.cpp debug.cpp eventloop.cpp xml.cpp types.cpp connection.cpp connection_p.h dispatcher.cpp dispatcher_p.h pendingcall.cpp pendingcall_p.h error.cpp internalerror.h message.cpp message_p.h server.cpp server_p.h
libdbus_c___0_3_la_LIBADD = $(dbus_LIBS) $(xml_LIBS)
all: all-am
.SUFFIXES:
.SUFFIXES: .cpp .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
f=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
else :; fi; \
done
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
p=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
done
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libdbus-c++-0.3.la: $(libdbus_c___0_3_la_OBJECTS) $(libdbus_c___0_3_la_DEPENDENCIES)
$(CXXLINK) -rpath $(libdir) $(libdbus_c___0_3_la_LDFLAGS) $(libdbus_c___0_3_la_OBJECTS) $(libdbus_c___0_3_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connection.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dispatcher.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eventloop.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interface.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/introspection.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/message.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/object.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pendingcall.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/server.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/types.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml.Plo@am__quote@
.cpp.o:
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cpp.obj:
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.cpp.lo:
@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
install-lib_includeHEADERS: $(lib_include_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(lib_includedir)" || $(mkdir_p) "$(DESTDIR)$(lib_includedir)"
@list='$(lib_include_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(lib_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(lib_includedir)/$$f'"; \
$(lib_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(lib_includedir)/$$f"; \
done
uninstall-lib_includeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(lib_include_HEADERS)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(lib_includedir)/$$f'"; \
rm -f "$(DESTDIR)$(lib_includedir)/$$f"; \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(mkdir_p) $(distdir)/$(HEADER_DIR)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(lib_includedir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-lib_includeHEADERS
install-exec-am: install-libLTLIBRARIES
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \
uninstall-lib_includeHEADERS
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am \
install-libLTLIBRARIES install-lib_includeHEADERS install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-info-am uninstall-libLTLIBRARIES \
uninstall-lib_includeHEADERS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

360
src/connection.cpp Normal file
View file

@ -0,0 +1,360 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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
*
*/
#include <dbus-c++/debug.h>
#include <dbus-c++/connection.h>
#include <dbus/dbus.h>
#include <string>
#include "internalerror.h"
#include "connection_p.h"
#include "dispatcher_p.h"
#include "message_p.h"
#include "pendingcall_p.h"
using namespace DBus;
Connection::Private::Private( DBusConnection* c )
: conn(c) , dispatcher(0)
{
init();
}
Connection::Private::Private( DBusBusType type )
{
InternalError e;
conn = dbus_bus_get_private(type, e);
if(e) throw Error(e);
init();
}
Connection::Private::~Private()
{
if(dbus_connection_get_is_connected(conn))
{
std::vector<std::string>::iterator i = names.begin();
while(i != names.end())
{
debug_log("%s: releasing bus name %s", dbus_bus_get_unique_name(conn), i->c_str());
dbus_bus_release_name(conn, i->c_str(), NULL);
++i;
}
//dbus_connection_disconnect(conn);
}
dbus_connection_unref(conn);
}
void Connection::Private::init()
{
dbus_connection_ref(conn);
disconn_filter = new Callback<Connection::Private, bool, const Message&>(
this, &Connection::Private::disconn_filter_function
);
dbus_connection_add_filter(conn, message_filter_stub, &disconn_filter, NULL);
dbus_connection_set_dispatch_status_function(conn, dispatch_status_stub, this, 0);
dbus_connection_set_exit_on_disconnect(conn, false); //why was this set to true??
}
bool Connection::Private::do_dispatch()
{
debug_log("dispatching on %p", conn);
return dbus_connection_dispatch(conn) != DBUS_DISPATCH_DATA_REMAINS;
}
void Connection::Private::dispatch_status_stub( DBusConnection* dc, DBusDispatchStatus status, void* data )
{
Private* p = static_cast<Private*>(data);
switch(status)
{
case DBUS_DISPATCH_DATA_REMAINS:
debug_log("some dispatching to do on %p", dc);
p->dispatcher->queue_connection(p);
break;
case DBUS_DISPATCH_COMPLETE:
debug_log("all dispatching done on %p", dc);
break;
case DBUS_DISPATCH_NEED_MEMORY: //uh oh...
debug_log("connection %p needs memory", dc);
break;
}
}
DBusHandlerResult Connection::Private::message_filter_stub( DBusConnection*, DBusMessage* dmsg, void* data )
{
MessageSlot* slot = static_cast<MessageSlot*>(data);
Message msg = Message(new Message::Private(dmsg));
return slot && !slot->empty() && slot->call(msg)
? DBUS_HANDLER_RESULT_HANDLED
: DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
bool Connection::Private::disconn_filter_function( const Message& msg )
{
if(msg.is_signal(DBUS_INTERFACE_LOCAL,"Disconnected"))
{
debug_log("%p disconnected by local bus", conn);
dbus_connection_close(conn);
return true;
}
return false;
}
Connection Connection::SystemBus()
{
return Connection(new Private(DBUS_BUS_SYSTEM));
}
Connection Connection::SessionBus()
{
return Connection(new Private(DBUS_BUS_SESSION));
}
Connection Connection::ActivationBus()
{
return Connection(new Private(DBUS_BUS_STARTER));
}
Connection::Connection( const char* address, bool priv )
{
InternalError e;
DBusConnection* conn = priv
? dbus_connection_open_private(address, e)
: dbus_connection_open(address,e);
if(e) throw Error(e);
_pvt = new Private(conn);
setup(default_dispatcher);
debug_log("connected to %s", address);
}
Connection::Connection( Connection::Private* p )
: _pvt(p)
{
setup(default_dispatcher);
}
Connection::Connection( const Connection& c )
: _pvt(c._pvt)
{
dbus_connection_ref(_pvt->conn);
}
Connection::~Connection()
{
dbus_connection_unref(_pvt->conn);
}
Dispatcher* Connection::setup( Dispatcher* dispatcher )
{
debug_log("registering stubs for connection %p", _pvt->conn);
if(!dispatcher) dispatcher = default_dispatcher;
if(!dispatcher) throw ErrorFailed("no default dispatcher set for new connection");
Dispatcher* prev = _pvt->dispatcher;
_pvt->dispatcher = dispatcher;
dispatcher->queue_connection(_pvt.get());
dbus_connection_set_watch_functions(
_pvt->conn,
Dispatcher::Private::on_add_watch,
Dispatcher::Private::on_rem_watch,
Dispatcher::Private::on_toggle_watch,
dispatcher,
0
);
dbus_connection_set_timeout_functions(
_pvt->conn,
Dispatcher::Private::on_add_timeout,
Dispatcher::Private::on_rem_timeout,
Dispatcher::Private::on_toggle_timeout,
dispatcher,
0
);
return prev;
}
bool Connection::operator == ( const Connection& c ) const
{
return _pvt->conn == c._pvt->conn;
}
bool Connection::connected() const
{
return dbus_connection_get_is_connected(_pvt->conn);
}
void Connection::disconnect()
{
// dbus_connection_disconnect(_pvt->conn); // disappeared in 0.9x
dbus_connection_close(_pvt->conn);
}
bool Connection::unique_name( const char* n )
{
return dbus_bus_set_unique_name(_pvt->conn, n);
}
const char* Connection::unique_name() const
{
return dbus_bus_get_unique_name(_pvt->conn);
}
void Connection::flush()
{
dbus_connection_flush(_pvt->conn);
}
void Connection::add_match( const char* rule )
{
InternalError e;
dbus_bus_add_match(_pvt->conn, rule, e);
debug_log("%s: added match rule %s", unique_name(), rule);
if(e) throw Error(e);
}
void Connection::remove_match( const char* rule )
{
InternalError e;
dbus_bus_remove_match(_pvt->conn, rule, e);
debug_log("%s: removed match rule %s", unique_name(), rule);
if(e) throw Error(e);
}
bool Connection::add_filter( MessageSlot& s )
{
debug_log("%s: adding filter", unique_name());
return dbus_connection_add_filter(_pvt->conn, Private::message_filter_stub, &s, NULL);
}
void Connection::remove_filter( MessageSlot& s )
{
debug_log("%s: removing filter", unique_name());
dbus_connection_remove_filter(_pvt->conn, Private::message_filter_stub, &s);
}
bool Connection::send( const Message& msg, unsigned int* serial )
{
return dbus_connection_send(_pvt->conn, msg._pvt->msg, serial);
}
Message Connection::send_blocking( Message& msg, int timeout )
{
DBusMessage* reply;
InternalError e;
reply = dbus_connection_send_with_reply_and_block(_pvt->conn, msg._pvt->msg, timeout, e);
if(e) throw Error(e);
return Message(new Message::Private(reply));
}
PendingCall Connection::send_async( Message& msg, int timeout )
{
DBusPendingCall* pending;
if(!dbus_connection_send_with_reply(_pvt->conn, msg._pvt->msg, &pending, timeout))
{
throw Error(DBUS_ERROR_NO_MEMORY, "Unable to start asynchronous call");
}
return PendingCall(new PendingCall::Private(pending));
}
void Connection::request_name( const char* name, int flags )
{
InternalError e;
debug_log("%s: registering bus name %s", unique_name(), name);
dbus_bus_request_name(_pvt->conn, name, flags, e); //we deliberately don't check return value
if(e) throw Error(e);
// this->remove_match("destination");
if(name)
{
_pvt->names.push_back(name);
std::string match = "destination='" + _pvt->names.back() + "'";
add_match(match.c_str());
}
}
bool Connection::has_name( const char* name )
{
InternalError e;
bool b = dbus_bus_name_has_owner(_pvt->conn, name, e);
if(e) throw Error(e);
return b;
}
const std::vector<std::string>& Connection::names()
{
return _pvt->names;
}
bool Connection::start_service( const char* name, unsigned long flags )
{
InternalError e;
bool b = dbus_bus_start_service_by_name(_pvt->conn, name, flags, NULL, e);
if(e) throw Error(e);
return b;
}

65
src/connection_p.h Normal file
View file

@ -0,0 +1,65 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_CONNECTION_P_H
#define __DBUSXX_CONNECTION_P_H
#include <dbus-c++/connection.h>
#include <dbus-c++/dispatcher.h>
#include <dbus-c++/refptr_impl.h>
#include <dbus/dbus.h>
#include <string>
namespace DBus {
struct Connection::Private
{
DBusConnection* conn;
std::vector<std::string> names;
Dispatcher* dispatcher;
bool do_dispatch();
MessageSlot disconn_filter;
bool disconn_filter_function( const Message& );
Private( DBusConnection* );
Private( DBusBusType );
~Private();
void init();
static void dispatch_status_stub( DBusConnection*, DBusDispatchStatus, void* );
static DBusHandlerResult message_filter_stub( DBusConnection*, DBusMessage*, void* );
};
} /* namespace DBus */
#endif//__DBUSXX_CONNECTION_P_H

51
src/debug.cpp Normal file
View file

@ -0,0 +1,51 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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
*
*/
#include <dbus-c++/debug.h>
#include <stdarg.h>
#include <cstdio>
#include <stdlib.h>
static void _debug_log_default(const char* format, ...)
{
#ifdef DEBUG
if(getenv("DBUSXX_VERBOSE"))
{
va_list args;
va_start(args, format);
fprintf(stderr, "dbus-c++: ");
vfprintf(stderr, format, args);
fprintf(stderr, "\n");
va_end(args);
}
#endif//DEBUG
}
DBus::LogFunction DBus::debug_log = _debug_log_default;

206
src/dispatcher.cpp Normal file
View file

@ -0,0 +1,206 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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
*
*/
#include <dbus-c++/dispatcher.h>
#include <dbus/dbus.h>
#include "dispatcher_p.h"
#include "connection_p.h"
DBus::Dispatcher* DBus::default_dispatcher = NULL;
using namespace DBus;
Timeout::Timeout( Timeout::Internal* i )
: _int(i)
{
dbus_timeout_set_data((DBusTimeout*)i, this, NULL);
}
int Timeout::interval() const
{
return dbus_timeout_get_interval((DBusTimeout*)_int);
}
bool Timeout::enabled() const
{
return dbus_timeout_get_enabled((DBusTimeout*)_int);
}
bool Timeout::handle()
{
return dbus_timeout_handle((DBusTimeout*)_int);
}
/*
*/
Watch::Watch( Watch::Internal* i )
: _int(i)
{
dbus_watch_set_data((DBusWatch*)i, this, NULL);
}
int Watch::descriptor() const
{
return dbus_watch_get_fd((DBusWatch*)_int);
}
int Watch::flags() const
{
return dbus_watch_get_flags((DBusWatch*)_int);
}
bool Watch::enabled() const
{
return dbus_watch_get_enabled((DBusWatch*)_int);
}
bool Watch::handle( int flags )
{
return dbus_watch_handle((DBusWatch*)_int, flags);
}
/*
*/
dbus_bool_t Dispatcher::Private::on_add_watch( DBusWatch* watch, void* data )
{
Dispatcher* d = static_cast<Dispatcher*>(data);
Watch::Internal* w = reinterpret_cast<Watch::Internal*>(watch);
d->add_watch(w);
return true;
}
void Dispatcher::Private::on_rem_watch( DBusWatch* watch, void* data )
{
Dispatcher* d = static_cast<Dispatcher*>(data);
Watch* w = static_cast<Watch*>(dbus_watch_get_data(watch));
d->rem_watch(w);
}
void Dispatcher::Private::on_toggle_watch( DBusWatch* watch, void* data )
{
Watch* w = static_cast<Watch*>(dbus_watch_get_data(watch));
w->toggle();
}
dbus_bool_t Dispatcher::Private::on_add_timeout( DBusTimeout* timeout, void* data )
{
Dispatcher* d = static_cast<Dispatcher*>(data);
Timeout::Internal* t = reinterpret_cast<Timeout::Internal*>(timeout);
d->add_timeout(t);
return true;
}
void Dispatcher::Private::on_rem_timeout( DBusTimeout* timeout, void* data )
{
Dispatcher* d = static_cast<Dispatcher*>(data);
Timeout* t = static_cast<Timeout*>(dbus_timeout_get_data(timeout));
d->rem_timeout(t);
}
void Dispatcher::Private::on_toggle_timeout( DBusTimeout* timeout, void* data )
{
Timeout* t = static_cast<Timeout*>(dbus_timeout_get_data(timeout));
t->toggle();
}
void Dispatcher::queue_connection( Connection::Private* cp )
{
_pending_queue.push_back(cp);
}
void Dispatcher::dispatch_pending()
{
while(_pending_queue.size() > 0)
{
Connection::PrivatePList::iterator i, j;
i = _pending_queue.begin();
while(i != _pending_queue.end())
{
j = i;
++j;
if((*i)->do_dispatch())
_pending_queue.erase(i);
i = j;
}
}
}
void DBus::_init_threading(
MutexNewFn m1,
MutexFreeFn m2,
MutexLockFn m3,
MutexUnlockFn m4,
CondVarNewFn c1,
CondVarFreeFn c2,
CondVarWaitFn c3,
CondVarWaitTimeoutFn c4,
CondVarWakeOneFn c5,
CondVarWakeAllFn c6
)
{
DBusThreadFunctions functions = {
DBUS_THREAD_FUNCTIONS_MUTEX_NEW_MASK |
DBUS_THREAD_FUNCTIONS_MUTEX_FREE_MASK |
DBUS_THREAD_FUNCTIONS_MUTEX_LOCK_MASK |
DBUS_THREAD_FUNCTIONS_MUTEX_UNLOCK_MASK |
DBUS_THREAD_FUNCTIONS_CONDVAR_NEW_MASK |
DBUS_THREAD_FUNCTIONS_CONDVAR_FREE_MASK |
DBUS_THREAD_FUNCTIONS_CONDVAR_WAIT_MASK |
DBUS_THREAD_FUNCTIONS_CONDVAR_WAIT_TIMEOUT_MASK |
DBUS_THREAD_FUNCTIONS_CONDVAR_WAKE_ONE_MASK|
DBUS_THREAD_FUNCTIONS_CONDVAR_WAKE_ALL_MASK,
(DBusMutexNewFunction) m1,
(DBusMutexFreeFunction) m2,
(DBusMutexLockFunction) m3,
(DBusMutexUnlockFunction) m4,
(DBusCondVarNewFunction) c1,
(DBusCondVarFreeFunction) c2,
(DBusCondVarWaitFunction) c3,
(DBusCondVarWaitTimeoutFunction) c4,
(DBusCondVarWakeOneFunction) c5,
(DBusCondVarWakeAllFunction) c6
};
dbus_threads_init(&functions);
}

53
src/dispatcher_p.h Normal file
View file

@ -0,0 +1,53 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_DISPATCHER_P_H
#define __DBUSXX_DISPATCHER_P_H
#include <dbus-c++/dispatcher.h>
#include <dbus/dbus.h>
#include "internalerror.h"
namespace DBus {
struct Dispatcher::Private
{
static dbus_bool_t on_add_watch( DBusWatch* watch, void* data );
static void on_rem_watch( DBusWatch* watch, void* data );
static void on_toggle_watch( DBusWatch* watch, void* data );
static dbus_bool_t on_add_timeout( DBusTimeout* timeout, void* data );
static void on_rem_timeout( DBusTimeout* timeout, void* data );
static void on_toggle_timeout( DBusTimeout* timeout, void* data );
};
} /* namespace DBus */
#endif//__DBUSXX_DISPATCHER_P_H

82
src/error.cpp Normal file
View file

@ -0,0 +1,82 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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
*
*/
#include <dbus-c++/message.h>
#include <dbus-c++/error.h>
#include <dbus/dbus.h>
#include "message_p.h"
#include "internalerror.h"
using namespace DBus;
/*
*/
Error::Error()
: _int(new InternalError)
{}
Error::Error(InternalError& i)
: _int(new InternalError(i))
{}
Error::Error( const char* name, const char* message )
: _int(new InternalError)
{
set(name, message);
}
Error::Error( Message& m )
: _int(new InternalError)
{
dbus_set_error_from_message(&(_int->error), m._pvt->msg);
}
const char* Error::name()
{
return _int->error.name;
}
const char* Error::message()
{
return _int->error.message;
}
bool Error::is_set()
{
return *(_int);
}
void Error::set( const char* name, const char* message )
{
dbus_set_error_const(&(_int->error), name, message);
}
const char* Error::what() const throw()
{
return _int->error.message;
}

308
src/eventloop.cpp Normal file
View file

@ -0,0 +1,308 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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
*
*/
#include <dbus-c++/eventloop.h>
#include <dbus-c++/debug.h>
#include <sys/poll.h>
#include <sys/time.h>
#include <dbus/dbus.h>
using namespace DBus;
static double millis( timeval tv )
{
return (tv.tv_sec*1000.0 + tv.tv_usec/1000.0);
}
EepleTimeout::EepleTimeout( int interval, bool repeat, EepleMainLoop* ed )
: _enabled(true), _interval(interval), _repeat(repeat), _expiration(0), _data(0), _disp(ed)
{
timeval now;
gettimeofday(&now, NULL);
_expiration = millis(now) + interval;
_disp->_timeouts.push_back(this);
}
EepleTimeout::~EepleTimeout()
{
_disp->_timeouts.remove(this);
}
EepleWatch::EepleWatch( int fd, int flags, EepleMainLoop* ed )
: _enabled(true), _fd(fd), _flags(flags), _state(0), _data(0), _disp(ed)
{
_disp->_watches.push_back(this);
}
EepleWatch::~EepleWatch()
{
_disp->_watches.remove(this);
}
EepleMainLoop::EepleMainLoop()
{
}
EepleMainLoop::~EepleMainLoop()
{
Watches::iterator wi = _watches.begin();
while(wi != _watches.end())
{
Watches::iterator wmp = wi;
++wmp;
delete (*wi);
wi = wmp;
}
Timeouts::iterator ti = _timeouts.begin();
while(ti != _timeouts.end())
{
Timeouts::iterator tmp = ti;
++tmp;
delete (*ti);
ti = tmp;
}
}
void EepleMainLoop::dispatch()
{
int nfd = _watches.size();
pollfd fds[nfd];
Watches::iterator wi = _watches.begin();
for(nfd = 0; wi != _watches.end(); ++wi)
{
if((*wi)->enabled())
{
fds[nfd].fd = (*wi)->descriptor();
fds[nfd].events = (*wi)->flags();
fds[nfd].revents = 0;
++nfd;
}
}
int wait_min = 10000;
Timeouts::iterator ti = _timeouts.begin();
for(;ti != _timeouts.end(); ++ti)
{
if((*ti)->enabled() && (*ti)->interval() < wait_min)
wait_min = (*ti)->interval();
}
//int rfd = poll(fds, nfd, wait_min);
//if(rfd) debug_log("%d descriptors ready");
poll(fds, nfd, wait_min);
timeval now;
gettimeofday(&now, NULL);
double now_millis = millis(now);
ti = _timeouts.begin();
while(ti != _timeouts.end())
{
Timeouts::iterator tmp = ti;
++tmp;
if((*ti)->enabled() && now_millis >= (*ti)->_expiration)
{
(*ti)->expired(*(*ti));
if((*ti)->_repeat)
{
(*ti)->_expiration = now_millis + (*ti)->_interval;
}
}
ti = tmp;
}
for(int j = 0; j < nfd; ++j)
{
for(Watches::iterator wi = _watches.begin(); wi != _watches.end();)
{
Watches::iterator tmp = wi;
++tmp;
if((*wi)->enabled() && (*wi)->_fd == fds[j].fd)
{
if(fds[j].revents)
{
(*wi)->_state = fds[j].revents;
(*wi)->ready(*(*wi));
fds[j].revents = 0;
}
}
wi = tmp;
}
}
}
/*
*/
BusTimeout::BusTimeout( Timeout::Internal* ti, BusDispatcher* bd )
: Timeout(ti), EepleTimeout(Timeout::interval(), true, bd)
{
EepleTimeout::enabled(Timeout::enabled());
}
void BusTimeout::toggle()
{
debug_log("timeout %p toggled (%s)", this, Timeout::enabled() ? "on":"off");
EepleTimeout::enabled(Timeout::enabled());
}
BusWatch::BusWatch( Watch::Internal* wi, BusDispatcher* bd )
: Watch(wi), EepleWatch(Watch::descriptor(), 0, bd)
{
int flags = POLLHUP | POLLERR;
if(Watch::flags() & DBUS_WATCH_READABLE)
flags |= POLLIN;
if(Watch::flags() & DBUS_WATCH_WRITABLE)
flags |= POLLOUT;
EepleWatch::flags(flags);
EepleWatch::enabled(Watch::enabled());
}
void BusWatch::toggle()
{
debug_log("watch %p toggled (%s)", this, Watch::enabled() ? "on":"off");
EepleWatch::enabled(Watch::enabled());
}
void BusDispatcher::enter()
{
debug_log("entering dispatcher %p", this);
_running = true;
while(_running)
{
do_iteration();
}
debug_log("leaving dispatcher %p", this);
}
void BusDispatcher::leave()
{
_running = false;
}
void BusDispatcher::do_iteration()
{
dispatch_pending();
dispatch();
}
Timeout* BusDispatcher::add_timeout( Timeout::Internal* ti )
{
BusTimeout* bt = new BusTimeout(ti, this);
bt->expired = new Callback<BusDispatcher, void, EepleTimeout&>(this, &BusDispatcher::timeout_expired);
bt->data(bt);
debug_log("added timeout %p (%s)", bt, ((Timeout*)bt)->enabled() ? "on":"off");
return bt;
}
void BusDispatcher::rem_timeout( Timeout* t )
{
debug_log("removed timeout %p", t);
delete t;
}
Watch* BusDispatcher::add_watch( Watch::Internal* wi )
{
BusWatch* bw = new BusWatch(wi, this);
bw->ready = new Callback<BusDispatcher, void, EepleWatch&>(this, &BusDispatcher::watch_ready);
bw->data(bw);
debug_log("added watch %p (%s) fd=%d flags=%d",
bw, ((Watch*)bw)->enabled() ? "on":"off", ((Watch*)bw)->descriptor(), ((Watch*)bw)->flags()
);
return bw;
}
void BusDispatcher::rem_watch( Watch* w )
{
debug_log("removed watch %p", w);
delete w;
}
void BusDispatcher::timeout_expired( EepleTimeout& et )
{
debug_log("timeout %p expired", &et);
BusTimeout* timeout = reinterpret_cast<BusTimeout*>(et.data());
timeout->handle();
}
void BusDispatcher::watch_ready( EepleWatch& ew )
{
BusWatch* watch = reinterpret_cast<BusWatch*>(ew.data());
debug_log("watch %p ready, flags=%d state=%d",
watch, ((Watch*)watch)->flags(), watch->state()
);
int flags = 0;
if(watch->state() & POLLIN)
flags |= DBUS_WATCH_READABLE;
if(watch->state() & POLLOUT)
flags |= DBUS_WATCH_WRITABLE;
if(watch->state() & POLLHUP)
flags |= DBUS_WATCH_HANGUP;
if(watch->state() & POLLERR)
flags |= DBUS_WATCH_ERROR;
watch->handle(flags);
}

118
src/interface.cpp Normal file
View file

@ -0,0 +1,118 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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
*
*/
#include <dbus-c++/debug.h>
#include <dbus-c++/interface.h>
#include "internalerror.h"
using namespace DBus;
Message IfaceTracker::rinvoke_method( CallMessage& msg )
{
return ErrorMessage(msg, DBUS_ERROR_NOT_SUPPORTED, "there are no proxies in a InterfaceAdaptor");
}
Interface::Interface( const char* name )
: _name(name)
{
register_interface(name);
}
Interface::~Interface()
{
//unregister_interface(name); //not needed
}
Message Interface::invoke_method( const CallMessage& )
{
throw Error(DBUS_ERROR_NOT_SUPPORTED, "");
}
bool Interface::dispatch_signal( const SignalMessage& )
{
throw Error(DBUS_ERROR_NOT_SUPPORTED, "");
}
void Interface::register_interface( const char* name )
{
debug_log("registering interface %s",name);
_interfaces[name] = this;
}
InterfaceAdaptor::InterfaceAdaptor( const char* name )
: Interface(name)
{}
Message InterfaceAdaptor::invoke_method( const CallMessage& msg )
{
const char* name = msg.member();
MethodTable::iterator mi = _methods.find(name);
if( mi != _methods.end() )
{
return mi->second.call( msg );
}
else
{
return ErrorMessage(msg, DBUS_ERROR_UNKNOWN_METHOD, name);
}
}
void InterfaceAdaptor::emit_signal( const SignalMessage& sig )
{
SignalMessage& sig2 = const_cast<SignalMessage&>(sig);
sig2.interface( iname().c_str() );
remit_signal(sig2);
}
InterfaceProxy::InterfaceProxy( const char* name )
: Interface(name)
{}
bool InterfaceProxy::dispatch_signal( const SignalMessage& msg )
{
const char* name = msg.member();
SignalTable::iterator si = _signals.find(name);
if( si != _signals.end() )
{
si->second.call( msg );
return true;
}
else
{
return false;
}
}
Message InterfaceProxy::invoke_method( const CallMessage& call )
{
CallMessage& call2 = const_cast<CallMessage&>(call);
call2.interface( iname().c_str() );
return rinvoke_method(call2);
}

73
src/internalerror.h Normal file
View file

@ -0,0 +1,73 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_INTERNALERROR_H
#define __DBUSXX_INTERNALERROR_H
#include <dbus-c++/error.h>
#include <dbus/dbus.h>
namespace DBus {
struct InternalError
{
DBusError error;
InternalError()
{
dbus_error_init(&error);
}
explicit InternalError( DBusError* e )
{
dbus_error_init(&error);
dbus_move_error(e, &error);
}
InternalError(const InternalError& ie)
{
dbus_error_init(&error);
dbus_move_error(const_cast<DBusError*>(&(ie.error)), &error);
}
~InternalError()
{
dbus_error_free(&error);
}
operator DBusError*()
{
return &error;
}
operator bool()
{
return dbus_error_is_set(&error);
}
};
} /* namespace DBus */
#endif//__DBUSXX_INTERNALERROR_H

134
src/introspection.cpp Normal file
View file

@ -0,0 +1,134 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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
*
*/
#include <dbus-c++/introspection.h>
#include <dbus-c++/message.h>
#include <dbus-c++/xml.h>
#include <dbus/dbus.h>
using namespace DBus;
static const char* introspectable_name = "org.freedesktop.DBus.Introspectable";
IntrospectableAdaptor::IntrospectableAdaptor()
: InterfaceAdaptor(introspectable_name)
{
register_method(IntrospectableAdaptor, Introspect, Introspect);
}
Message IntrospectableAdaptor::Introspect( const CallMessage& call )
{
debug_log("requested introspection data");
Xml::Node iroot("node");
InterfaceTable::const_iterator iti;
for(iti = _interfaces.begin(); iti != _interfaces.end(); ++iti)
{
debug_log("introspecting interface %s", iti->first.c_str());
IntrospectedInterface* const intro = iti->second->introspect();
if(intro)
{
Xml::Node& iface = iroot.add(Xml::Node("interface"));
iface.set("name", intro->name);
for(const IntrospectedMethod* m = intro->methods; m->args; ++m)
{
Xml::Node& method = iface.add(Xml::Node("method"));
method.set("name", m->name);
for(const IntrospectedArgument* a = m->args; a->type; ++a)
{
Xml::Node& arg = method.add(Xml::Node("arg"));
if(a->name) arg.set("name", a->name);
arg.set("direction", a->in ? "in" : "out");
arg.set("type", a->type);
}
}
for(const IntrospectedMethod* m = intro->signals; m->args; ++m)
{
Xml::Node& method = iface.add(Xml::Node("signal"));
method.set("name", m->name);
for(const IntrospectedArgument* a = m->args; a->type; ++a)
{
Xml::Node& arg = method.add(Xml::Node("arg"));
if(a->name) arg.set("name", a->name);
arg.set("type", a->type);
}
}
}
}
std::string xml = DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE + iroot.to_xml();
ReturnMessage reply(call);
MessageIter wi = reply.w_iter();
wi.append_string(xml.c_str());
return reply;
}
IntrospectedInterface* const IntrospectableAdaptor::introspect() const
{
static IntrospectedArgument Introspect_args[] =
{
{ "data", "s", false },
{ 0, 0, 0 }
};
static IntrospectedMethod Introspectable_methods[] =
{
{ "Introspect", Introspect_args },
{ 0, 0 }
};
static IntrospectedMethod Introspectable_signals[] =
{
{ 0, 0 }
};
static IntrospectedInterface Introspectable_interface =
{
introspectable_name, Introspectable_methods, Introspectable_signals
};
return &Introspectable_interface;
}
IntrospectableProxy::IntrospectableProxy()
: InterfaceProxy(introspectable_name)
{}
std::string IntrospectableProxy::Introspect()
{
DBus::CallMessage call;
call.member("Introspect");
DBus::Message ret = invoke_method(call);
DBus::MessageIter ri = ret.r_iter();
const char* str = ri.get_string();
return str;
}

571
src/message.cpp Normal file
View file

@ -0,0 +1,571 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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
*
*/
#include <dbus-c++/message.h>
#include <dbus/dbus.h>
#include "internalerror.h"
#include "message_p.h"
using namespace DBus;
/*
*/
int MessageIter::type()
{
return dbus_message_iter_get_arg_type((DBusMessageIter*)&_iter);
}
bool MessageIter::at_end()
{
return type() == DBUS_TYPE_INVALID;
}
bool MessageIter::has_next()
{
return dbus_message_iter_has_next((DBusMessageIter*)&_iter);
}
MessageIter& MessageIter::operator ++()
{
dbus_message_iter_next((DBusMessageIter*)&_iter);
return (*this);
}
MessageIter MessageIter::operator ++(int)
{
MessageIter copy(*this);
(*this)++;
return copy;
}
bool MessageIter::append_basic( int type_id, void* value )
{
return dbus_message_iter_append_basic((DBusMessageIter*)&_iter, type_id, value);
}
void MessageIter::get_basic( int type_id, void* ptr )
{
if(type() != type_id)
throw Error(DBUS_ERROR_INVALID_ARGS, "type mismatch");
dbus_message_iter_get_basic((DBusMessageIter*)_iter, ptr);
}
bool MessageIter::append_byte( unsigned char b )
{
return append_basic(DBUS_TYPE_BYTE, &b);
}
unsigned char MessageIter::get_byte()
{
unsigned char b;
get_basic(DBUS_TYPE_BYTE, &b);
return b;
}
bool MessageIter::append_bool( bool b )
{
return append_basic(DBUS_TYPE_BOOLEAN, &b);
}
bool MessageIter::get_bool()
{
bool b;
get_basic(DBUS_TYPE_BOOLEAN, &b);
return b;
}
bool MessageIter::append_int16( signed short i )
{
return append_basic(DBUS_TYPE_INT16, &i);
}
signed short MessageIter::get_int16()
{
signed short i;
get_basic(DBUS_TYPE_INT16, &i);
return i;
}
bool MessageIter::append_uint16( unsigned short u )
{
return append_basic(DBUS_TYPE_UINT16, &u);
}
unsigned short MessageIter::get_uint16()
{
unsigned short u;
get_basic(DBUS_TYPE_UINT16, &u);
return u;
}
bool MessageIter::append_int32( signed int i )
{
return append_basic(DBUS_TYPE_INT32, &i);
}
signed int MessageIter::get_int32()
{
signed int i;
get_basic(DBUS_TYPE_INT32, &i);
return i;
}
bool MessageIter::append_uint32( unsigned int u )
{
return append_basic(DBUS_TYPE_UINT32, &u);
}
unsigned int MessageIter::get_uint32()
{
unsigned int u;
get_basic(DBUS_TYPE_UINT32, &u);
return u;
}
signed long long MessageIter::get_int64()
{
signed long long i;
get_basic(DBUS_TYPE_INT64, &i);
return i;
}
bool MessageIter::append_int64( signed long long i )
{
return append_basic(DBUS_TYPE_INT64, &i);
}
unsigned long long MessageIter::get_uint64()
{
unsigned long long u;
get_basic(DBUS_TYPE_UINT64, &u);
return u;
}
bool MessageIter::append_uint64( unsigned long long u )
{
return append_basic(DBUS_TYPE_UINT64, &u);
}
double MessageIter::get_double()
{
double d;
get_basic(DBUS_TYPE_DOUBLE, &d);
return d;
}
bool MessageIter::append_double( double d )
{
return append_basic(DBUS_TYPE_DOUBLE, &d);
}
bool MessageIter::append_string( const char* chars )
{
return append_basic(DBUS_TYPE_STRING, &chars);
}
const char* MessageIter::get_string()
{
char* chars;
get_basic(DBUS_TYPE_STRING, &chars);
return chars;
}
bool MessageIter::append_path( const char* chars )
{
return append_basic(DBUS_TYPE_OBJECT_PATH, &chars);
}
const char* MessageIter::get_path()
{
char* chars;
get_basic(DBUS_TYPE_OBJECT_PATH, &chars);
return chars;
}
bool MessageIter::append_signature( const char* chars )
{
return append_basic(DBUS_TYPE_SIGNATURE, &chars);
}
const char* MessageIter::get_signature()
{
char* chars;
get_basic(DBUS_TYPE_SIGNATURE, &chars);
return chars;
}
MessageIter MessageIter::recurse()
{
MessageIter iter(msg());
dbus_message_iter_recurse((DBusMessageIter*)&_iter, (DBusMessageIter*)&(iter._iter));
return iter;
}
char* MessageIter::signature() const
{
return dbus_message_iter_get_signature((DBusMessageIter*)&_iter);
}
bool MessageIter::append_array( char type, const void* ptr, size_t length )
{
return dbus_message_iter_append_fixed_array((DBusMessageIter*)&_iter, type, ptr, length);
}
int MessageIter::array_type()
{
return dbus_message_iter_get_element_type((DBusMessageIter*)&_iter);
}
int MessageIter::get_array( void* ptr )
{
int length;
dbus_message_iter_get_fixed_array((DBusMessageIter*)&_iter, ptr, &length);
return length;
}
MessageIter MessageIter::new_array( const char* sig )
{
MessageIter arr(msg());
dbus_message_iter_open_container(
(DBusMessageIter*)&_iter, DBUS_TYPE_ARRAY, sig, (DBusMessageIter*)&(arr._iter)
);
return arr;
}
bool MessageIter::is_array()
{
return dbus_message_iter_get_arg_type((DBusMessageIter*)&_iter) == DBUS_TYPE_ARRAY;
}
int MessageIter::array_length()
{
return dbus_message_iter_get_array_len((DBusMessageIter*)&_iter);
}
MessageIter MessageIter::new_dict_entry()
{
MessageIter ent(msg());
dbus_message_iter_open_container(
(DBusMessageIter*)_iter, DBUS_TYPE_DICT_ENTRY, 0, (DBusMessageIter*)&(ent._iter)
);
return ent;
}
bool MessageIter::is_dict()
{
return is_array() && dbus_message_iter_get_element_type((DBusMessageIter*)_iter) == DBUS_TYPE_DICT_ENTRY;
}
MessageIter MessageIter::new_variant( const char* sig )
{
MessageIter var(msg());
dbus_message_iter_open_container(
(DBusMessageIter*)_iter, DBUS_TYPE_VARIANT, sig, (DBusMessageIter*)&(var._iter)
);
return var;
}
MessageIter MessageIter::new_struct( const char* sig )
{
MessageIter stu(msg());
dbus_message_iter_open_container(
(DBusMessageIter*)_iter, DBUS_TYPE_STRUCT, sig, (DBusMessageIter*)&(stu._iter)
);
return stu;
}
void MessageIter::close_container( MessageIter& container )
{
dbus_message_iter_close_container((DBusMessageIter*)&_iter, (DBusMessageIter*)&(container._iter));
}
/*
*/
Message::Message()
: _pvt(new Private)
{
}
Message::Message( Message::Private* p )
: _pvt(p)
{
if(_pvt->msg) dbus_message_ref(_pvt->msg);
}
Message::Message( const Message& m )
: _pvt(m._pvt)
{
dbus_message_ref(_pvt->msg);
}
Message::~Message()
{
dbus_message_unref(_pvt->msg);
}
Message Message::copy()
{
Private* pvt = new Private(dbus_message_copy(_pvt->msg));
return Message(pvt);
}
bool Message::append( int first_type, ... )
{
va_list vl;
va_start(vl, first_type);
bool b = dbus_message_append_args_valist(_pvt->msg, first_type, vl);
va_end(vl);
return b;
}
void Message::terminate()
{
dbus_message_append_args(_pvt->msg, DBUS_TYPE_INVALID);
}
int Message::type() const
{
return dbus_message_get_type(_pvt->msg);
}
int Message::serial() const
{
return dbus_message_get_serial(_pvt->msg);
}
int Message::reply_serial() const
{
return dbus_message_get_reply_serial(_pvt->msg);
}
bool Message::reply_serial( int s )
{
return dbus_message_set_reply_serial(_pvt->msg, s);
}
const char* Message::sender() const
{
return dbus_message_get_sender(_pvt->msg);
}
bool Message::sender( const char* s )
{
return dbus_message_set_sender(_pvt->msg, s);
}
const char* Message::destination() const
{
return dbus_message_get_destination(_pvt->msg);
}
bool Message::destination( const char* s )
{
return dbus_message_set_destination(_pvt->msg, s);
}
bool Message::is_error() const
{
return type() == DBUS_MESSAGE_TYPE_ERROR;
}
bool Message::is_signal( const char* interface, const char* member ) const
{
return dbus_message_is_signal(_pvt->msg, interface, member);
}
MessageIter Message::w_iter()
{
MessageIter iter(*this);
dbus_message_iter_init_append(_pvt->msg, (DBusMessageIter*)&(iter._iter));
return iter;
}
MessageIter Message::r_iter() const
{
MessageIter iter(const_cast<Message&>(*this));
dbus_message_iter_init(_pvt->msg, (DBusMessageIter*)&(iter._iter));
return iter;
}
/*
*/
ErrorMessage::ErrorMessage()
{
_pvt->msg = dbus_message_new(DBUS_MESSAGE_TYPE_ERROR);
}
ErrorMessage::ErrorMessage( const Message& to_reply, const char* name, const char* message )
{
_pvt->msg = dbus_message_new_error(to_reply._pvt->msg, name, message);
}
bool ErrorMessage::operator == ( const ErrorMessage& m ) const
{
return dbus_message_is_error(_pvt->msg, m.name());
}
const char* ErrorMessage::name() const
{
return dbus_message_get_error_name(_pvt->msg);
}
bool ErrorMessage::name( const char* n )
{
return dbus_message_set_error_name(_pvt->msg, n);
}
/*
*/
SignalMessage::SignalMessage( const char* name )
{
_pvt->msg = dbus_message_new(DBUS_MESSAGE_TYPE_SIGNAL);
member(name);
}
SignalMessage::SignalMessage( const char* path, const char* interface, const char* name )
{
_pvt->msg = dbus_message_new_signal(path, interface, name);
}
bool SignalMessage::operator == ( const SignalMessage& m ) const
{
return dbus_message_is_signal(_pvt->msg, m.interface(), m.member());
}
const char* SignalMessage::interface() const
{
return dbus_message_get_interface(_pvt->msg);
}
bool SignalMessage::interface( const char* i )
{
return dbus_message_set_interface(_pvt->msg, i);
}
const char* SignalMessage::member() const
{
return dbus_message_get_member(_pvt->msg);
}
bool SignalMessage::member( const char* m )
{
return dbus_message_set_member(_pvt->msg, m);
}
const char* SignalMessage::path() const
{
return dbus_message_get_path(_pvt->msg);
}
char** SignalMessage::path_split() const
{
char** p;
dbus_message_get_path_decomposed(_pvt->msg, &p); //todo: return as a std::vector ?
return p;
}
bool SignalMessage::path( const char* p )
{
return dbus_message_set_path(_pvt->msg, p);
}
/*
*/
CallMessage::CallMessage()
{
_pvt->msg = dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_CALL);
}
CallMessage::CallMessage( const char* dest, const char* path, const char* iface, const char* method )
{
_pvt->msg = dbus_message_new_method_call(dest, path, iface, method);
}
bool CallMessage::operator == ( const CallMessage& m ) const
{
return dbus_message_is_method_call(_pvt->msg, m.interface(), m.member());
}
const char* CallMessage::interface() const
{
return dbus_message_get_interface(_pvt->msg);
}
bool CallMessage::interface( const char* i )
{
return dbus_message_set_interface(_pvt->msg, i);
}
const char* CallMessage::member() const
{
return dbus_message_get_member(_pvt->msg);
}
bool CallMessage::member( const char* m )
{
return dbus_message_set_member(_pvt->msg, m);
}
const char* CallMessage::path() const
{
return dbus_message_get_path(_pvt->msg);
}
char** CallMessage::path_split() const
{
char** p;
dbus_message_get_path_decomposed(_pvt->msg, &p);
return p;
}
bool CallMessage::path( const char* p )
{
return dbus_message_set_path(_pvt->msg, p);
}
const char* CallMessage::signature() const
{
return dbus_message_get_signature(_pvt->msg);
}
/*
*/
ReturnMessage::ReturnMessage( const CallMessage& callee )
{
_pvt = new Private(dbus_message_new_method_return(callee._pvt->msg));
}
const char* ReturnMessage::signature() const
{
return dbus_message_get_signature(_pvt->msg);
}

48
src/message_p.h Normal file
View file

@ -0,0 +1,48 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_MESSAGE_P_H
#define __DBUSXX_MESSAGE_P_H
#include <dbus-c++/message.h>
#include <dbus-c++/refptr_impl.h>
#include <dbus/dbus.h>
namespace DBus {
struct Message::Private
{
DBusMessage* msg;
Private() : msg(0)
{}
Private( DBusMessage* m ) : msg(m)
{}
};
} /* namespace DBus */
#endif//__DBUSXX_MESSAGE_P_H

331
src/object.cpp Normal file
View file

@ -0,0 +1,331 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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
*
*/
#include <dbus-c++/debug.h>
#include <dbus-c++/object.h>
#include "internalerror.h"
#include <dbus/dbus.h>
#include "message_p.h"
#include "connection_p.h"
using namespace DBus;
Object::Object( Connection& conn, const char* path, const char* service )
: _conn(conn), _path(path), _service(service ? service : "")
{
}
Object::~Object()
{
}
struct ObjectAdaptor::Private
{
static void unregister_function_stub( DBusConnection*, void* );
static DBusHandlerResult message_function_stub( DBusConnection*, DBusMessage*, void* );
};
static DBusObjectPathVTable _vtable =
{
ObjectAdaptor::Private::unregister_function_stub,
ObjectAdaptor::Private::message_function_stub,
NULL, NULL, NULL, NULL
};
void ObjectAdaptor::Private::unregister_function_stub( DBusConnection* conn, void* data )
{
// XXX: what do we have to do here ?
}
DBusHandlerResult ObjectAdaptor::Private::message_function_stub( DBusConnection*, DBusMessage* dmsg, void* data )
{
ObjectAdaptor* o = static_cast<ObjectAdaptor*>(data);
if( o )
{
Message msg(new Message::Private(dmsg));
debug_log("in object %s", o->path().c_str());
debug_log(" got message #%d from %s to %s",
msg.serial(),
msg.sender(),
msg.destination()
);
return o->handle_message(msg)
? DBUS_HANDLER_RESULT_HANDLED
: DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
else
{
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
}
ObjectAdaptor::ObjectAdaptor( Connection& conn, const char* path )
: Object(conn, path, conn.unique_name())
{
register_obj();
}
ObjectAdaptor::~ObjectAdaptor()
{
unregister_obj();
}
void ObjectAdaptor::register_obj()
{
debug_log("registering local object %s", path().c_str());
if(!dbus_connection_register_object_path(conn()._pvt->conn, path().c_str(), &_vtable, this))
{
throw Error(DBUS_ERROR_NO_MEMORY,"unable to register object path");
}
else
{
InterfaceTable::const_iterator ii = _interfaces.begin();
while( ii != _interfaces.end() )
{
std::string im = "type='method_call',interface='"+ii->first+"'";
conn().add_match(im.c_str());
++ii;
}
}
}
void ObjectAdaptor::unregister_obj()
{
debug_log("unregistering local object %s", path().c_str());
dbus_connection_unregister_object_path(conn()._pvt->conn, path().c_str());
InterfaceTable::const_iterator ii = _interfaces.begin();
while( ii != _interfaces.end() )
{
std::string im = "type='method_call',interface='"+ii->first+"'";
conn().remove_match(im.c_str());
++ii;
}
}
void ObjectAdaptor::remit_signal( SignalMessage& sig )
{
sig.path(path().c_str());
conn().send(sig);
}
struct WontReturnException
{
const void* tag;
};
bool ObjectAdaptor::handle_message( const Message& msg )
{
switch( msg.type() )
{
case DBUS_MESSAGE_TYPE_METHOD_CALL:
{
const CallMessage& cmsg = reinterpret_cast<const CallMessage&>(msg);
const char* member = cmsg.member();
const char* interface = cmsg.interface();
debug_log(" invoking method %s.%s", interface, member);
InterfaceTable::const_iterator ii = _interfaces.find(interface);
if( ii != _interfaces.end() )
{
try
{
Message ret = ii->second->invoke_method(cmsg);
conn().send(ret);
}
catch(Error& e)
{
ErrorMessage em(cmsg, e.name(), e.message());
conn().send(em);
}
catch(WontReturnException& wre)
{
_deferred_returns[wre.tag] = new DeferredReturn(conn(), cmsg, wre.tag);
}
return true;
}
else
{
return false;
}
}
default:
{
return false;
}
}
}
void ObjectAdaptor::return_later( const void* tag )
{
WontReturnException wre = { tag };
throw wre;
}
void ObjectAdaptor::return_now( DeferredReturn* ret )
{
ret->_conn.send(ret->_return);
DeferredReturnMap::iterator di = _deferred_returns.find(ret->_tag);
delete di->second;
_deferred_returns.erase(di);
}
void ObjectAdaptor::return_error( DeferredReturn* ret, Error& error )
{
ret->_conn.send(ErrorMessage(ret->_call, error.name(), error.message()));
DeferredReturnMap::iterator di = _deferred_returns.find(ret->_tag);
delete di->second;
_deferred_returns.erase(di);
}
ObjectAdaptor::DeferredReturn* ObjectAdaptor::find_return( const void* tag )
{
DeferredReturnMap::iterator di = _deferred_returns.find(tag);
return di != _deferred_returns.end() ? di->second : NULL;
}
ObjectAdaptor::DeferredReturn::DeferredReturn( Connection& conn, const CallMessage& call, const void* tag )
: _conn(conn), _call(call), _return(_call), _tag(tag)
{
_writer = _return.w_iter(); //todo: verify
}
/*
*/
ObjectProxy::ObjectProxy( Connection& conn, const char* path, const char* service )
: Object(conn, path, service)
{
register_obj();
}
ObjectProxy::~ObjectProxy()
{
unregister_obj();
}
void ObjectProxy::register_obj()
{
debug_log("registering remote object %s", path().c_str());
_filtered = new Callback<ObjectProxy, bool, const Message&>(this, &ObjectProxy::handle_message);
conn().add_filter(_filtered);
InterfaceTable::const_iterator ii = _interfaces.begin();
while( ii != _interfaces.end() )
{
std::string im = "type='signal',interface='"+ii->first+"'";
conn().add_match(im.c_str());
++ii;
}
// conn().add_match("type='signal'");
// conn().add_match("type='method_call'");
}
void ObjectProxy::unregister_obj()
{
debug_log("unregistering remote object %s", path().c_str());
InterfaceTable::const_iterator ii = _interfaces.begin();
while( ii != _interfaces.end() )
{
std::string im = "type='signal',interface='"+ii->first+"'";
conn().remove_match(im.c_str());
++ii;
}
// conn().remove_match("type='method_call'");
// conn().remove_match("type='signal'");
conn().remove_filter(_filtered);
}
Message ObjectProxy::rinvoke_method( CallMessage& call )
{
call.path(path().c_str());
call.destination(service().c_str());
return conn().send_blocking(call, 2000);
}
bool ObjectProxy::handle_message( const Message& msg )
{
switch( msg.type() )
{
case DBUS_MESSAGE_TYPE_SIGNAL:
{
const SignalMessage& smsg = reinterpret_cast<const SignalMessage&>(msg);
const char* interface = smsg.interface();
const char* member = smsg.member();
debug_log("filtered signal %s(in %s) from remote object %s", member, interface, msg.sender());
InterfaceTable::const_iterator ii = _interfaces.find(interface);
if( ii != _interfaces.end() )
{
return ii->second->dispatch_signal(smsg);
}
else
{
return false;
}
}
case DBUS_MESSAGE_TYPE_METHOD_RETURN:
{
debug_log("filtered method return from remote object %s", msg.sender());
//TODO:
return false;
}
case DBUS_MESSAGE_TYPE_ERROR:
{
debug_log("filtered error from remote object %s", msg.sender());
//TODO:
return false;
}
default:
{
return false;
}
}
}

105
src/pendingcall.cpp Normal file
View file

@ -0,0 +1,105 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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
*
*/
#include <dbus-c++/pendingcall.h>
#include <dbus/dbus.h>
#include "internalerror.h"
#include "pendingcall_p.h"
using namespace DBus;
PendingCall::Private::Private( DBusPendingCall* pc )
: call(pc), dataslot(-1)
{
if(!dbus_pending_call_allocate_data_slot(&dataslot))
{
throw Error(DBUS_ERROR_NO_MEMORY, "Unable to allocate data slot");
}
}
void PendingCall::Private::notify_stub( DBusPendingCall* dpc, void* data )
{
PendingCall* pc = static_cast<PendingCall*>(data);
pc->slot(*pc);
}
PendingCall::Private::~Private()
{
if(dataslot != -1)
{
dbus_pending_call_allocate_data_slot(&dataslot);
}
}
PendingCall::PendingCall( PendingCall::Private* p )
: _pvt(p)
{
if(!dbus_pending_call_set_notify(_pvt->call, Private::notify_stub, this, NULL))
{
throw Error(DBUS_ERROR_NO_MEMORY, "Unable to initialize pending call");
}
}
PendingCall::PendingCall( const PendingCall& c )
: _pvt(c._pvt)
{
dbus_pending_call_ref(_pvt->call);
}
PendingCall::~PendingCall()
{
dbus_pending_call_unref(_pvt->call);
}
bool PendingCall::completed()
{
return dbus_pending_call_get_completed(_pvt->call);
}
void PendingCall::cancel()
{
dbus_pending_call_cancel(_pvt->call);
}
void PendingCall::block()
{
dbus_pending_call_block(_pvt->call);
}
void PendingCall::data( void* p )
{
if(!dbus_pending_call_set_data(_pvt->call, _pvt->dataslot, p, NULL))
{
throw Error(DBUS_ERROR_NO_MEMORY, "Unable to initialize data slot");
}
}
void* PendingCall::data()
{
return dbus_pending_call_get_data(_pvt->call, _pvt->dataslot);
}

49
src/pendingcall_p.h Normal file
View file

@ -0,0 +1,49 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_PENDING_CALL_P_H
#define __DBUSXX_PENDING_CALL_P_H
#include <dbus-c++/pendingcall.h>
#include <dbus-c++/refptr_impl.h>
#include <dbus/dbus.h>
namespace DBus {
struct PendingCall::Private
{
DBusPendingCall* call;
int dataslot;
Private( DBusPendingCall* );
~Private();
static void notify_stub( DBusPendingCall* dpc, void* data );
};
} /* namespace DBus */
#endif//__DBUSXX_PENDING_CALL_P_H

115
src/server.cpp Normal file
View file

@ -0,0 +1,115 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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
*
*/
#include <dbus-c++/debug.h>
#include <dbus-c++/server.h>
#include "internalerror.h"
#include "server_p.h"
#include "connection_p.h"
#include "dispatcher_p.h"
using namespace DBus;
Server::Private::Private( DBusServer* s )
: server(s)
{
dbus_server_set_new_connection_function(server, on_new_conn_cb, this, NULL);
}
void Server::Private::on_new_conn_cb( DBusServer* server, DBusConnection* conn, void* data )
{
//Private* p = static_cast<Private*>(data);
//m->on_new_connection(nc); //TODO
Connection nc(new Connection::Private(conn));
debug_log("incoming connection");
}
Server::Server( const char* address )
{
InternalError e;
DBusServer* server = dbus_server_listen(address, e);
if(e) throw Error(e);
_pvt = new Private(server);
}
Server::Server( const Server& s )
: _pvt(s._pvt)
{
dbus_server_ref(_pvt->server);
}
Server::~Server()
{
dbus_server_unref(_pvt->server);
}
Dispatcher* Server::setup( Dispatcher* dispatcher )
{
debug_log("registering stubs for server %p", _pvt->server);
Dispatcher* prev = _pvt->dispatcher;
dbus_server_set_watch_functions(
_pvt->server,
Dispatcher::Private::on_add_watch,
Dispatcher::Private::on_rem_watch,
Dispatcher::Private::on_toggle_watch,
dispatcher,
0
);
dbus_server_set_timeout_functions(
_pvt->server,
Dispatcher::Private::on_add_timeout,
Dispatcher::Private::on_rem_timeout,
Dispatcher::Private::on_toggle_timeout,
dispatcher,
0
);
_pvt->dispatcher = dispatcher;
return prev;
}
bool Server::operator == ( const Server& s ) const
{
return _pvt->server == s._pvt->server;
}
bool Server::listening() const
{
return dbus_server_get_is_connected(_pvt->server);
}
void Server::disconnect()
{
dbus_server_disconnect(_pvt->server);
}

49
src/server_p.h Normal file
View file

@ -0,0 +1,49 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_SERVER_P_H
#define __DBUSXX_SERVER_P_H
#include <dbus-c++/server.h>
#include <dbus-c++/dispatcher.h>
#include <dbus-c++/refptr_impl.h>
#include <dbus/dbus.h>
namespace DBus {
struct Server::Private
{
DBusServer* server;
Dispatcher* dispatcher;
Private( DBusServer* );
static void on_new_conn_cb( DBusServer* server, DBusConnection* conn, void* data );
};
} /* namespace DBus */
#endif//__DBUSXX_SERVER_P_H

177
src/types.cpp Normal file
View file

@ -0,0 +1,177 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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
*
*/
#include <dbus-c++/types.h>
#include <dbus-c++/object.h>
#include <dbus/dbus.h>
#include <stdarg.h>
#include "message_p.h"
#include "internalerror.h"
using namespace DBus;
Variant::Variant()
: _msg(CallMessage()), // dummy message used as temporary storage for variant data
_it(_msg.w_iter())
{
}
Variant::Variant( MessageIter& it )
: _msg(it.msg()),
_it(it.recurse())
{
}
Variant& Variant::operator = ( const Variant& v )
{
if(&v != this)
{
_msg = v._msg;
_it = v._it;
_signature = v._signature;
}
return *this;
}
const char* Variant::signature() const
{
char* sigbuf = _it.signature();
_signature = sigbuf;
free(sigbuf);
return _signature.c_str();
}
MessageIter& operator << ( MessageIter& iter, const Variant& val )
{
const char* sig = val.signature();
MessageIter rit = val.iter();
MessageIter wit = iter.new_variant(sig);
for(size_t i = 0; i < strlen(sig); ++i)
{
switch(sig[i])
{
case 'b':
{
Bool b; rit >> b; wit << b;
break;
}
case 'y':
{
Byte y; rit >> y; wit << y;
break;
}
case 'n':
{
Int16 n; rit >> n; wit << n;
break;
}
case 'q':
{
UInt16 q; rit >> q; wit << q;
break;
}
case 'i':
{
Int32 i; rit >> i; wit << i;
break;
}
case 'u':
{
UInt32 u; rit >> u; wit << u;
break;
}
case 'x':
{
Int64 x; rit >> x; wit << x;
break;
}
case 't':
{
UInt64 t; rit >> t; wit << t;
break;
}
case 'd':
{
Double d; rit >> d; wit << d;
break;
}
case 's':
{
String s; rit >> s; wit << s;
break;
}
case 'o':
{
Path o; rit >> o; wit << o;
break;
}
case 'g':
{
Signature g; rit >> g; wit << g;
break;
}
case 'a':
{
break;
}
case '(':
{
break;
}
case ')':
{
break;
}
case '{':
{
break;
}
case '}':
{
break;
}
}
}
//TODO: implement marshaling of compound types
iter.close_container(wit);
return iter;
}
MessageIter& operator >> ( MessageIter& iter, Variant& val )
{
//TODO: check if iter really points to a variant
val = Variant(iter);
return ++iter;
}

314
src/xml.cpp Normal file
View file

@ -0,0 +1,314 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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
*
*/
#include <dbus-c++/xml.h>
#include <dbus-c++/debug.h>
#include <expat.h>
std::istream& operator >> ( std::istream& in, DBus::Xml::Document& doc )
{
std::stringbuf xmlbuf;
in.get(xmlbuf, '\0');
doc.from_xml(xmlbuf.str());
return in;
}
std::ostream& operator << ( std::ostream& out, const DBus::Xml::Document& doc )
{
return out << doc.to_xml();
}
using namespace DBus;
using namespace DBus::Xml;
Error::Error( const char* error, int line, int column )
{
std::ostringstream estream;
estream << "line " << line << ", column " << column << ": " << error;
_error = estream.str();
}
Node::Node( const char* n, const char** a )
: name(n)
{
if(a)
for(int i = 0; a[i]; i += 2)
{
_attrs[a[i]] = a[i+1];
//debug_log("xml:\t%s = %s", a[i], a[i+1]);
}
}
Nodes Nodes::operator[]( const std::string& key )
{
Nodes result;
for(iterator i = begin(); i != end(); ++i)
{
Nodes part = (**i)[key];
result.insert(result.end(), part.begin(), part.end());
}
return result;
}
Nodes Nodes::select( const std::string& attr, const std::string& value )
{
Nodes result;
for(iterator i = begin(); i != end(); ++i)
{
if((*i)->get(attr) == value)
result.insert(result.end(), *i);
}
return result;
}
Nodes Node::operator[]( const std::string& key )
{
Nodes result;
if(key.length() == 0) return result;
for(Children::iterator i = children.begin(); i != children.end(); ++i)
{
if(i->name == key)
result.push_back(&(*i));
}
return result;
}
std::string Node::get( const std::string& attribute )
{
if(_attrs.find(attribute) != _attrs.end())
return _attrs[attribute];
else
return "";
}
void Node::set( const std::string& attribute, std::string value )
{
if(value.length())
_attrs[attribute] = value;
else
_attrs.erase(value);
}
std::string Node::to_xml() const
{
std::string xml;
int depth = 0;
_raw_xml(xml, depth);
return xml;
}
void Node::_raw_xml( std::string& xml, int& depth ) const
{
xml.append(depth*2, ' ');
xml.append("<"+name);
for(Attributes::const_iterator i = _attrs.begin(); i != _attrs.end(); ++i)
{
xml.append(" "+i->first+"=\""+i->second+"\"");
}
if(cdata.length() == 0 && children.size() == 0)
{
xml.append("/>\n");
}
else
{
xml.append(">");
if(cdata.length())
{
xml.append(cdata);
}
if(children.size())
{
xml.append("\n");
depth++;
for(Children::const_iterator i = children.begin(); i != children.end(); ++i)
{
i->_raw_xml(xml, depth);
}
depth--;
xml.append(depth*2, ' ');
}
xml.append("</"+name+">\n");
}
}
Document::Document()
: root(0), _depth(0)
{
}
Document::Document( const std::string& xml )
: root(0), _depth(0)
{
from_xml(xml);
}
Document::~Document()
{
delete root;
}
struct Document::Expat
{
static void start_doctype_decl_handler(
void* data, const XML_Char* name, const XML_Char* sysid, const XML_Char* pubid, int has_internal_subset
);
static void end_doctype_decl_handler( void* data );
static void start_element_handler( void *data, const XML_Char *name, const XML_Char **atts );
static void character_data_handler( void *data, const XML_Char* chars, int len );
static void end_element_handler( void *data, const XML_Char *name );
};
void Document::from_xml( const std::string& xml )
{
_depth = 0;
delete root;
root = 0;
XML_Parser parser = XML_ParserCreate("UTF-8");
XML_SetUserData(parser, this);
XML_SetDoctypeDeclHandler(
parser,
Document::Expat::start_doctype_decl_handler,
Document::Expat::end_doctype_decl_handler
);
XML_SetElementHandler(
parser,
Document::Expat::start_element_handler,
Document::Expat::end_element_handler
);
XML_SetCharacterDataHandler(
parser,
Document::Expat::character_data_handler
);
XML_Status status = XML_Parse(parser, xml.c_str(), xml.length(), true);
if(status == XML_STATUS_ERROR)
{
const char* error = XML_ErrorString(XML_GetErrorCode(parser));
int line = XML_GetCurrentLineNumber(parser);
int column = XML_GetCurrentColumnNumber(parser);
XML_ParserFree(parser);
throw Error(error, line, column);
}
else
{
XML_ParserFree(parser);
}
}
std::string Document::to_xml() const
{
return root->to_xml();
}
void Document::Expat::start_doctype_decl_handler(
void* data, const XML_Char* name, const XML_Char* sysid, const XML_Char* pubid, int has_internal_subset
)
{
}
void Document::Expat::end_doctype_decl_handler( void* data )
{
}
void Document::Expat::start_element_handler( void *data, const XML_Char *name, const XML_Char **atts )
{
Document* doc = (Document*)data;
//debug_log("xml:%d -> %s", doc->_depth, name);
if(!doc->root)
{
doc->root = new Node(name, atts);
}
else
{
Node::Children* cld = &(doc->root->children);
for(int i = 1; i < doc->_depth; ++i)
{
cld = &(cld->back().children);
}
cld->push_back(Node(name, atts));
//std::cerr << doc->to_xml() << std::endl;
}
doc->_depth++;
}
void Document::Expat::character_data_handler( void *data, const XML_Char* chars, int len )
{
Document* doc = (Document*)data;
Node* nod = doc->root;
for(int i = 1; i < doc->_depth; ++i)
{
nod = &(nod->children.back());
}
int x, y;
x = 0;
y = len-1;
while(isspace(chars[y]) && y > 0) --y;
while(isspace(chars[x]) && x < y) ++x;
nod->cdata = std::string(chars, x, y+1);
}
void Document::Expat::end_element_handler( void *data, const XML_Char *name )
{
Document* doc = (Document*)data;
//debug_log("xml:%d <- %s", doc->_depth, name);
doc->_depth--;
}

1
tests/Makefile.am Normal file
View file

@ -0,0 +1 @@
EXTRA_DIST = test-introspect.xml

319
tests/Makefile.in Normal file
View file

@ -0,0 +1,319 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = tests
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/dbus-c++/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBUS_DOXYGEN_DOCS_ENABLED_FALSE = @DBUS_DOXYGEN_DOCS_ENABLED_FALSE@
DBUS_DOXYGEN_DOCS_ENABLED_TRUE = @DBUS_DOXYGEN_DOCS_ENABLED_TRUE@
DEBUG_FLAGS = @DEBUG_FLAGS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DOXYGEN = @DOXYGEN@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
dbus_CFLAGS = @dbus_CFLAGS@
dbus_LIBS = @dbus_LIBS@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
xml_CFLAGS = @xml_CFLAGS@
xml_LIBS = @xml_LIBS@
EXTRA_DIST = test-introspect.xml
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu tests/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

193
tests/test-introspect.xml Normal file
View file

@ -0,0 +1,193 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/Test">
<interface name="org.freedesktop.DBus.Binding.SingleTests">
<annotation name="org.freedesktop.DBus.Description" value="A single test to check overloading"/>
<method name="Sum">
<annotation name="org.freedesktop.DBus.Description" value="Returns the sum of the values in the input list"/>
<arg type="ay" name="input" direction="in"/>
<arg type="u" name="output" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Binding.Tests">
<annotation name="org.freedesktop.DBus.Description" value="Contains all the tests to run on the bindings."/>
<method name="Identity">
<annotation name="org.freedesktop.DBus.Description" value="Returns whatever it is passed"/>
<arg type="v" name="input" direction="in"/>
<arg type="v" name="output" direction="out"/>
</method>
<method name="IdentityByte">
<annotation name="org.freedesktop.DBus.Description" value="Returns whatever it is passed"/>
<arg type="y" name="input" direction="in"/>
<arg type="y" name="output" direction="out"/>
</method>
<method name="IdentityBool">
<annotation name="org.freedesktop.DBus.Description" value="Returns whatever it is passed"/>
<arg type="b" name="input" direction="in"/>
<arg type="b" name="output" direction="out"/>
</method>
<method name="IdentityInt16">
<annotation name="org.freedesktop.DBus.Description" value="Returns whatever it is passed"/>
<arg type="n" name="input" direction="in"/>
<arg type="n" name="output" direction="out"/>
</method>
<method name="IdentityUInt16">
<annotation name="org.freedesktop.DBus.Description" value="Returns whatever it is passed"/>
<arg type="q" name="input" direction="in"/>
<arg type="q" name="output" direction="out"/>
</method>
<method name="IdentityInt32">
<annotation name="org.freedesktop.DBus.Description" value="Returns whatever it is passed"/>
<arg type="i" name="input" direction="in"/>
<arg type="i" name="output" direction="out"/>
</method>
<method name="IdentityUInt32">
<annotation name="org.freedesktop.DBus.Description" value="Returns whatever it is passed"/>
<arg type="u" name="input" direction="in"/>
<arg type="u" name="output" direction="out"/>
</method>
<method name="IdentityInt64">
<annotation name="org.freedesktop.DBus.Description" value="Returns whatever it is passed"/>
<arg type="x" name="input" direction="in"/>
<arg type="x" name="output" direction="out"/>
</method>
<method name="IdentityUInt64">
<annotation name="org.freedesktop.DBus.Description" value="Returns whatever it is passed"/>
<arg type="t" name="input" direction="in"/>
<arg type="t" name="output" direction="out"/>
</method>
<method name="IdentityDouble">
<annotation name="org.freedesktop.DBus.Description" value="Returns whatever it is passed"/>
<arg type="d" name="input" direction="in"/>
<arg type="d" name="output" direction="out"/>
</method>
<method name="IdentityString">
<annotation name="org.freedesktop.DBus.Description" value="Returns whatever it is passed"/>
<arg type="s" name="input" direction="in"/>
<arg type="s" name="output" direction="out"/>
</method>
<method name="IdentityArray">
<annotation name="org.freedesktop.DBus.Description" value="Returns whatever it is passed"/>
<arg type="av" name="input" direction="in"/>
<arg type="av" name="output" direction="out"/>
</method>
<method name="IdentityByteArray">
<annotation name="org.freedesktop.DBus.Description" value="Returns whatever it is passed"/>
<arg type="ay" name="input" direction="in"/>
<arg type="ay" name="output" direction="out"/>
</method>
<method name="IdentityBoolArray">
<annotation name="org.freedesktop.DBus.Description" value="Returns whatever it is passed"/>
<arg type="ab" name="input" direction="in"/>
<arg type="ab" name="output" direction="out"/>
</method>
<method name="IdentityInt16Array">
<annotation name="org.freedesktop.DBus.Description" value="Returns whatever it is passed"/>
<arg type="an" name="input" direction="in"/>
<arg type="an" name="output" direction="out"/>
</method>
<method name="IdentityUInt16Array">
<annotation name="org.freedesktop.DBus.Description" value="Returns whatever it is passed"/>
<arg type="aq" name="input" direction="in"/>
<arg type="aq" name="output" direction="out"/>
</method>
<method name="IdentityInt32Array">
<annotation name="org.freedesktop.DBus.Description" value="Returns whatever it is passed"/>
<arg type="ai" name="input" direction="in"/>
<arg type="ai" name="output" direction="out"/>
</method>
<method name="IdentityUInt32Array">
<annotation name="org.freedesktop.DBus.Description" value="Returns whatever it is passed"/>
<arg type="au" name="input" direction="in"/>
<arg type="au" name="output" direction="out"/>
</method>
<method name="IdentityInt64Array">
<annotation name="org.freedesktop.DBus.Description" value="Returns whatever it is passed"/>
<arg type="ax" name="input" direction="in"/>
<arg type="ax" name="output" direction="out"/>
</method>
<method name="IdentityUInt64Array">
<annotation name="org.freedesktop.DBus.Description" value="Returns whatever it is passed"/>
<arg type="at" name="input" direction="in"/>
<arg type="at" name="output" direction="out"/>
</method>
<method name="IdentityDoubleArray">
<annotation name="org.freedesktop.DBus.Description" value="Returns whatever it is passed"/>
<arg type="ad" name="input" direction="in"/>
<arg type="ad" name="output" direction="out"/>
</method>
<method name="IdentityStringArray">
<annotation name="org.freedesktop.DBus.Description" value="Returns whatever it is passed"/>
<arg type="as" name="input" direction="in"/>
<arg type="as" name="output" direction="out"/>
</method>
<method name="Sum">
<annotation name="org.freedesktop.DBus.Description" value="Returns the sum of the values in the input list"/>
<arg type="ai" name="input" direction="in"/>
<arg type="x" name="output" direction="out"/>
</method>
<method name="InvertMapping">
<annotation name="org.freedesktop.DBus.Description" value="Given a map of A =&gt; B, should return a map of B =&gt; a list of all the As which mapped to B"/>
<arg type="a{ss}" name="input" direction="in"/>
<arg type="a{sas}" name="output" direction="out"/>
</method>
<method name="DeStruct">
<annotation name="org.freedesktop.DBus.Description" value="This method returns the contents of a struct as separate values"/>
<arg type="(sun)" name="input" direction="in"/>
<arg type="s" name="outstring" direction="out"/>
<arg type="u" name="outuint32" direction="out"/>
<arg type="n" name="outuint16" direction="out"/>
</method>
<method name="Primitize">
<annotation name="org.freedesktop.DBus.Description" value="Given any compound type as a variant, return all the primitive types recursively contained within as an array of variants"/>
<arg type="v" name="input" direction="in"/>
<arg type="av" name="output" direction="out"/>
</method>
<method name="Invert">
<annotation name="org.freedesktop.DBus.Description" value="inverts it's input"/>
<arg type="b" name="input" direction="in"/>
<arg type="b" name="output" direction="out"/>
</method>
<method name="Trigger">
<annotation name="org.freedesktop.DBus.Description" value="triggers sending of a signal from the supplied object with the given parameter"/>
<arg type="s" name="object" direction="in"/>
<arg type="t" name="parameter" direction="in"/>
</method>
<method name="Exit">
<annotation name="org.freedesktop.DBus.Description" value="Causes server process to exit"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Binding.TestSignals">
<annotation name="org.freedesktop.DBus.Description" value="Signals that can be sent within the tests."/>
<signal name="Triggered">
<annotation name="org.freedesktop.DBus.Description" value="Sent in response to a method call"/>
<arg type="t" name="parameter"/>
</signal>
<signal name="Trigger">
<annotation name="org.freedesktop.DBus.Description" value="Causes a callback"/>
<arg type="q" name="parameter1"/>
<arg type="d" name="parameter2"/>
</signal>
</interface>
<interface name="org.freedesktop.DBus.Binding.TestCallbacks">
<annotation name="org.freedesktop.DBus.Description" value="Callbacks to be made on the client."/>
<method name="Response">
<annotation name="org.freedesktop.DBus.Description" value="when the trigger signal is received, this method should be called on the sending service/object."/>
<arg type="q" name="input1" direction="in"/>
<arg type="d" name="input2" direction="in"/>
</method>
</interface>
</node>

10
tools/Makefile.am Normal file
View file

@ -0,0 +1,10 @@
INCLUDES = $(dbus_CFLAGS) -I$(top_srcdir)/include
AM_CPPFLAGS = -DDBUS_API_SUBJECT_TO_CHANGE
bin_PROGRAMS = dbusxx-xml2cpp dbusxx-introspect
dbusxx_xml2cpp_SOURCES = xml2cpp.h xml2cpp.cpp
dbusxx_xml2cpp_LDADD = $(dbus_LIBS) $(top_builddir)/src/libdbus-c++-0.3.la
dbusxx_introspect_SOURCES = introspect.h introspect.cpp
dbusxx_introspect_LDADD = $(top_builddir)/src/libdbus-c++-0.3.la

475
tools/Makefile.in Normal file
View file

@ -0,0 +1,475 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = dbusxx-xml2cpp$(EXEEXT) dbusxx-introspect$(EXEEXT)
subdir = tools
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/dbus-c++/config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
am_dbusxx_introspect_OBJECTS = introspect.$(OBJEXT)
dbusxx_introspect_OBJECTS = $(am_dbusxx_introspect_OBJECTS)
dbusxx_introspect_DEPENDENCIES = \
$(top_builddir)/src/libdbus-c++-0.3.la
am_dbusxx_xml2cpp_OBJECTS = xml2cpp.$(OBJEXT)
dbusxx_xml2cpp_OBJECTS = $(am_dbusxx_xml2cpp_OBJECTS)
am__DEPENDENCIES_1 =
dbusxx_xml2cpp_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(top_builddir)/src/libdbus-c++-0.3.la
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include/dbus-c++
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(dbusxx_introspect_SOURCES) $(dbusxx_xml2cpp_SOURCES)
DIST_SOURCES = $(dbusxx_introspect_SOURCES) $(dbusxx_xml2cpp_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBUS_DOXYGEN_DOCS_ENABLED_FALSE = @DBUS_DOXYGEN_DOCS_ENABLED_FALSE@
DBUS_DOXYGEN_DOCS_ENABLED_TRUE = @DBUS_DOXYGEN_DOCS_ENABLED_TRUE@
DEBUG_FLAGS = @DEBUG_FLAGS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DOXYGEN = @DOXYGEN@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
dbus_CFLAGS = @dbus_CFLAGS@
dbus_LIBS = @dbus_LIBS@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
xml_CFLAGS = @xml_CFLAGS@
xml_LIBS = @xml_LIBS@
INCLUDES = $(dbus_CFLAGS) -I$(top_srcdir)/include
AM_CPPFLAGS = -DDBUS_API_SUBJECT_TO_CHANGE
dbusxx_xml2cpp_SOURCES = xml2cpp.h xml2cpp.cpp
dbusxx_xml2cpp_LDADD = $(dbus_LIBS) $(top_builddir)/src/libdbus-c++-0.3.la
dbusxx_introspect_SOURCES = introspect.h introspect.cpp
dbusxx_introspect_LDADD = $(top_builddir)/src/libdbus-c++-0.3.la
all: all-am
.SUFFIXES:
.SUFFIXES: .cpp .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu tools/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
|| test -f $$p1 \
; then \
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
rm -f "$(DESTDIR)$(bindir)/$$f"; \
done
clean-binPROGRAMS:
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
dbusxx-introspect$(EXEEXT): $(dbusxx_introspect_OBJECTS) $(dbusxx_introspect_DEPENDENCIES)
@rm -f dbusxx-introspect$(EXEEXT)
$(CXXLINK) $(dbusxx_introspect_LDFLAGS) $(dbusxx_introspect_OBJECTS) $(dbusxx_introspect_LDADD) $(LIBS)
dbusxx-xml2cpp$(EXEEXT): $(dbusxx_xml2cpp_OBJECTS) $(dbusxx_xml2cpp_DEPENDENCIES)
@rm -f dbusxx-xml2cpp$(EXEEXT)
$(CXXLINK) $(dbusxx_xml2cpp_LDFLAGS) $(dbusxx_xml2cpp_OBJECTS) $(dbusxx_xml2cpp_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/introspect.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml2cpp.Po@am__quote@
.cpp.o:
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cpp.obj:
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.cpp.lo:
@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am: install-binPROGRAMS
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic clean-libtool ctags distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-binPROGRAMS uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

67
tools/introspect.cpp Normal file
View file

@ -0,0 +1,67 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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
*
*/
#include <signal.h>
#include <unistd.h>
#include <iostream>
#include "introspect.h"
DBus::BusDispatcher dispatcher;
static char* path;
static char* service;
void niam( int sig )
{
DBus::Connection conn = DBus::Connection::SessionBus();
IntrospectedObject io(conn, path, service);
std::cout << io.Introspect();
dispatcher.leave();
}
int main( int argc, char** argv )
{
signal(SIGTERM, niam);
signal(SIGINT, niam);
signal(SIGALRM, niam);
if(argc == 1)
{
std::cerr << std::endl << "Usage: " << argv[0] << " <object_path> [<destination>]" << std::endl << std::endl;
}
else
{
path = argv[1];
service = argc > 1 ? argv[2] : 0;
DBus::default_dispatcher = &dispatcher;
alarm(1);
dispatcher.enter();
}
return 0;
}

40
tools/introspect.h Normal file
View file

@ -0,0 +1,40 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_TOOLS_INTROSPECT_H
#define __DBUSXX_TOOLS_INTROSPECT_H
#include <dbus-c++/dbus-c++.h>
#include <string>
class IntrospectedObject : public DBus::IntrospectableProxy, public DBus::ObjectProxy
{
public:
IntrospectedObject( DBus::Connection& conn, const char* path, const char* service )
: DBus::ObjectProxy(conn, path, service)
{}
};
#endif//__DBUSXX_TOOLS_INTROSPECT_H

742
tools/xml2cpp.cpp Normal file
View file

@ -0,0 +1,742 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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
*
*/
#include "xml2cpp.h"
#include <dbus/dbus.h>
#include <string>
#include <map>
#include <iostream>
#include <fstream>
#include <sstream>
using namespace std;
using namespace DBus;
static const char* tab = " ";
static const char* header = "\n\
/* This file was automatically generated by dbusxx-xml2cpp; DO NOT EDIT! */\n\
\n\
";
static const char* dbus_includes = "\n\
#include <dbus-c++/dbus-c++.h>\n\
\n\
";
typedef map<string,string> TypeCache;
void usage( const char* argv0 )
{
cerr << endl << "Usage: " << argv0 << " <xmlfile> [ --client=<outfile.h> ] [ --adaptor=<outfile.h> ]"
<< endl << endl;
exit(-1);
}
void underscorize( std::string& str )
{
for(unsigned int i = 0; i < str.length(); ++i)
{
if(!isalpha(str[i])) str[i] = '_';
}
}
std::string stub_name( std::string name )
{
underscorize(name);
return "_" + name + "_stub";
}
int char_to_atomic_type( char t )
{
if(strchr("ybnqiuxtdsgavre", t))
return t;
return DBUS_TYPE_INVALID;
}
const char* atomic_type_to_string( char t )
{
static struct { char type; char* name; } atos[] =
{
{ 'y', "DBus::Byte" },
{ 'b', "DBus::Bool" },
{ 'n', "DBus::Int16" },
{ 'q', "DBus::UInt16" },
{ 'i', "DBus::Int32" },
{ 'u', "DBus::UInt32" },
{ 'x', "DBus::Int64" },
{ 't', "DBus::UInt64" },
{ 'd', "DBus::Double" },
{ 's', "DBus::String" },
{ 'o', "DBus::Path" },
{ 'g', "DBus::Signature" },
{ 'v', "DBus::Variant" },
{ '\0', "" }
};
int i;
for(i = 0; atos[i].type; ++i)
{
if(atos[i].type == t) break;
}
return atos[i].name;
}
bool is_atomic_type( const std::string& type )
{
return type.length() == 1 && char_to_atomic_type(type[0]) != DBUS_TYPE_INVALID;
}
void _parse_signature( const std::string& signature, std::string& type, size_t& i )
{
for(; i < signature.length(); ++i)
{
switch(signature[i])
{
case 'a':
{
switch(signature[++i])
{
case '{':
{
type += "DBus::Dict< ";
const char* atom = atomic_type_to_string(signature[++i]);
if(!atom)
{
cerr << "invalid signature" << endl;
exit(-1);
}
type += atom;
type += ", ";
++i;
break;
}
default:
{
type += "DBus::Array< ";
break;
}
}
_parse_signature(signature, type, i);
type += " >";
continue;
}
case '(':
{
type += "DBus::Struct< ";
++i;
_parse_signature(signature, type, i);
type += " >";
continue;
}
case ')':
case '}':
{
return;
}
default:
{
const char* atom = atomic_type_to_string(signature[i]);
if(!atom)
{
cerr << "invalid signature" << endl;
exit(-1);
}
type += atom;
if(signature[i+1] != ')' && signature[i+1] != '}' && i+1 < signature.length())
{
type += ", ";
}
break;
}
}
}
}
std::string signature_to_type( const std::string& signature )
{
std::string type;
size_t i = 0;
_parse_signature(signature, type, i);
return type;
}
void generate_client( Xml::Document& doc, const char* filename )
{
cerr << "writing " << filename << endl;
ofstream file(filename);
if(file.bad())
{
cerr << "unable to write file " << filename << endl;
exit(-1);
}
file << header;
std::string filestring = filename;
underscorize(filestring);
std::string cond_comp = "__dbusxx__" + filestring + "__CLIENT_MARSHAL_H";
file << "#ifndef " << cond_comp << endl;
file << "#define " << cond_comp << endl;
file << dbus_includes;
#if 0
Xml::Node& root = *(doc.root);
Xml::Nodes interfaces = root["interface"];
for(Xml::Nodes::iterator i = interfaces.begin(); i != interfaces.end(); ++i)
{
Xml::Node& iface = **i;
Xml::Nodes methods = iface["method"];
Xml::Nodes signals = iface["signal"];
std::string ifacename = iface.get("name");
std::string ifaceclass = ifacename;
underscorize(ifaceclass);
cerr << "generating code for interface " << ifacename << "..." << endl;
file << "class " << ifaceclass << " : public DBus::InterfaceProxy" << endl
<< "{" << endl
<< "public:" << endl
<< endl
<< tab << ifaceclass << "()" << endl
<< tab << ": DBus::InterfaceProxy(\"" << ifacename << "\")" << endl
<< tab << "{" << endl;
for(Xml::Nodes::iterator si = signals.begin(); si != signals.end(); ++si)
{
Xml::Node& signal = **si;
std::string marshname = "_" + signal.get("name") + "_stub";
file << tab << tab << "connect_signal(" << ifaceclass << ", " << marshname << ");" << endl;
}
file << tab << "}" << endl
<< endl;
for(Xml::Nodes::iterator j = methods.begin(); j != methods.end(); ++j)
{
Xml::Node& method = **j;
std::string methodname = method.get("name");
std::string marshname = "_" + methodname + "_stub";
Xml::Nodes args = method["arg"];
Xml::Nodes args_in = args.select("direction","in");
Xml::Nodes args_out = args.select("direction","out");
file << endl;
if(args_out.size() == 1)
{
std::string ret_type = args_out.front()->get("type");
std::string ret_sig;
if(is_atomic_type(ret_type))
{
ret_sig = atomic_type_to_string(ret_type[0]);
}
else
{
}
file << tab << ret_sig << " " << methodname << "( ";
for(Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai)
{
Xml::Node& a = **ai;
file << "const ";
if(is_atomic_type(a.get("type")))
{
file << atomic_type_to_string(a.get("type")[0]);
}
else
{
}
file << "& " << a.get("name") << ( ai+1 != args_in.end() ? ", " : " " );
}
file << ")" << endl;
}
else
{
file << tab << "void " << methodname << "( args )" << endl;
}
file << tab << "{" << endl
<< tab << tab << "DBus::CallMessage call;" << endl
<< tab << tab << "DBus::MessageIter wi = call.w_iter();" << endl
<< endl;
for(Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai)
{
Xml::Node& arg = **ai;
}
file << tab << tab << "call.member(\"" << methodname << "\");" << endl
<< tab << tab << "DBus::Message ret = invoke_method(call);" << endl
<< tab << tab << "DBus::MessageIter ri = ret.r_iter();" << endl
<< endl;
file << tab << "}" << endl
<< endl;
}
file << "};" << endl
<< endl;
}
#endif
file << "#endif//" << cond_comp << endl;
file.close();
}
void generate_adaptor( Xml::Document& doc, const char* filename )
{
cerr << "writing " << filename << endl;
ofstream file(filename);
if(file.bad())
{
cerr << "unable to write file " << filename << endl;
exit(-1);
}
file << header;
std::string filestring = filename;
underscorize(filestring);
std::string cond_comp = "__dbusxx__" + filestring + "__ADAPTOR_MARSHAL_H";
file << "#ifndef " << cond_comp << endl
<< "#define " << cond_comp << endl;
file << dbus_includes;
Xml::Node& root = *(doc.root);
Xml::Nodes interfaces = root["interface"];
for(Xml::Nodes::iterator i = interfaces.begin(); i != interfaces.end(); ++i)
{
Xml::Node& iface = **i;
Xml::Nodes methods = iface["method"];
Xml::Nodes signals = iface["signal"];
Xml::Nodes ms;
ms.insert(ms.end(), methods.begin(), methods.end());
ms.insert(ms.end(), signals.begin(), signals.end());
std::string ifacename = iface.get("name");
if(ifacename.find("org.freedesktop.DBus") == 0)
{
cerr << "skipping interface " << ifacename << endl;
continue;
}
std::istringstream ss(ifacename);
string nspace;
size_t nspaces = 0;
while(ss.str().find('.', ss.tellg()) != string::npos)
{
getline(ss, nspace, '.');
file << "namespace " << nspace << " {" << endl;
++nspaces;
}
file << endl;
std::string ifaceclass;
getline(ss, ifaceclass);
cerr << "generating code for interface " << ifacename << "..." << endl;
file << "class " << ifaceclass << " : public DBus::InterfaceAdaptor" << endl
<< "{" << endl
<< "public:" << endl
<< endl
<< tab << ifaceclass << "()" << endl
<< tab << ": DBus::InterfaceAdaptor(\"" << ifacename << "\")" << endl
<< tab << "{" << endl;
for(Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi)
{
Xml::Node& method = **mi;
file << tab << tab << "register_method("
<< ifaceclass << ", " << method.get("name") << ", "<< stub_name(method.get("name"))
<< ");" << endl;
}
file << tab << "}" << endl
<< endl;
file << tab << "DBus::IntrospectedInterface* const introspect() const " << endl
<< tab << "{" << endl;
for(Xml::Nodes::iterator mi = ms.begin(); mi != ms.end(); ++mi)
{
Xml::Node& method = **mi;
Xml::Nodes args = method["arg"];
file << tab << tab << "static DBus::IntrospectedArgument " << method.get("name") << "_args[] = " << endl
<< tab << tab << "{" << endl;
for(Xml::Nodes::iterator ai = args.begin(); ai != args.end(); ++ai)
{
Xml::Node& arg = **ai;
file << tab << tab << tab << "{ ";
if(arg.get("name").length())
{
file << "\"" << arg.get("name") << "\", ";
}
else
{
file << "0, ";
}
file << "\"" << arg.get("type") << "\", "
<< ( arg.get("direction") == "in" ? "true" : "false" )
<< " }," << endl;
}
file << tab << tab << tab << "{ 0, 0, 0 }" << endl
<< tab << tab << "};" << endl;
}
file << tab << tab << "static DBus::IntrospectedMethod " << ifaceclass << "_methods[] = " << endl
<< tab << tab << "{" << endl;
for(Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi)
{
Xml::Node& method = **mi;
file << tab << tab << tab << "{ \"" << method.get("name") << "\", " << method.get("name") << "_args }," << endl;
}
file << tab << tab << tab << "{ 0, 0 }" << endl
<< tab << tab << "};" << endl;
file << tab << tab << "static DBus::IntrospectedMethod " << ifaceclass << "_signals[] = " << endl
<< tab << tab << "{" << endl;
for(Xml::Nodes::iterator si = signals.begin(); si != signals.end(); ++si)
{
Xml::Node& method = **si;
file << tab << tab << tab << "{ \"" << method.get("name") << "\", " << method.get("name") << "_args }," << endl;
}
file << tab << tab << tab << "{ 0, 0 }" << endl
<< tab << tab << "};" << endl;
file << tab << tab << "static DBus::IntrospectedInterface " << ifaceclass << "_interface = " << endl
<< tab << tab << "{" << endl
<< tab << tab << tab << "\"" << ifacename << "\"," << endl
<< tab << tab << tab << ifaceclass << "_methods," << endl
<< tab << tab << tab << ifaceclass << "_signals," << endl
<< tab << tab << "};" << endl
<< tab << tab << "return &" << ifaceclass << "_interface;" << endl
<< tab << "}" << endl
<< endl;
file << "public:" << endl
<< endl
<< tab << "/* methods exported by this interface," << endl
<< tab << " * you will have to implement them in your ObjectAdaptor" << endl
<< tab << " */" << endl;
for(Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi)
{
Xml::Node& method = **mi;
Xml::Nodes args = method["arg"];
Xml::Nodes args_in = args.select("direction","in");
Xml::Nodes args_out = args.select("direction","out");
file << tab << "virtual ";
if(args_out.size() == 0 || args_out.size() > 1 )
{
file << "void ";
}
else if(args_out.size() == 1)
{
file << signature_to_type(args_out.front()->get("type")) << " ";
}
file << method.get("name") << "( ";
unsigned int i = 0;
for(Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++i)
{
Xml::Node& arg = **ai;
file << "const " << signature_to_type(arg.get("type")) << "& ";
std::string arg_name = arg.get("name");
if(arg_name.length())
file << arg_name;
if((i+1 != args_in.size() || args_out.size() > 1))
file << ", ";
}
if(args_out.size() > 1)
{
unsigned int i = 0;
for(Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++i)
{
Xml::Node& arg = **ao;
file << signature_to_type(arg.get("type")) << "&";
std::string arg_name = arg.get("name");
if(arg_name.length())
file << " " << arg_name;
if(i+1 != args_out.size())
file << ", ";
}
}
file << " ) = 0;" << endl;
}
file << endl
<< "protected:" << endl
<< endl
<< tab << "/* signals emitted by this interface" << endl
<< tab << " */" << endl;
for(Xml::Nodes::iterator si = signals.begin(); si != signals.end(); ++si)
{
Xml::Node& signal = **si;
Xml::Nodes args = signal["arg"];
file << tab << "void " << signal.get("name") << "( ";
unsigned int i = 0;
for(Xml::Nodes::iterator a = args.begin(); a != args.end(); ++a, ++i)
{
Xml::Node& arg = **a;
file << "const " << signature_to_type(arg.get("type")) << "& arg" << i+1;
if(i+1 != args.size())
file << ", ";
}
file << " )" << endl
<< tab << "{" << endl
<< tab << tab << "DBus::SignalMessage sig(\"" << signal.get("name") <<"\");" << endl;;
if(args.size() > 0)
{
file << tab << tab << "DBus::MessageIter wi = sig.w_iter();" << endl;
for(unsigned int i = 0; i < args.size(); ++i)
{
file << tab << tab << "wi << arg" << i+1 << ";" << endl;
}
}
file << tab << tab << "emit_signal(sig);" << endl
<< tab << "}" << endl;
}
file << endl
<< "private:" << endl
<< endl
<< tab << "/* marshalers (to unpack the DBus message before calling the actual interface method)" << endl
<< tab << " */" << endl;
for(Xml::Nodes::iterator mi = methods.begin(); mi != methods.end(); ++mi)
{
Xml::Node& method = **mi;
Xml::Nodes args = method["arg"];
Xml::Nodes args_in = args.select("direction","in");
Xml::Nodes args_out = args.select("direction","out");
file << tab << "DBus::Message " << stub_name(method.get("name")) << "( const DBus::CallMessage& call )" << endl
<< tab << "{" << endl
<< tab << tab << "DBus::MessageIter ri = call.r_iter();" << endl
<< endl;
unsigned int i = 1;
for(Xml::Nodes::iterator ai = args_in.begin(); ai != args_in.end(); ++ai, ++i)
{
Xml::Node& arg = **ai;
file << tab << tab << signature_to_type(arg.get("type")) << " argin" << i << ";"
<< " ri >> argin" << i << ";" << endl;
}
if(args_out.size() == 0)
{
file << tab << tab;
}
else if(args_out.size() == 1)
{
file << tab << tab << signature_to_type(args_out.front()->get("type")) << " argout1 = ";
}
else
{
unsigned int i = 1;
for(Xml::Nodes::iterator ao = args_out.begin(); ao != args_out.end(); ++ao, ++i)
{
Xml::Node& arg = **ao;
file << tab << tab << signature_to_type(arg.get("type")) << " argout" << i << ";" << endl;
}
file << tab << tab;
}
file << method.get("name") << "(";
for(unsigned int i = 0; i < args_in.size(); ++i)
{
file << "argin" << i+1;
if((i+1 != args_in.size() || args_out.size() > 1))
file << ", ";
}
if(args_out.size() > 1)
for(unsigned int i = 0; i < args_out.size(); ++i)
{
file << "argout" << i+1;
if(i+1 != args_out.size())
file << ", ";
}
file << ");" << endl;
file << tab << tab << "DBus::ReturnMessage reply(call);" << endl;
if(args_out.size() > 0)
{
file << tab << tab << "DBus::MessageIter wi = reply.w_iter();" << endl;
for(unsigned int i = 0; i < args_out.size(); ++i)
{
file << tab << tab << "wi << argout" << i+1 << ";" << endl;
}
}
file << tab << tab << "return reply;" << endl;
file << tab << "}" << endl;
}
file << "};" << endl
<< endl;
for(size_t i = 0; i < nspaces; ++i)
{
file << "} ";
}
file << endl;
}
file << "#endif//" << cond_comp << endl;
file.close();
}
int main( int argc, char** argv )
{
if(argc < 2)
{
usage(argv[0]);
}
bool client_mode, adaptor_mode;
char *client, *adaptor;
client_mode = false;
client = 0;
adaptor_mode = false;
adaptor = 0;
for(int a = 1; a < argc; ++a)
{
if(!strncmp(argv[a], "--client=", 9))
{
client_mode = true;
client = argv[a] +9;
}
else
if(!strncmp(argv[a], "--adaptor=", 10))
{
adaptor_mode = true;
adaptor = argv[a] +10;
}
}
if(!client_mode && !adaptor_mode) usage(argv[0]);
ifstream xmlfile(argv[1]);
if(xmlfile.bad())
{
cerr << "unable to open file " << argv[1] << endl;
return -1;
}
Xml::Document doc;
try
{
xmlfile >> doc;
//cout << doc.to_xml();
}
catch(Xml::Error& e)
{
cerr << "error parsing " << argv[1] << ": " << e.what() << endl;
return -1;
}
if(!doc.root)
{
cerr << "empty document" << endl;
return -1;
}
if(client_mode) generate_client(doc, client);
if(adaptor_mode) generate_adaptor(doc, adaptor);
return 0;
}

31
tools/xml2cpp.h Normal file
View file

@ -0,0 +1,31 @@
/*
*
* D-Bus++ - C++ bindings for DBus
*
* Copyright (C) 2005-2006 Paolo Durante <shackan@gmail.com>
*
*
* 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 __DBUSXX_TOOLS_XML2CPP_H
#define __DBUSXX_TOOLS_XML2CPP_H
#include <dbus-c++/dbus-c++.h>
#include <dbus/dbus.h>
#endif//__DBUSXX_TOOLS_XML2CPP_H