DBus-1-TQt  1.0
TQT_DBusConnectionManager Class Reference
+ Collaboration diagram for TQT_DBusConnectionManager:

List of all members.

Public Member Functions

 TQT_DBusConnectionManager ()
 ~TQT_DBusConnectionManager ()
void bindToApplication ()
TQT_DBusConnectionPrivateconnection (const TQString &name) const
void removeConnection (const TQString &name)
void setConnection (const TQString &name, TQT_DBusConnectionPrivate *c)

Static Public Member Functions

static TQT_DBusConnectionManagerinstance ()

Private Types

typedef TQMap< TQString,
TQT_DBusConnectionPrivate * > 
ConnectionHash

Private Attributes

TQT_DBusConnectionPrivatedefault_connection
ConnectionHash connectionHash

Static Private Attributes

static TQT_DBusConnectionManagermanagerInstance = 0

Detailed Description

Definition at line 36 of file tqdbusconnection.cpp.


Member Typedef Documentation

Definition at line 54 of file tqdbusconnection.cpp.


Constructor & Destructor Documentation

Definition at line 39 of file tqdbusconnection.cpp.

+ Here is the caller graph for this function:

Definition at line 94 of file tqdbusconnection.cpp.

References connectionHash, and default_connection.

{
    if (default_connection) {
        delete default_connection;
        default_connection = 0;
    }
/* FIXME-QT4
    for (TQHash<TQString, TQT_DBusConnectionPrivate *>::const_iterator it = connectionHash.constBegin();
         it != connectionHash.constEnd(); ++it) {
             delete it.value();
    }*/
    for (ConnectionHash::const_iterator it = connectionHash.constBegin();
         it != connectionHash.constEnd(); ++it)
    {
        delete it.data();
    }
    connectionHash.clear();
}

Member Function Documentation

Definition at line 113 of file tqdbusconnection.cpp.

References TQT_DBusConnectionPrivate::bindToApplication(), connectionHash, and default_connection.

{
    if (default_connection) {
        default_connection->bindToApplication();
    }
/* FIXME-QT4
    for (TQHash<TQString, TQT_DBusConnectionPrivate *>::const_iterator it = connectionHash.constBegin();
         it != connectionHash.constEnd(); ++it) {
             (*it)->bindToApplication();
    }*/
    for (ConnectionHash::const_iterator it = connectionHash.constBegin();
         it != connectionHash.constEnd(); ++it)
    {
        it.data()->bindToApplication();
    }
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 66 of file tqdbusconnection.cpp.

References connectionHash, default_connection, and TQT_DBusConnection::default_connection_name.

{
    if (name == TQString::fromLatin1(TQT_DBusConnection::default_connection_name))
        return default_connection;

    ConnectionHash::const_iterator it = connectionHash.find(name);

    return (it != connectionHash.end() ? it.data() : 0);
}

+ Here is the caller graph for this function:

Definition at line 46 of file tqdbusconnection.cpp.

References managerInstance, and TQT_DBusConnectionManager().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void TQT_DBusConnectionManager::removeConnection ( const TQString &  name)

Definition at line 76 of file tqdbusconnection.cpp.

References connectionHash, default_connection, TQT_DBusConnection::default_connection_name, Atomic::deref(), and TQT_DBusConnectionPrivate::ref.

{
    TQT_DBusConnectionPrivate *d = 0;
    if (name == TQString::fromLatin1(TQT_DBusConnection::default_connection_name)) {
        d = default_connection;
        default_connection = 0;
    } else {
        ConnectionHash::iterator it = connectionHash.find(name);
        if (it == connectionHash.end())
            return;

        d = it.data();
        connectionHash.erase(it);
    }
    if (!d->ref.deref())
        delete d;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void TQT_DBusConnectionManager::setConnection ( const TQString &  name,
TQT_DBusConnectionPrivate c 
)

Definition at line 135 of file tqdbusconnection.cpp.

References connectionHash, default_connection, and TQT_DBusConnection::default_connection_name.

{
    if (name == TQString::fromLatin1(TQT_DBusConnection::default_connection_name))
        default_connection = c;
    else
        connectionHash[name] = c;
}

+ Here is the caller graph for this function:


Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines