Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QAbstractIpcInterfaceGroup Class Reference

The QAbstractIpcInterfaceGroup class provides a convenient wrapper to create the interfaces within a server group. More...

    #include <QAbstractIpcInterfaceGroup>

Inherits QObject.

Inherited by QBluetoothHandsfreeCommInterface, QBluetoothHeadsetCommInterface, and QTelephonyService.

Public Functions

Protected Functions

Additional Inherited Members

Detailed Description

The QAbstractIpcInterfaceGroup class provides a convenient wrapper to create the interfaces within a server group.

This class is used to collect together several related QAbstractIpcInterface instances into a single logical group. It provides a standard pattern for creating all interfaces in the group via the initialize() method, and provides discovery mechanisms to allow one interface in a group to quickly locate another via the interface() method.

The most extensive use of this class is for Qt Extended telephony services, which create a large number of related interfaces for network registration, phone call management, call forwarding settings, SIM file contents, and so on. See QTelephonyService for more information.

It isn't necessary that QAbstractIpcInterface instances be part of a group; they can be standalone.

The QAbstractIpcInterfaceGroupManager class can be used to receive run time notification of when groups are added and removed from the system.

See also QAbstractIpcInterface, QAbstractIpcInterfaceGroupManager, and QTelephonyService.

Member Function Documentation

QAbstractIpcInterfaceGroup::QAbstractIpcInterfaceGroup ( const QString & groupName, QObject * parent = 0 )

Create a new server interface group called groupName and attach it to parent.

A call to the constructor should be followed by a call to initialize() to complete the initialization process.

See also initialize().

QAbstractIpcInterfaceGroup::~QAbstractIpcInterfaceGroup ()

Destroy this server interface group.

void QAbstractIpcInterfaceGroup::addInterface ( QAbstractIpcInterface * interface )   [virtual protected]

Adds interface to the list of interfaces that is supported by this server interface group.

QString QAbstractIpcInterfaceGroup::groupName () const

Returns the name of this server interface group.

void QAbstractIpcInterfaceGroup::initialize ()   [virtual]

Initializes this server interface group by creating all of the interfaces that it supports. In subclasses, interfaces should be created using the following pattern:

    if ( !supports<T>() )
        addInterface( new MyT(this) );

where T is the name of the interface being created and MyT is the name of the class that implements the interface.

At the end of a subclass initialize(), it must call its immediate superclass. The superclass follows the same pattern to create missing interfaces that were not explicitly overridden.

The base implementation calls QAbstractIpcInterface::groupInitialized() on all of the interfaces that were created by subclasses.

See also supports(), addInterface(), and QAbstractIpcInterface::groupInitialized().

T * QAbstractIpcInterfaceGroup::interface () const

Get the object that implements the interface T on this server interface group, or null if there is no such interface.

bool QAbstractIpcInterfaceGroup::supports () const

Returns true if this server interface group supports an interface with the name T; otherwise returns false.

void QAbstractIpcInterfaceGroup::suppressInterface ()   [protected]

Suppresses the interface T from being created during initialize(). This causes the supports() function to return true for T even if no interface object for T has been added yet.

The main use of this method is to stop a parent class from creating a default implementation of T when the subclass does not create their own override, but the default implementation would cause problems if used.

Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3