/* Copyright 2007, 2008, 2009, 2010 Geyer Klaus This file is part of Cat'sEyE. Cat'sEyE is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Cat'sEyE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Cat'sEyE. If not, see . */ #ifndef NO_GIO #ifndef AUTOMATICUPDATE_H_ #define AUTOMATICUPDATE_H_ struct autoUpdateList { GString *gstrPath; //holds the path which is monitored int iCountRef; //a reference, how many Objects are connected to this path //if this drops to 0, the monitor is deleted. GFile *gfilePath; //needed to create a monitor GFileMonitor *monitor; //u got it, the monitor int iUpdateThreadStarted; //0=not runnung, 1=running GThread *gthreadUpdateThread; GMutex *mtxJoinUpdateThread; struct autoUpdateList *NextItem; struct autoUpdateList *PrevItem; }; int autoUpdateList_RemoveMonitor (char *Path); int autoUpdateList_AddMonitor (char *Path); void autoUpdateList_deleteList (); struct autoUpdateList *autoUpdateList_getFirstItem (struct autoUpdateList *theList); void autoUpdateList_deleteItemMembersAndItem (struct autoUpdateList *item); void autoUpdateList_deleteItemMembersAndItem_threadWrapper (struct autoUpdateList *item); int autoUpdateList_ValidateItem (struct autoUpdateList *item, GFileMonitor *monitor); void autoUpdateList_debugOut (); #endif //AUTOMATICUPDATE_H_ #endif //GIO