Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Opie::Core::ODirNotification Class Reference

Represents a directory notification. More...

#include </home/clem/local/src/opie/libopie2/opiecore/linux/ofilenotify.h>

Collaboration diagram for Opie::Core::ODirNotification:

Collaboration graph
[legend]
List of all members.

Signals

void triggered (const QString &, unsigned int, const QString &)
void accessed (const QString &)
void modified (const QString &)
void attributed (const QString &)
void closed (const QString &, bool)
void opened (const QString &)
void movedTo (const QString &, const QString &)
void movedFrom (const QString &, const QString &)
void deletedSubdir (const QString &, const QString &)
void deletedFile (const QString &, const QString &)
void createdSubdir (const QString &, const QString &)
void createdFile (const QString &, const QString &)
void deleted (const QString &)
void unmounted (const QString &)

Public Member Functions

 ODirNotification (QObject *parent=0, const char *name=0)
 ~ODirNotification ()
int watch (const QString &path, bool sshot=false, OFileNotificationType type=Modify, int recurse=0)

Private Slots

void subdirCreated (const QString &, const QString &)

Private Attributes

OFileNotification_topfilenotification
OFileNotificationType _type
int _depth

Detailed Description

Represents a directory notification.

This class allows to watch for events happening to directories It uses the OFileNotification class and (for recursive watches) implements the Love-Trowbridge recursive directory scanning algorithm.

See also:
http://www.kernel.org/pub/linux/kernel/people/rml/inotify/
Author:
Michael 'Mickey' Lauer <mickey@vanille.de>

Definition at line 269 of file ofilenotify.h.


Constructor & Destructor Documentation

Opie::Core::ODirNotification::ODirNotification QObject *  parent = 0,
const char *  name = 0
 

Definition at line 345 of file ofilenotify.cpp.

References qDebug().

Opie::Core::ODirNotification::~ODirNotification  ) 
 

Definition at line 352 of file ofilenotify.cpp.

References qDebug().


Member Function Documentation

void Opie::Core::ODirNotification::accessed const QString  )  [signal]
 

Referenced by watch().

void Opie::Core::ODirNotification::attributed const QString  )  [signal]
 

Referenced by watch().

void Opie::Core::ODirNotification::closed const QString ,
bool 
[signal]
 

Referenced by watch().

void Opie::Core::ODirNotification::createdFile const QString ,
const QString
[signal]
 

Referenced by watch().

void Opie::Core::ODirNotification::createdSubdir const QString ,
const QString
[signal]
 

Referenced by watch().

void Opie::Core::ODirNotification::deleted const QString  )  [signal]
 

Referenced by watch().

void Opie::Core::ODirNotification::deletedFile const QString ,
const QString
[signal]
 

Referenced by watch().

void Opie::Core::ODirNotification::deletedSubdir const QString ,
const QString
[signal]
 

Referenced by watch().

void Opie::Core::ODirNotification::modified const QString  )  [signal]
 

Referenced by watch().

void Opie::Core::ODirNotification::movedFrom const QString ,
const QString
[signal]
 

Referenced by watch().

void Opie::Core::ODirNotification::movedTo const QString ,
const QString
[signal]
 

Referenced by watch().

void Opie::Core::ODirNotification::opened const QString  )  [signal]
 

Referenced by watch().

void Opie::Core::ODirNotification::subdirCreated const QString ,
const QString
[private, slot]
 

Definition at line 429 of file ofilenotify.cpp.

References _depth, _topfilenotification, QString::contains(), Opie::Core::OFileNotification::isSingleShot(), Opie::Core::OFileNotification::path(), qDebug(), QString::replace(), QString::startsWith(), Opie::Core::OFileNotification::type(), and watch().

Referenced by watch().

void Opie::Core::ODirNotification::triggered const QString ,
unsigned  int,
const QString
[signal]
 

This signal is emitted if an event happens of the specified type happens to the directory being watched.

Referenced by watch().

void Opie::Core::ODirNotification::unmounted const QString  )  [signal]
 

Referenced by watch().

int Opie::Core::ODirNotification::watch const QString path,
bool  sshot = false,
OFileNotificationType  type = Modify,
int  recurse = 0
 

Starts to watch for type changes to path. Recurse recurse levels down the filesystem tree, use 0 for no recursion and -1 for unlimited recursion. Set sshot to True if you want to be notified only once.

Definition at line 376 of file ofilenotify.cpp.

References _depth, _topfilenotification, _type, accessed(), attributed(), QValueList< T >::begin(), closed(), createdFile(), createdSubdir(), Opie::Core::CreateSubdir, deleted(), deletedFile(), deletedSubdir(), directory, QDir::Dirs, QValueList< T >::end(), QDir::entryList(), modified(), movedFrom(), movedTo(), Opie::Core::Nothing, opened(), qDebug(), Opie::Core::OFileNotification::startWatching(), subdirCreated(), triggered(), and unmounted().

Referenced by DemoApp::addTrigger(), App::App(), and subdirCreated().


Member Data Documentation

int Opie::Core::ODirNotification::_depth [private]
 

Definition at line 308 of file ofilenotify.h.

Referenced by subdirCreated(), and watch().

OFileNotification* Opie::Core::ODirNotification::_topfilenotification [private]
 

Definition at line 306 of file ofilenotify.h.

Referenced by subdirCreated(), and watch().

OFileNotificationType Opie::Core::ODirNotification::_type [private]
 

Definition at line 307 of file ofilenotify.h.

Referenced by watch().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 18:00:30 2005 for OPIE by  doxygen 1.4.2