summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHolger Schroeder <holger.schroeder.ext@basyskom.de>2010-02-12 13:26:08 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-02-12 13:26:08 (GMT)
commit3fb70a8beea1dda58e50831edc5dd9073b899f72 (patch)
treef16a7764be70e1dfee16233c08645862529e64eb /src
parentc6fa4e8647dd16c6b864fce5047aadaee005b0f9 (diff)
downloadQt-3fb70a8beea1dda58e50831edc5dd9073b899f72.zip
Qt-3fb70a8beea1dda58e50831edc5dd9073b899f72.tar.gz
Qt-3fb70a8beea1dda58e50831edc5dd9073b899f72.tar.bz2
update according to Thiago's comments.
Merge-request: 2307 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/dbus/qdbusmessage.cpp34
-rw-r--r--src/dbus/qdbusmessage.h4
-rw-r--r--src/dbus/qdbusmessage_p.h3
3 files changed, 28 insertions, 13 deletions
diff --git a/src/dbus/qdbusmessage.cpp b/src/dbus/qdbusmessage.cpp
index f9be783..79c7644 100644
--- a/src/dbus/qdbusmessage.cpp
+++ b/src/dbus/qdbusmessage.cpp
@@ -63,7 +63,7 @@ static inline const char *data(const QByteArray &arr)
QDBusMessagePrivate::QDBusMessagePrivate()
: msg(0), reply(0), type(DBUS_MESSAGE_TYPE_INVALID),
timeout(-1), localReply(0), ref(1), delayedReply(false), localMessage(false),
- parametersValidated(false), autoStart(true)
+ parametersValidated(false), autoStartService(true)
{
}
@@ -129,7 +129,7 @@ DBusMessage *QDBusMessagePrivate::toDBusMessage(const QDBusMessage &message, QDB
msg = q_dbus_message_new_method_call(data(d_ptr->service.toUtf8()), d_ptr->path.toUtf8(),
data(d_ptr->interface.toUtf8()), d_ptr->name.toUtf8());
- q_dbus_message_set_auto_start( msg, d_ptr->autoStart );
+ q_dbus_message_set_auto_start( msg, d_ptr->autoStartService );
break;
case DBUS_MESSAGE_TYPE_METHOD_RETURN:
msg = q_dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_RETURN);
@@ -647,25 +647,41 @@ bool QDBusMessage::isDelayedReply() const
/*!
Sets whether this message will have the auto start flag.
This flag only makes sense for method call messages. For
- these messages it tells the dbus server to either auto
+ these messages it tells the D-Bus server to either auto
start the service responsible for the service name, or
not to auto start it.
- This flag is true by default.
+ By default this flag is true, i.e. a service is autostarted.
+ This means:
+
+ When the service that this method call is sent to is already
+ running, the method call is sent to it. If the service is not
+ running yet, the D-Bus daemon is requested to autostart the
+ service that is assigned to this service name. This is
+ handled by .service files that are placed in a directory known
+ to the D-Bus server. These files then each contain a service
+ name and the path to a program that should be executed when
+ this service name is requested.
+
+ \since 4.7
*/
-void QDBusMessage::setAutoStart(bool enable) const
+void QDBusMessage::setAutoStartService(bool enable)
{
- d_ptr->autoStart = enable;
+ d_ptr->autoStartService = enable;
}
/*!
- Returns the auto start flag, as set by setAutoStart(). By default, this
+ Returns the auto start flag, as set by setAutoStartService(). By default, this
flag is true, which means QtDBus will auto start a service, if it is
not running already.
+
+ \sa setAutoStartService()
+
+ \since 4.7
*/
-bool QDBusMessage::isAutoStart() const
+bool QDBusMessage::autoStartService() const
{
- return d_ptr->autoStart;
+ return d_ptr->autoStartService;
}
/*!
diff --git a/src/dbus/qdbusmessage.h b/src/dbus/qdbusmessage.h
index 8106238..6df5215 100644
--- a/src/dbus/qdbusmessage.h
+++ b/src/dbus/qdbusmessage.h
@@ -104,8 +104,8 @@ public:
void setDelayedReply(bool enable) const;
bool isDelayedReply() const;
- void setAutoStart(bool enable) const;
- bool isAutoStart() const;
+ void setAutoStartService(bool enable);
+ bool autoStartService() const;
void setArguments(const QList<QVariant> &arguments);
QList<QVariant> arguments() const;
diff --git a/src/dbus/qdbusmessage_p.h b/src/dbus/qdbusmessage_p.h
index eb27562..b6da4a5 100644
--- a/src/dbus/qdbusmessage_p.h
+++ b/src/dbus/qdbusmessage_p.h
@@ -85,8 +85,7 @@ public:
mutable uint delayedReply : 1;
uint localMessage : 1;
mutable uint parametersValidated : 1;
-
- mutable uint autoStart : 1;
+ uint autoStartService : 1;
static void setParametersValidated(QDBusMessage &msg, bool enable)
{ msg.d_ptr->parametersValidated = enable; }