Public Member Functions | Static Public Member Functions | Private Types | Private Attributes | Static Private Attributes

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

TQT_DBusConnectionManager::TQT_DBusConnectionManager (  )  [inline]

Definition at line 39 of file tqdbusconnection.cpp.

Here is the caller graph for this function:

TQT_DBusConnectionManager::~TQT_DBusConnectionManager (  ) 

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

void TQT_DBusConnectionManager::bindToApplication (  ) 

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:

TQT_DBusConnectionPrivate * TQT_DBusConnectionManager::connection ( const TQString &  name  )  const

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:

static TQT_DBusConnectionManager* TQT_DBusConnectionManager::instance (  )  [inline, static]

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

Definition at line 55 of file tqdbusconnection.cpp.

Definition at line 52 of file tqdbusconnection.cpp.

Definition at line 57 of file tqdbusconnection.cpp.


The documentation for this class was generated from the following file: