class Resource

# class Resource | More...
Internal Use Only
Full name | `KABC::Resource`
Definition | `#include <resource.h>`
Inherits | Plugin (unknown) [public ]
Inherited by | ResourceFile
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- Resource ( AddressBook *ab )
- virtual ~Resource ()
- virtual bool open ()
- virtual void close ()
- virtual Ticket * requestSaveTicket ()
- virtual bool load ()
- virtual bool save ( Ticket *ticket )
- AddressBook * addressBook ()
- virtual QString identifier () const
- virtual void removeAddressee ( const Addressee& addr )
- virtual void cleanUp ()
- virtual void setReadOnly ( bool value )
- virtual bool readOnly () const
- virtual void setFastResource ( bool value )
- virtual bool fastResource () const
- virtual void setName ( const QString &name )
- virtual QString name () const

#### Public Static Methods

- static QString cryptStr ( const QString & )

#### Protected Methods

- Ticket * createTicket ( Resource * )

## Detailed Description

Resource ( AddressBook *ab ) | ### Resource

Constructor

~Resource () | ### ~Resource

[virtual]

Destructor.

bool open () | ### open

[virtual]

Open the resource and returns if it was successfully

void close () | ### close

[virtual]

Close the resource and returns if it was successfully

Ticket * requestSaveTicket () | ### requestSaveTicket

[virtual]

Request a ticket, you have to pass through save() to allow locking.

bool load () | ### load

[virtual]

Load all addressees to the addressbook

bool save ( Ticket *ticket ) | ### save

[virtual]

Save all addressees to the addressbook.

Parameters:

ticket | The ticket you get by requestSaveTicket()

AddressBook * addressBook () | ### addressBook

Returns a pointer to the addressbook.

QString identifier () | ### identifier

[const virtual]

Returns a unique identifier.

void removeAddressee ( const Addressee& addr ) | ### removeAddressee

[virtual]

Removes a addressee from resource. This method is mainly used by record-based resources like LDAP or SQL.

void cleanUp () | ### cleanUp

[virtual]

This method is called by an error handler if the application crashed

void setReadOnly ( bool value ) | ### setReadOnly

[virtual]

Mark the resource to read-only.

bool readOnly () | ### readOnly

[const virtual]

Returns, if the resource is read-only.

void setFastResource ( bool value ) | ### setFastResource

[virtual]

Mark the resource as fast. Only fast resources will be loaded when creating a StdAddressBook::self( true ).

bool fastResource () | ### fastResource

[const virtual]

Returns, if the resource is fast.

void setName ( const QString &name ) | ### setName

[virtual]

Set the name of resource.

QString name () | ### name

[const virtual]

Returns the name of resource.

QString cryptStr ( const QString & ) | ### cryptStr

[static]

This method can be used by all resources to encrypt their passwords for storing in a config file.

Ticket * createTicket ( Resource * ) | ### createTicket

[protected]

Generated by: root on macppc.ports.openbsd.org on Sat Sep 6 10:38:02 2003, using kdoc 2.0a54.