1 /* vi:set et ai sw=2 sts=2 ts=2: */ 2 /*- 3 * Copyright (c) 2011 Jannis Pohlmann <jannis@xfce.org> 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU General Public License as 7 * published by the Free Software Foundation; either version 2 of 8 * the License, or (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public 16 * License along with this program; if not, write to the Free 17 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * Boston, MA 02110-1301, USA. 19 */ 20 21 #ifndef __TUMBLER_LIFECYCLE_MANAGER_H__ 22 #define __TUMBLER_LIFECYCLE_MANAGER_H__ 23 24 #include <glib-object.h> 25 26 G_BEGIN_DECLS 27 28 #define TUMBLER_TYPE_LIFECYCLE_MANAGER (tumbler_lifecycle_manager_get_type ()) 29 #define TUMBLER_LIFECYCLE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUMBLER_TYPE_LIFECYCLE_MANAGER, TumblerLifecycleManager)) 30 #define TUMBLER_LIFECYCLE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUMBLER_TYPE_LIFECYCLE_MANAGER, TumblerLifecycleManagerClass)) 31 #define TUMBLER_IS_LIFECYCLE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUMBLER_TYPE_LIFECYCLE_MANAGER)) 32 #define TUMBLER_IS_LIFECYCLE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUMBLER_TYPE_LIFECYCLE_MANAGER) 33 #define TUMBLER_LIFECYCLE_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUMBLER_TYPE_LIFECYCLE_MANAGER, TumblerLifecycleManagerClass)) 34 35 typedef struct _TumblerLifecycleManagerClass TumblerLifecycleManagerClass; 36 typedef struct _TumblerLifecycleManager TumblerLifecycleManager; 37 38 GType tumbler_lifecycle_manager_get_type (void) G_GNUC_CONST; 39 40 TumblerLifecycleManager *tumbler_lifecycle_manager_new (void) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; 41 void tumbler_lifecycle_manager_start (TumblerLifecycleManager *manager); 42 gboolean tumbler_lifecycle_manager_keep_alive (TumblerLifecycleManager *manager, 43 GError **error); 44 void tumbler_lifecycle_manager_increment_use_count (TumblerLifecycleManager *manager); 45 void tumbler_lifecycle_manager_decrement_use_count (TumblerLifecycleManager *manager); 46 47 G_END_DECLS 48 49 #endif /* !__TUMBLER_LIFECYCLE_MANAGER_H__ */ 50