- NO FUNCTIONAL CODE CHANGES!!!!

- changed code formating from tabs to spaces and others
- used astyle with this option:
  --style=ansi --indent=spaces=2 -M --pad-oper --unpad-paren --pad-header --align-pointer=name --lineend=linux
This commit is contained in:
Andreas Volz 2011-11-28 12:44:11 +01:00
parent b100e9d32a
commit 1c8e43e6d6
76 changed files with 5691 additions and 5492 deletions

View file

@ -46,7 +46,10 @@ private:
{
public:
InspectRecord() { add(name); }
InspectRecord()
{
add(name);
}
Gtk::TreeModelColumn<Glib::ustring> name;
};

View file

@ -33,7 +33,8 @@
#include "message.h"
#include "pendingcall.h"
namespace DBus {
namespace DBus
{
class Connection;

View file

@ -27,7 +27,8 @@
#include "api.h"
namespace DBus {
namespace DBus
{
typedef void (*LogFunction)(const char *format, ...);

View file

@ -29,7 +29,8 @@
#include "connection.h"
#include "eventloop.h"
namespace DBus {
namespace DBus
{
class DXXAPI Timeout
{

View file

@ -31,9 +31,11 @@
#include "dispatcher.h"
#include "Ecore.h"
namespace DBus {
namespace DBus
{
namespace Ecore {
namespace Ecore
{
class BusDispatcher;

View file

@ -30,7 +30,8 @@
#include <exception>
namespace DBus {
namespace DBus
{
class Message;
class InternalError;

View file

@ -31,7 +31,8 @@
#include "util.h"
#include "eventloop.h"
namespace DBus {
namespace DBus
{
/*
* Glue between the event loop and the DBus library

View file

@ -31,7 +31,8 @@
#include "api.h"
#include "util.h"
namespace DBus {
namespace DBus
{
/*
* these Default *classes implement a very simple event loop which
@ -50,17 +51,41 @@ public:
virtual ~DefaultTimeout();
bool enabled(){ return _enabled; }
void enabled(bool e){ _enabled = e; }
bool enabled()
{
return _enabled;
}
void enabled(bool e)
{
_enabled = e;
}
int interval(){ return _interval; }
void interval(int i){ _interval = i; }
int interval()
{
return _interval;
}
void interval(int i)
{
_interval = i;
}
bool repeat(){ return _repeat; }
void repeat(bool r){ _repeat = r; }
bool repeat()
{
return _repeat;
}
void repeat(bool r)
{
_repeat = r;
}
void *data(){ return _data; }
void data(void *d){ _data = d; }
void *data()
{
return _data;
}
void data(void *d)
{
_data = d;
}
Slot<void, DefaultTimeout &> expired;
@ -90,18 +115,42 @@ public:
virtual ~DefaultWatch();
bool enabled(){ return _enabled; }
void enabled(bool e){ _enabled = e; }
bool enabled()
{
return _enabled;
}
void enabled(bool e)
{
_enabled = e;
}
int descriptor(){ return _fd; }
int descriptor()
{
return _fd;
}
int flags(){ return _flags; }
void flags(int f){ _flags = f; }
int flags()
{
return _flags;
}
void flags(int f)
{
_flags = f;
}
int state(){ return _state; }
int state()
{
return _state;
}
void *data(){ return _data; }
void data(void *d){ _data = d; }
void *data()
{
return _data;
}
void data(void *d)
{
_data = d;
}
Slot<void, DefaultWatch &> ready;

View file

@ -30,9 +30,11 @@
#include "api.h"
#include "dispatcher.h"
namespace DBus {
namespace DBus
{
namespace Glib {
namespace Glib
{
class BusDispatcher;

View file

@ -33,7 +33,8 @@
#include "message.h"
namespace DBus {
namespace DBus
{
//todo: this should belong to to properties.h
struct DXXAPI PropertyData

View file

@ -28,7 +28,8 @@
#include "api.h"
#include "interface.h"
namespace DBus {
namespace DBus
{
struct DXXAPI IntrospectedArgument
{

View file

@ -31,7 +31,8 @@
#include "api.h"
#include "util.h"
namespace DBus {
namespace DBus
{
class Message;
class ErrorMessage;

View file

@ -34,7 +34,8 @@
#include "message.h"
#include "types.h"
namespace DBus {
namespace DBus
{
class DXXAPI Object
{

View file

@ -29,7 +29,8 @@
#include "util.h"
#include "message.h"
namespace DBus {
namespace DBus
{
class Connection;

View file

@ -30,7 +30,8 @@
/* STD */
#include <cstdlib>
namespace DBus {
namespace DBus
{
class DXXAPI Pipe
{

View file

@ -29,7 +29,8 @@
#include "types.h"
#include "interface.h"
namespace DBus {
namespace DBus
{
template <typename T>
class PropertyAdaptor

View file

@ -28,7 +28,8 @@
#include "api.h"
#include "util.h"
namespace DBus {
namespace DBus
{
template <class T>
RefPtrI<T>::RefPtrI(T *ptr)

View file

@ -33,7 +33,8 @@
#include "util.h"
#include "dispatcher.h"
namespace DBus {
namespace DBus
{
class Server;

View file

@ -35,7 +35,8 @@
#include "message.h"
#include "error.h"
namespace DBus {
namespace DBus
{
struct DXXAPI Path : public std::string
{
@ -121,8 +122,22 @@ template <
>
struct Struct
{
T1 _1; T2 _2; T3 _3; T4 _4; T5 _5; T6 _6; T7 _7; T8 _8; T9 _9;
T10 _10; T11 _11; T12 _12; T13 _13; T14 _14; T15 _15; T16 _16;
T1 _1;
T2 _2;
T3 _3;
T4 _4;
T5 _5;
T6 _6;
T7 _7;
T8 _8;
T9 _9;
T10 _10;
T11 _11;
T12 _12;
T13 _13;
T14 _14;
T15 _15;
T16 _16;
};
template<typename K, typename V>
@ -141,28 +156,122 @@ struct type
}
};
template <> struct type<Variant> { static std::string sig(){ return "v"; } };
template <> struct type<uint8_t> { static std::string sig(){ return "y"; } };
template <> struct type<bool> { static std::string sig(){ return "b"; } };
template <> struct type<int16_t> { static std::string sig(){ return "n"; } };
template <> struct type<uint16_t> { static std::string sig(){ return "q"; } };
template <> struct type<int32_t> { static std::string sig(){ return "i"; } };
template <> struct type<uint32_t> { static std::string sig(){ return "u"; } };
template <> struct type<int64_t> { static std::string sig(){ return "x"; } };
template <> struct type<uint64_t> { static std::string sig(){ return "t"; } };
template <> struct type<double> { static std::string sig(){ return "d"; } };
template <> struct type<std::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 <> struct type<Variant>
{
static std::string sig()
{
return "v";
}
};
template <> struct type<uint8_t>
{
static std::string sig()
{
return "y";
}
};
template <> struct type<bool>
{
static std::string sig()
{
return "b";
}
};
template <> struct type<int16_t>
{
static std::string sig()
{
return "n";
}
};
template <> struct type<uint16_t>
{
static std::string sig()
{
return "q";
}
};
template <> struct type<int32_t>
{
static std::string sig()
{
return "i";
}
};
template <> struct type<uint32_t>
{
static std::string sig()
{
return "u";
}
};
template <> struct type<int64_t>
{
static std::string sig()
{
return "x";
}
};
template <> struct type<uint64_t>
{
static std::string sig()
{
return "t";
}
};
template <> struct type<double>
{
static std::string sig()
{
return "d";
}
};
template <> struct type<std::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(); } };
{
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() + "}"; } };
{
static std::string sig()
{
return "a{" + type<K>::sig() + type<V>::sig() + "}";
}
};
template <
typename T1,
@ -490,7 +599,8 @@ inline DBus::MessageIter &operator >> (DBus::MessageIter &iter, std::map<K,V>& v
while (!mit.at_end())
{
K key; V value;
K key;
V value;
DBus::MessageIter eit = mit.recurse();

View file

@ -33,7 +33,8 @@
#include "api.h"
#include "debug.h"
namespace DBus {
namespace DBus
{
/*
* Very simple reference counting
@ -284,7 +285,8 @@ public:
private:
C *_c; M _m;
C *_c;
M _m;
};
/// create std::string from any number

View file

@ -338,7 +338,8 @@ void Connection::remove_match(const char *rule,
debug_log("%s: removed match rule %s", unique_name(), rule);
if (e) {
if (e)
{
if (throw_on_error)
throw Error(e);
else

View file

@ -38,7 +38,8 @@
#include <string>
namespace DBus {
namespace DBus
{
struct DXXAPILOCAL Connection::Private
{

View file

@ -267,7 +267,8 @@ void DBus::_init_threading(
)
{
#ifndef DBUS_HAS_RECURSIVE_MUTEX
DBusThreadFunctions functions = {
DBusThreadFunctions functions =
{
DBUS_THREAD_FUNCTIONS_MUTEX_NEW_MASK |
DBUS_THREAD_FUNCTIONS_MUTEX_FREE_MASK |
DBUS_THREAD_FUNCTIONS_MUTEX_LOCK_MASK |
@ -290,7 +291,8 @@ void DBus::_init_threading(
(DBusCondVarWakeAllFunction) c6
};
#else
DBusThreadFunctions functions = {
DBusThreadFunctions functions =
{
DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_NEW_MASK |
DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_FREE_MASK |
DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_LOCK_MASK |

View file

@ -35,7 +35,8 @@
#include "internalerror.h"
namespace DBus {
namespace DBus
{
struct DXXAPILOCAL Dispatcher::Private
{

View file

@ -172,7 +172,8 @@ void DefaultMainLoop::dispatch()
}
}
if(_fdunlock){
if (_fdunlock)
{
fds[nfd].fd = _fdunlock[0];
fds[nfd].events = POLLIN | POLLOUT | POLLPRI ;
fds[nfd].revents = 0;

View file

@ -109,7 +109,8 @@ static gboolean watch_dispatch(GSource *source, GSourceFunc callback, gpointer d
return cb;
}
static GSourceFuncs watch_funcs = {
static GSourceFuncs watch_funcs =
{
watch_prepare,
watch_check,
watch_dispatch,
@ -233,7 +234,8 @@ dispatcher_dispatch(GSource *source,
return TRUE;
}
static const GSourceFuncs dispatcher_funcs = {
static const GSourceFuncs dispatcher_funcs =
{
dispatcher_prepare,
dispatcher_check,
dispatcher_dispatch,

View file

@ -33,7 +33,8 @@
#include <dbus/dbus.h>
namespace DBus {
namespace DBus
{
struct DXXAPI InternalError
{

View file

@ -34,7 +34,8 @@
#include <dbus/dbus.h>
namespace DBus {
namespace DBus
{
struct DXXAPILOCAL Message::Private
{

View file

@ -34,7 +34,8 @@
#include <dbus/dbus.h>
namespace DBus {
namespace DBus
{
struct DXXAPILOCAL PendingCall::Private
{

View file

@ -35,7 +35,8 @@
#include <dbus/dbus.h>
namespace DBus {
namespace DBus
{
struct DXXAPILOCAL Server::Private
{

View file

@ -59,7 +59,11 @@ string stub_name(string name)
const char *atomic_type_to_string(char t)
{
static struct { char type; const char *name; } atos[] =
static struct
{
char type;
const char *name;
} atos[] =
{
{ 'y', "uint8_t" },
{ 'b', "bool" },

View file

@ -36,9 +36,11 @@
#include <iostream>
#include <sstream>
namespace DBus {
namespace DBus
{
namespace Xml {
namespace Xml
{
class Error : public std::exception
{

View file

@ -84,8 +84,7 @@ int main(int argc, char ** argv)
proxy_mode = true;
proxy = argv[a] + 8;
}
else
if (!strncmp(argv[a], "--adaptor=", 10))
else if (!strncmp(argv[a], "--adaptor=", 10))
{
adaptor_mode = true;
adaptor = argv[a] + 10;