Detailed Description
The QAbstractIpcInterfaceGroupManager class provides a method to discover the active IPC interfaces and server interface groups.
This class is used to query which IPC groups and interfaces are currently present in the system, using groups() and interfaces() respectively. It can also be used to receive notification of when IPC groups are added to or removed from the system, using groupAdded() and groupRemoved() respectively.
Each server interface group has a unique name, such as modem, voip, etc. Within each group is a list of interfaces for functionality areas, which have names such as QNetworkRegistration, QSMSSender, etc.
Interface names correspond to class names elsewhere in the Qt Extended API's. To use an interface, the caller creates an instance of the corresponding class. The caller can specify an explicit group name, if more than one group implements the same interface, or leave the group name empty to use the default group for that interface.
See the documentation for QAbstractIpcInterface for more information on writing and using interface classes.
See also QAbstractIpcInterface and QAbstractIpcInterfaceGroup.
Member Function Documentation
QAbstractIpcInterfaceGroupManager::QAbstractIpcInterfaceGroupManager ( const QString & valueSpaceLocation, QObject * parent = 0 )
Construct a new server interface group manager and attach it to parent.
The valueSpaceLocation parameter specifies the location in the value space to place all information about interfaces. Subclasses such as QCommServiceManager will set this to a particular value meeting their requirements.
See also QCommServiceManager.
QAbstractIpcInterfaceGroupManager::QAbstractIpcInterfaceGroupManager ( const QString & valueSpaceLocation, const QString & interface, QObject * parent = 0 )
Construct a new server interface group manager and attach it to parent.
The valueSpaceLocation parameter specifies the location in the value space to place all information about interfaces. Subclasses such as QCommServiceManager will set this to a particular value meeting their requirements.
In some use cases it might be only necessary to monitor the groups which support a particular interface. This constructor's additional interface parameter acts as such a filter. The constructed object entirely ignores server interface groups which support other interfaces but not the given one.
QAbstractIpcInterfaceGroupManager* man = new QAbstractIpcInterfaceGroupManager( vsp, "QNetworkRegistration" );
QStringList groupList = man->groups();
QStringList ifaces = man->interfaces( "voip" );
If interface is empty, this manager object will behave as if no filtering is required.
See also QCommServiceManager and QHardwareManager.
QAbstractIpcInterfaceGroupManager::~QAbstractIpcInterfaceGroupManager ()
Destroy this server interface group manager.
void QAbstractIpcInterfaceGroupManager::groupAdded ( const QString & group ) [signal]
Signal that is emitted when group is added. A group is considered to have been added when its first interface is constructed.
void QAbstractIpcInterfaceGroupManager::groupRemoved ( const QString & group ) [signal]
Signal that is emitted when group is removed. A group is considered to have been removed when its last interface is deleted.
QStringList QAbstractIpcInterfaceGroupManager::groups () const
Returns the list of all groups that are currently active within the system or within the particular interface that this object could be limited to.
void QAbstractIpcInterfaceGroupManager::groupsChanged () [signal]
Signal that is emitted when the list of groups changes, if the interfaces on a group has changed, or if the priority assignments have changed.
See also groupAdded() and groupRemoved().
QStringList QAbstractIpcInterfaceGroupManager::interfaces ( const QString & group ) const
Returns the list of interfaces that are supported by group.
If this object is limited to just one interface this function only ever returns a list with either zero or at most one entry.
int QAbstractIpcInterfaceGroupManager::priority ( const QString & group ) const
Returns the priority of the interface T within group. The priority determines which group will be selected by default if an explicit group name is not supplied when constructing an interface object.
Returns the default priority of zero if the interface or group name does not exist.
See the documentation for QAbstractIpcInterface for more information on how priorities affect the choice of a default interface implementation.
See also QAbstractIpcInterface.
QStringList QAbstractIpcInterfaceGroupManager::supports () const
Returns the list of groups that support the interface T. The following example demonstrates how to get the list of groups that supports the QNetworkRegistration interface:
QAbstractIpcInterfaceGroupManager manager("/Communications");
QStringList list = manager.supports<QNetworkRegistration>();
bool QAbstractIpcInterfaceGroupManager::supports ( const QString & group ) const
This is an overloaded member function, provided for convenience.
Determines if group supports the interface T. The following example demonstrates how to determine if the modem group supports the QNetworkRegistration interface:
QAbstractIpcInterfaceGroupManager manager("/Communications");
if ( manager.supports<QNetworkRegistration>( "modem" ) )
...