Buteo Synchronization Framework: Buteo::StorageProfile Class Reference

Buteo Synchronization Framework

Public Member Functions | List of all members
Buteo::StorageProfile Class Reference

Storage Profile Class. More...

`#include <StorageProfile.h>`

Inheritance diagram for Buteo::StorageProfile:

## Public Member Functions
| StorageProfile (const QString &aName)
| Constructs an empty StorageProfile with the given name. More...
| StorageProfile (const QDomElement &aRoot)
| Constructs a profile from the given XML. More...
| StorageProfile (const StorageProfile &aSource)
| Copy constructor. More...
| ~StorageProfile ()
| Destructor.
virtual StorageProfile * | clone () const
| Creates a clone of the profile. More...
virtual bool | isEnabled () const
| Returns if the profile is enabled. More...
Public Member Functions inherited from Buteo::Profile
| Profile ()
| Default Constructor.
| Profile (const QString &aName, const QString &aType)
| Constructs a Profile object with given name and type. More...
| Profile (const QDomElement &aRoot)
| Constructs a Profile object from XML. More...
| Profile (const Profile &aSource)
| Copy constructor. More...
virtual | ~Profile ()
| Destructor.
QString | name () const
| Gets the name of the profile. More...
QString | displayname () const
| Gets the display name of the profile. More...
virtual void | setName (const QString &aName)
| Sets the name of the profile. More...
virtual void | setName (const QStringList &aKeys)
| Sets the name of the profile. More...
QString | type () const
| Gets the type of the profile. More...
virtual QDomElement | toXml (QDomDocument &aDoc, bool aLocalOnly=true) const
| Creates a XML representation of the profile. More...
QString | toString () const
| Outputs a XML representation of the profile to a string. More...
QString | key (const QString &aName, const QString &aDefault=QString()) const
| Gets the value of the given key. More...
QMap< QString, QString > | allKeys () const
| Gets all keys and their values. More...
QMap< QString, QString > | allNonStorageKeys () const
| Gets all keys that are not related to storages. More...
bool | boolKey (const QString &aName, bool aDefault=false) const
| Gets the value of the given boolean key. More...
QStringList | keyValues (const QString &aName) const
| Gets the values of all keys with the given name. More...
QStringList | keyNames () const
| Gets the names of all keys. More...
void | setKey (const QString &aName, const QString &aValue)
| Sets the value of a key. More...
void | setKeyValues (const QString &aName, const QStringList &aValues)
| Sets multiple values for a key. More...
void | setBoolKey (const QString &aName, bool aValue)
| Sets the value of a boolean key. More...
void | removeKey (const QString &aName)
| Removes a key from profile. All instances of the key are removed. More...
const ProfileField * | field (const QString &aName) const
| Gets the field with the given name. More...
QList< const ProfileField * > | allFields () const
| Gets all fields. More...
QList< const ProfileField * > | visibleFields () const
| Gets all visible fields of the profile. More...
bool | isValid () const
| Checks if the profile is valid. More...
QStringList | subProfileNames (const QString &aType="") const
| Gets the names of all sub-profiles with the given type. More...
Profile * | subProfile (const QString &aName, const QString &aType="")
| Gets a sub-profile with the given name and type. More...
const Profile * | subProfile (const QString &aName, const QString &aType="") const
| const method for subProfile More...
const Profile * | subProfileByKeyValue (const QString &aKey, const QString &aValue, const QString &aType, bool aEnabledOnly) const
| Gets a sub-profile by key value. More...
QList< Profile * > | allSubProfiles ()
| Gets all sub-profiles. More...
QList< const Profile * > | allSubProfiles () const
| Gets all sub-profiles as const. More...
void | merge (const Profile &aSource)
| Merges a profile to this profile. More...
bool | isLoaded () const
| Checks if the profile is fully constructed by loading all sub-profiles from separate profile files. More...
void | setLoaded (bool aLoaded)
| Sets if the profile is fully loaded. More...
void | setEnabled (bool aEnabled)
| Set is the profile is enabled. More...
bool | isHidden () const
| Checks if the profile is hidden. More...
bool | isProtected () const
| Checks if the profile is protected. More...

## Additional Inherited Members
Static Public Attributes inherited from Buteo::Profile
static const QString | TYPE_CLIENT
| String constants for different profile type names.
static const QString | TYPE_SERVER
| Server type .
static const QString | TYPE_STORAGE
| Storage type.
static const QString | TYPE_SYNC
| Service type. More...

## Detailed Description

Storage Profile Class.

## Constructor & Destructor Documentation

## ◆ StorageProfile() [1/3]

StorageProfile::StorageProfile | ( | const QString & | aName | ) |
| explicit

Constructs an empty StorageProfile with the given name.

Parameters

  aName | Name of the profile to create.

## ◆ StorageProfile() [2/3]

StorageProfile::StorageProfile | ( | const QDomElement & | aRoot | ) |
| explicit

Constructs a profile from the given XML.

Parameters

  aRoot | Root element of the XML node tree.

## ◆ StorageProfile() [3/3]

StorageProfile::StorageProfile | ( | const StorageProfile & | aSource | ) |

Copy constructor.

Parameters

  aSource | Copy source.

## Member Function Documentation

## ◆ clone()

StorageProfile * StorageProfile::clone | ( |  | ) | const
| virtual

Creates a clone of the profile.

Returns
  The clone.

Reimplemented from Buteo::Profile.

## ◆ isEnabled()

bool StorageProfile::isEnabled | ( |  | ) | const
| virtual

Returns if the profile is enabled.

Storage profile is disabled by default. This means that if there is no key for the enabled status, the profile will be disabled.

Returns
  Is the profile enabled.

Reimplemented from Buteo::Profile.

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

- StorageProfile.h
- StorageProfile.cpp