src/dbus/qdbusconnection.cpp
changeset 37 758a864f9613
parent 33 3e2da88830cd
equal deleted inserted replaced
36:ef0373b55136 37:758a864f9613
   171     connection.
   171     connection.
   172 
   172 
   173     The connection is then torn down using the disconnectFromBus()
   173     The connection is then torn down using the disconnectFromBus()
   174     function.
   174     function.
   175 
   175 
       
   176     Once disconnected, calling connectToBus() will not reestablish a
       
   177     connection, you must create a new QDBusConnection instance.
       
   178 
   176     As a convenience for the two most common connection types, the
   179     As a convenience for the two most common connection types, the
   177     sessionBus() and systemBus() functions return open connections to
   180     sessionBus() and systemBus() functions return open connections to
   178     the session server daemon and the system server daemon,
   181     the session server daemon and the system server daemon,
   179     respectively. Those connections are opened when first used and are
   182     respectively. Those connections are opened when first used and are
   180     closed when the QCoreApplication destructor is run.
   183     closed when the QCoreApplication destructor is run.
   207     \value ExportAdaptors                       export the contents of adaptors found in this object
   210     \value ExportAdaptors                       export the contents of adaptors found in this object
   208 
   211 
   209     \value ExportScriptableSlots                export this object's scriptable slots
   212     \value ExportScriptableSlots                export this object's scriptable slots
   210     \value ExportScriptableSignals              export this object's scriptable signals
   213     \value ExportScriptableSignals              export this object's scriptable signals
   211     \value ExportScriptableProperties           export this object's scriptable properties
   214     \value ExportScriptableProperties           export this object's scriptable properties
       
   215     \value ExportScriptableInvokables           export this object's scriptable invokables
   212     \value ExportScriptableContents             shorthand form for ExportScriptableSlots |
   216     \value ExportScriptableContents             shorthand form for ExportScriptableSlots |
   213                                                 ExportScriptableSignals |
   217                                                 ExportScriptableSignals |
   214                                                 ExportScriptableProperties
   218                                                 ExportScriptableProperties
   215 
   219 
   216     \value ExportNonScriptableSlots             export this object's non-scriptable slots
   220     \value ExportNonScriptableSlots             export this object's non-scriptable slots
   217     \value ExportNonScriptableSignals           export this object's non-scriptable signals
   221     \value ExportNonScriptableSignals           export this object's non-scriptable signals
   218     \value ExportNonScriptableProperties        export this object's non-scriptable properties
   222     \value ExportNonScriptableProperties        export this object's non-scriptable properties
       
   223     \value ExportNonScriptableInvokables        export this object's non-scriptable invokables
   219     \value ExportNonScriptableContents          shorthand form for ExportNonScriptableSlots |
   224     \value ExportNonScriptableContents          shorthand form for ExportNonScriptableSlots |
   220                                                 ExportNonScriptableSignals |
   225                                                 ExportNonScriptableSignals |
   221                                                 ExportNonScriptableProperties
   226                                                 ExportNonScriptableProperties
   222 
   227 
   223     \value ExportAllSlots                       export all of this object's slots
   228     \value ExportAllSlots                       export all of this object's slots
   224     \value ExportAllSignals                     export all of this object's signals
   229     \value ExportAllSignals                     export all of this object's signals
   225     \value ExportAllProperties                  export all of this object's properties
   230     \value ExportAllProperties                  export all of this object's properties
       
   231     \value ExportAllInvokables                  export all of this object's invokables
   226     \value ExportAllContents                    export all of this object's contents
   232     \value ExportAllContents                    export all of this object's contents
   227 
       
   228     \value ExportChildObjects                   export this object's child objects
   233     \value ExportChildObjects                   export this object's child objects
   229 
   234 
   230     \sa registerObject(), QDBusAbstractAdaptor, {usingadaptors.html}{Using adaptors}
   235     \sa registerObject(), QDBusAbstractAdaptor, {usingadaptors.html}{Using adaptors}
   231 */
   236 */
   232 
   237 
   851     return d->busService;
   856     return d->busService;
   852 }
   857 }
   853 
   858 
   854 /*!
   859 /*!
   855     Returns true if this QDBusConnection object is connected.
   860     Returns true if this QDBusConnection object is connected.
   856 
       
   857     If it isn't connected, calling connectToBus() on the same
       
   858     connection name will not make be connected. You need to call the
       
   859     QDBusConnection constructor again.
       
   860 */
   861 */
   861 bool QDBusConnection::isConnected() const
   862 bool QDBusConnection::isConnected() const
   862 {
   863 {
   863     return d && d->connection && q_dbus_connection_get_is_connected(d->connection);
   864     return d && d->connection && q_dbus_connection_get_is_connected(d->connection);
   864 }
   865 }
   914     return d ? d->name : QString();
   915     return d ? d->name : QString();
   915 }
   916 }
   916 
   917 
   917 /*!
   918 /*!
   918     Attempts to register the \a serviceName on the D-Bus server and
   919     Attempts to register the \a serviceName on the D-Bus server and
   919     returns true if the registration succeded. The registration will
   920     returns true if the registration succeeded. The registration will
   920     fail if the name is already registered by another application.
   921     fail if the name is already registered by another application.
   921 
   922 
   922     \sa unregisterService(), QDBusConnectionInterface::registerService()
   923     \sa unregisterService(), QDBusConnectionInterface::registerService()
   923 */
   924 */
   924 bool QDBusConnection::registerService(const QString &serviceName)
   925 bool QDBusConnection::registerService(const QString &serviceName)