1 /* 2 Copyright 2007, 2008, 2009, 2010 Geyer Klaus 3 4 This file is part of Cat'sEyE. 5 6 Cat'sEyE is free software: you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation, either version 3 of the License, or 9 (at your option) any later version. 10 11 Cat'sEyE is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with Cat'sEyE. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 #ifndef NO_GIO 20 21 #ifndef AUTOMATICUPDATE_H_ 22 #define AUTOMATICUPDATE_H_ 23 24 struct autoUpdateList { 25 GString *gstrPath; //holds the path which is monitored 26 int iCountRef; //a reference, how many Objects are connected to this path 27 //if this drops to 0, the monitor is deleted. 28 GFile *gfilePath; //needed to create a monitor 29 GFileMonitor *monitor; //u got it, the monitor 30 int iUpdateThreadStarted; //0=not runnung, 1=running 31 GThread *gthreadUpdateThread; 32 GMutex *mtxJoinUpdateThread; 33 34 struct autoUpdateList *NextItem; 35 struct autoUpdateList *PrevItem; 36 }; 37 38 int autoUpdateList_RemoveMonitor (char *Path); 39 int autoUpdateList_AddMonitor (char *Path); 40 void autoUpdateList_deleteList (); 41 struct autoUpdateList *autoUpdateList_getFirstItem (struct autoUpdateList *theList); 42 void autoUpdateList_deleteItemMembersAndItem (struct autoUpdateList *item); 43 void autoUpdateList_deleteItemMembersAndItem_threadWrapper (struct autoUpdateList *item); 44 int autoUpdateList_ValidateItem (struct autoUpdateList *item, GFileMonitor *monitor); 45 void autoUpdateList_debugOut (); 46 47 #endif //AUTOMATICUPDATE_H_ 48 49 #endif //GIO 50