summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/ofilenotify.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiecore/ofilenotify.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiecore/ofilenotify.cpp58
1 files changed, 57 insertions, 1 deletions
diff --git a/libopie2/opiecore/ofilenotify.cpp b/libopie2/opiecore/ofilenotify.cpp
index 4264327..36ec6bf 100644
--- a/libopie2/opiecore/ofilenotify.cpp
+++ b/libopie2/opiecore/ofilenotify.cpp
@@ -58,8 +58,64 @@ int OFileNotification::_fd = -1;
namespace Opie {
namespace Core {
//=================================================================================================
+// OFile
+//=================================================================================================
+
+OFile::OFile() : QObject( 0, 0 ), QFile()
+{
+ qDebug( "OFile()" );
+}
+
+OFile::OFile( const QString& name ) : QObject( 0, 0 ), QFile( name )
+{
+ qDebug( "OFile()" );
+}
+
+OFile::~OFile()
+{
+ qDebug( "~OFile()" );
+}
+
+void OFile::connectNotify( const char *signal )
+{
+ QString s = normalizeSignalSlot( signal+1 );
+ qDebug( "OFile::connectNotify() signal = '%s'", (const char*) s );
+
+ if ( s.startsWith( "accessed" ) )
+
+
+
+
+
+
+
+ QObject::connectNotify( signal );
+
+/*
+ void accessed( const QString& );
+ void modified( const QString& );
+ void attributed( const QString& );
+ void closed( const QString&, bool );
+ void opened( const QString& );
+ void deleted( const QString& );
+ void unmounted( const QString& );
+*/
+
+}
+
+void OFile::disconnectNotify( const char* signal )
+{
+ qDebug( "OFile::disconnectNotify() signal = '%s'", signal );
+ QObject::disconnectNotify( signal );
+}
+
+int OFile::startWatch( int mode )
+{
+}
+
+//=================================================================================================
// OFileNotificationEvent
//=================================================================================================
OFileNotificationEvent::OFileNotificationEvent( OFileNotification* parent, int wd, unsigned int mask, unsigned int cookie, const QString& name )
:_parent( parent ), _wd( wd ), _mask( mask ), _cookie( cookie ), _name( name )
@@ -218,9 +274,9 @@ void OFileNotification::inotifyEventHandler()
{
qDebug( "OFileNotification::inotifyEventHandler(): reached." );
char buffer[16384];
- size_t buffer_i;
+ ssize_t buffer_i;
struct inotify_event *pevent, *event;
ssize_t r;
size_t event_size;
int count = 0;