Logo Search packages:      
Sourcecode: kadu version File versions

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

ContactShared Class Reference

Inheritance diagram for ContactShared:
Inheritance graph
[legend]
Collaboration diagram for ContactShared:
Collaboration graph
[legend]

List of all members.

Public Types

enum  StorableObjectState { StateNew, StateNotLoaded, StateLoaded }

Signals

void aboutToBeAttached (const Buddy &nearFutureBuddy)
void aboutToBeDetached (bool reattaching)
void attached (bool reattached)
void detached (const Buddy &previousBuddy)
void dirtinessChanged ()
void idChanged (const QString &oldId)
void updated ()

Public Member Functions

virtual void aboutToBeRemoved ()
 Method called just before this obejct is removed from storage.
void blockUpdatedSignal ()
 Call this method to block calling of emitUpdated method.
 ContactShared (const QUuid &uuid=QUuid())
ContactDetailsdetails () const
 Returns current details.
void detailsDestroyed ()
void ensureLoaded ()
 Ensures that this object data has been loaded.
void ensureStored ()
 Stores or removes data from storage, depends on shouldStore result.
bool hasValue (const QString &name) const
 Check if value is available in XML node (as subnode).
bool isValidStorage ()
 Returns true if storage point is valid.
 KaduShared_Property (const Avatar &, contactAvatar, ContactAvatar) KaduShared_PropertyRead(const Buddy &
CurrentStatus ProtocolVersion Port KaduShared_Property (const QString &, dnsName, DnsName) KaduShared_Property(short int
 KaduShared_Property (int, priority, Priority) KaduShared_Property(const Status &
CurrentStatus ProtocolVersion KaduShared_Property (const QHostAddress &, address, Address) KaduShared_Property(unsigned int
CurrentStatus KaduShared_PropertyBool (Blocking) KaduShared_Property(const QString &
 KaduShared_PropertyBoolRead (Dirty) void setDirty(bool dirty)
 KaduShared_PropertyRead (const Account &, contactAccount, ContactAccount) void setContactAccount(const Account &account)
 KaduShared_PropertyRead (const QString &, id, Id) void setId(const QString &id)
template<class T >
loadAttribute (const QString &name, T def) const
 Loads value from XML node (as an attribute).
template<class T >
loadAttribute (const QString &name) const
 Loads value from XML node (as an attribute).
virtual void loaded ()
template<class T >
loadValue (const QString &name) const
 Loads value from XML node (as subnode).
template<class T >
loadValue (const QString &name, T def) const
 Loads value from XML node (as subnode).
template<class T >
T * moduleData (const QString &module, bool create=false)
 Returns non-storable module data for object.
template<class T >
T * moduleStorableData (const QString &module, QObject *qobjectParent, bool create)
 Loads storable ModuleData data from XML node (as subnode).
void removeAttribute (const QString &name)
 Removes value (an attribute) from XML node.
void removeFromStorage ()
 Removed object from storage.
void removeModuleData (const QString &module)
 Removes non-storable module data from object.
void removeValue (const QString &name)
 Removes value (a subnode) from XML node.
void setDetails (ContactDetails *details)
 Set new details to object.
OwnerBuddy void setOwnerBuddy (const Buddy &buddy)
void setState (StorableObjectState state)
 Sets new state of object.
void setStorage (const QSharedPointer< StoragePoint > &storage)
 Sets arbitrary storage for this object. Sets state to StateNotLoaded.
void setUuid (const QUuid &uuid)
 Updates value of unique identifier of this object.
virtual bool shouldStore ()
 Determines if object is worth to be stored.
StorableObjectState state ()
 Returns current object state.
const QSharedPointer
< StoragePoint > & 
storage ()
 Returns storage point for this object.
virtual QString storageNodeName ()
 Returns node name of XML storage of this object.
virtual StorableObjectstorageParent ()
 Returns object that holds parent storage point for this object.
QSharedPointer< StoragePointstoragePointForModuleData (const QString &module, bool create=false)
 Creates storage point object for given module data.
virtual void store ()
 Stores object to storage.
void storeAttribute (const QString &name, const QVariant value)
 Stores value into XML node (as an attribute).
void storeValue (const QString &name, const QVariant value)
 Stores value into XML node (as a subnode).
void unblockUpdatedSignal ()
 Call this method to unblock calling of emitUpdated method.
const QUuid & uuid () const
 Returns unique identifier of this object.

Static Public Member Functions

static ContactSharedloadFromStorage (const QSharedPointer< StoragePoint > &contactStoragePoint)
static ContactSharedloadStubFromStorage (const QSharedPointer< StoragePoint > &contactStoragePoint)

Public Attributes

 currentStatus
CurrentStatus ProtocolVersion Port maximumImageSize
 ownerBuddy
CurrentStatus ProtocolVersion port
CurrentStatus protocolVersion

Protected Member Functions

virtual void afterDetailsAdded ()
 Method called after informing manager about new details.
virtual void afterDetailsRemoved ()
 Method called after informing manager about removing old details.
virtual QSharedPointer
< StoragePoint
createStoragePoint ()
 Creates default storage point for object.
void dataUpdated ()
 Call this method when any data was changed.
virtual void detailsAboutToBeAdded ()
 Method called before adding new details.
virtual void detailsAboutToBeRemoved ()
 Method called before removing old details.
virtual void detailsAdded ()
 Method called after adding new details.
virtual void detailsRemoved ()
 Method called after removing old details.
virtual void emitUpdated ()
 Method called when any data was changed.
virtual void load ()
 Loads object from storage.
void loadStub ()
 Loads object from storage.
virtual void protocolRegistered (ProtocolFactory *protocolFactory)
virtual void protocolUnregistered (ProtocolFactory *protocolFactory)

Private Member Functions

void attach (bool reattaching, bool emitSignals)
void detach (bool reattaching, bool emitSignals)
void doSetOwnerBuddy (const Buddy &buddy, bool emitSignals)
void triggerAllProtocolsRegistered ()
void triggerAllProtocolsUnregistered ()

Static Private Member Functions

static void notifyProtocolRegistered (ProtocolFactory *protocolFactory)
static void notifyProtocolUnregistered (ProtocolFactory *protocolFactory)

Private Attributes

QHostAddress Address
bool Blocking
Account ContactAccount
Avatar ContactAvatar
Status CurrentStatus
bool Dirty
QString DnsName
QString Id
short int MaximumImageSize
Buddy OwnerBuddy
unsigned int Port
int Priority
QString ProtocolVersion

Static Private Attributes

static QList
< ProtocolsAwareObject * > 
Objects

Detailed Description

Definition at line 38 of file contact-shared.h.


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

Generated by  Doxygen 1.6.0   Back to index