kitchensync Library API Documentation

KShareFileModule Class Reference

A small KDE Daemon to control shared access to files.Controls shared access to resources. More...

#include <kdedsharedfile.h>

List of all members.

DCOP Member Functions

ASYNC interestedIn (const QString &resource)
ASYNC removeInterestIn (const QString &resource)
bool readShareFile (const QString &resource)
bool readUnshareFile (const QString &resource)
bool writeLockFile (const QString &resource)
bool writeUnlockFile (const QString &resource)

Public Member Functions

 KShareFileModule (const QCString &obj)
virtual ~KShareFileModule ()


Detailed Description

A small KDE Daemon to control shared access to files.Controls shared access to resources.

It will be started on demand inside the KDED Server.

Author:
Holger 'zecke' Freyther <freyther@kde.org>
Version:
: 0.1

Definition at line 33 of file kdedsharedfile.h.


Constructor & Destructor Documentation

KShareFileModule::KShareFileModule const QCString obj  ) 
 

This is the constructor it takes a QCString as parameter.

Parameters:
obj the object

Definition at line 55 of file kdedsharedfile.cpp.

KShareFileModule::~KShareFileModule  )  [virtual]
 

This is the destructor.

Definition at line 59 of file kdedsharedfile.cpp.


Member Function Documentation

void KShareFileModule::interestedIn const QString resource  ) 
 

This function will be called if a module got interest on a resource.

Parameters:
resource The resource interested in

Definition at line 68 of file kdedsharedfile.cpp.

void KShareFileModule::removeInterestIn const QString resource  ) 
 

This function will remove the interest in the resource.

Parameters:
resource The resource name

Definition at line 77 of file kdedsharedfile.cpp.

bool KShareFileModule::readShareFile const QString resource  ) 
 

This will try to share this file for reading multiple resource can have a read share at the same time.

If there was no interest in the resource it will be added. see interestedIn

Parameters:
resource The resource name
Returns:
the success or failure of locking

Definition at line 93 of file kdedsharedfile.cpp.

bool KShareFileModule::readUnshareFile const QString resource  ) 
 

This will remove a read share.

Parameters:
resource The resource name
Returns:
success or failure of unlocking

Definition at line 111 of file kdedsharedfile.cpp.

bool KShareFileModule::writeLockFile const QString resource  ) 
 

This will try to lock a resource for writing only.

It will success if there are no locks

Parameters:
resource The resource to lock
Returns:
failure or success

Definition at line 127 of file kdedsharedfile.cpp.

bool KShareFileModule::writeUnlockFile const QString resource  ) 
 

This will unlock the resource.

Parameters:
resource The resource name
Returns:
success or failure

Definition at line 144 of file kdedsharedfile.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kitchensync Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu May 3 20:20:53 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003