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

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

◆ ConnectionHash

Definition at line 54 of file tqdbusconnection.cpp.

Constructor & Destructor Documentation

◆ TQT_DBusConnectionManager()

TQT_DBusConnectionManager::TQT_DBusConnectionManager ( )
inline

Definition at line 39 of file tqdbusconnection.cpp.

TQT_DBusConnectionPrivate * default_connection
+ Here is the caller graph for this function:

◆ ~TQT_DBusConnectionManager()

TQT_DBusConnectionManager::~TQT_DBusConnectionManager ( )

Definition at line 94 of file tqdbusconnection.cpp.

95{
97 delete default_connection;
99 }
100/* FIXME-QT4
101 for (TQHash<TQString, TQT_DBusConnectionPrivate *>::const_iterator it = connectionHash.constBegin();
102 it != connectionHash.constEnd(); ++it) {
103 delete it.value();
104 }*/
105 for (ConnectionHash::const_iterator it = connectionHash.constBegin();
106 it != connectionHash.constEnd(); ++it)
107 {
108 delete it.data();
109 }
110 connectionHash.clear();
111}

References connectionHash, and default_connection.

Member Function Documentation

◆ bindToApplication()

void TQT_DBusConnectionManager::bindToApplication ( )

Definition at line 113 of file tqdbusconnection.cpp.

114{
115 if (default_connection) {
117 }
118/* FIXME-QT4
119 for (TQHash<TQString, TQT_DBusConnectionPrivate *>::const_iterator it = connectionHash.constBegin();
120 it != connectionHash.constEnd(); ++it) {
121 (*it)->bindToApplication();
122 }*/
123 for (ConnectionHash::const_iterator it = connectionHash.constBegin();
124 it != connectionHash.constEnd(); ++it)
125 {
126 it.data()->bindToApplication();
127 }
128}

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ connection()

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

Definition at line 66 of file tqdbusconnection.cpp.

67{
68 if (name == TQString::fromLatin1(TQT_DBusConnection::default_connection_name))
69 return default_connection;
70
71 ConnectionHash::const_iterator it = connectionHash.find(name);
72
73 return (it != connectionHash.end() ? it.data() : 0);
74}
static const char * default_connection_name

References connectionHash, default_connection, and TQT_DBusConnection::default_connection_name.

+ Here is the caller graph for this function:

◆ instance()

static TQT_DBusConnectionManager * TQT_DBusConnectionManager::instance ( )
inlinestatic

Definition at line 46 of file tqdbusconnection.cpp.

46 {
48 return managerInstance;
49 }
static TQT_DBusConnectionManager * managerInstance

References managerInstance, and TQT_DBusConnectionManager().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeConnection()

void TQT_DBusConnectionManager::removeConnection ( const TQString &  name)

Definition at line 76 of file tqdbusconnection.cpp.

77{
79 if (name == TQString::fromLatin1(TQT_DBusConnection::default_connection_name)) {
82 } else {
83 ConnectionHash::iterator it = connectionHash.find(name);
84 if (it == connectionHash.end())
85 return;
86
87 d = it.data();
88 connectionHash.erase(it);
89 }
90 if (!d->ref.deref())
91 delete d;
92}
bool deref()

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setConnection()

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

Definition at line 135 of file tqdbusconnection.cpp.

136{
137 if (name == TQString::fromLatin1(TQT_DBusConnection::default_connection_name))
139 else
140 connectionHash[name] = c;
141}

References connectionHash, default_connection, and TQT_DBusConnection::default_connection_name.

+ Here is the caller graph for this function:

Member Data Documentation

◆ connectionHash

ConnectionHash TQT_DBusConnectionManager::connectionHash
private

Definition at line 55 of file tqdbusconnection.cpp.

◆ default_connection

TQT_DBusConnectionPrivate* TQT_DBusConnectionManager::default_connection
private

Definition at line 52 of file tqdbusconnection.cpp.

◆ managerInstance

TQT_DBusConnectionManager * TQT_DBusConnectionManager::managerInstance = 0
staticprivate

Definition at line 57 of file tqdbusconnection.cpp.


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