CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Public Types | Public Member Functions | List of all members
ctkConfigurationEvent Class Reference

#include <Libs/PluginFramework/service/cm/ctkConfigurationEvent.h>

Public Types

enum  Type { CM_UPDATED = 0x00000001 , CM_DELETED = 0x00000002 }
 

Public Member Functions

 ctkConfigurationEvent ()
 
 ctkConfigurationEvent (const ctkConfigurationEvent &other)
 
 ctkConfigurationEvent (const ctkServiceReference &reference, Type type, const QString &factoryPid, const QString &pid)
 
QString getFactoryPid () const
 
QString getPid () const
 
ctkServiceReference getReference () const
 
int getType () const
 
bool isNull () const
 
ctkConfigurationEventoperator= (const ctkConfigurationEvent &other)
 
 ~ctkConfigurationEvent ()
 

Detailed Description

A Configuration Event.

ctkConfigurationEvent objects are delivered to all registered ctkConfigurationListener service objects. ctkConfigurationEvents must be asynchronously delivered in chronological order with respect to each listener.

An enum type is used to identify the type of event. The following event types are defined:

Additional event types may be defined in the future.

Security Considerations. ctkConfigurationEvent objects do not provide ctkConfiguration objects, so no sensitive configuration information is available from the event. If the listener wants to locate the ctkConfiguration object for the specified pid, it must use ctkConfigurationAdmin.

See also
ctkConfigurationListener

Definition at line 61 of file ctkConfigurationEvent.h.

Member Enumeration Documentation

◆ Type

Enumerator
CM_UPDATED 

A ctkConfiguration has been updated.

This ctkConfigurationEvent type indicates that a ctkConfiguration object has been updated with new properties.

An event is fired when a call to ctkConfiguration#update(const ctkDictionary&) successfully changes a configuration.

The value of CM_UPDATED is 1.

CM_DELETED 

A ctkConfiguration has been deleted.

This ctkConfigurationEvent type indicates that a ctkConfiguration object has been deleted.

An event is fired when a call to ctkConfiguration#remove() successfully deletes a configuration.

The value of CM_DELETED is 2.

Definition at line 68 of file ctkConfigurationEvent.h.

Constructor & Destructor Documentation

◆ ctkConfigurationEvent() [1/3]

ctkConfigurationEvent::ctkConfigurationEvent ( )

Default constructor for use with the Qt meta object system.

◆ ~ctkConfigurationEvent()

ctkConfigurationEvent::~ctkConfigurationEvent ( )

◆ ctkConfigurationEvent() [2/3]

ctkConfigurationEvent::ctkConfigurationEvent ( const ctkServiceReference reference,
Type  type,
const QString &  factoryPid,
const QString &  pid 
)

Constructs a ConfigurationEvent object from the given ServiceReference object, event type, and pids.

Parameters
referenceThe ServiceReference object of the Configuration Admin service that created this event.
typeThe event type. See getType.
factoryPidThe factory pid of the associated configuration if the target of the configuration is a ManagedServiceFactory. Otherwise null if the target of the configuration is a ManagedService.
pidThe pid of the associated configuration.

◆ ctkConfigurationEvent() [3/3]

ctkConfigurationEvent::ctkConfigurationEvent ( const ctkConfigurationEvent other)

Member Function Documentation

◆ getFactoryPid()

QString ctkConfigurationEvent::getFactoryPid ( ) const

Returns the factory pid of the associated configuration.

Returns
Returns the factory pid of the associated configuration if the target of the configuration is a ctkManagedServiceFactory. Otherwise an invalid string if the target of the configuration is a ctkManagedService.

◆ getPid()

QString ctkConfigurationEvent::getPid ( ) const

Returns the pid of the associated configuration.

Returns
Returns the pid of the associated configuration.

◆ getReference()

ctkServiceReference ctkConfigurationEvent::getReference ( ) const

Return the ctkServiceReference object of the Configuration Admin service that created this event.

Returns
The ctkServiceReference object for the Configuration Admin service that created this event.

◆ getType()

int ctkConfigurationEvent::getType ( ) const

Return the type of this event.

The type values are:

Returns
The type of this event.

◆ isNull()

bool ctkConfigurationEvent::isNull ( ) const

Can be used to check if this ctkConfigurationEvent instance is valid, or if it has been constructed using the default constructor.

Returns
true if this event object is valid, false otherwise.

◆ operator=()

ctkConfigurationEvent& ctkConfigurationEvent::operator= ( const ctkConfigurationEvent other)

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