Back to index

libindicator  12.10.0
indicator-service.h
Go to the documentation of this file.
00001 /*
00002 An object used to provide a simple interface for a service
00003 to query version and manage whether it's running.
00004 
00005 Copyright 2009 Canonical Ltd.
00006 
00007 Authors:
00008     Ted Gould <ted@canonical.com>
00009 
00010 This library is free software; you can redistribute it and/or
00011 modify it under the terms of the GNU General Public License
00012 version 3.0 as published by the Free Software Foundation.
00013 
00014 This library is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 GNU General Public License version 3.0 for more details.
00018 
00019 You should have received a copy of the GNU General Public
00020 License along with this library. If not, see
00021 <http://www.gnu.org/licenses/>.
00022 */
00023 
00024 #ifndef __INDICATOR_SERVICE_H__
00025 #define __INDICATOR_SERVICE_H__
00026 
00027 #include <glib.h>
00028 #include <glib-object.h>
00029 
00030 G_BEGIN_DECLS
00031 
00032 #define INDICATOR_SERVICE_TYPE            (indicator_service_get_type ())
00033 #define INDICATOR_SERVICE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), INDICATOR_SERVICE_TYPE, IndicatorService))
00034 #define INDICATOR_SERVICE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), INDICATOR_SERVICE_TYPE, IndicatorServiceClass))
00035 #define INDICATOR_IS_SERVICE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INDICATOR_SERVICE_TYPE))
00036 #define INDICATOR_IS_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), INDICATOR_SERVICE_TYPE))
00037 #define INDICATOR_SERVICE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), INDICATOR_SERVICE_TYPE, IndicatorServiceClass))
00038 
00039 #define INDICATOR_SERVICE_SIGNAL_SHUTDOWN  "shutdown"
00040 
00041 typedef struct _IndicatorService      IndicatorService;
00042 typedef struct _IndicatorServiceClass IndicatorServiceClass;
00043 
00054 struct _IndicatorServiceClass {
00055        GObjectClass parent_class;
00056        
00057        /* Signals */
00058        void (*shutdown) (IndicatorService * service, gpointer user_data);
00059 
00060        /* Reserved */
00061        void (*indicator_service_reserved1) (void);
00062        void (*indicator_service_reserved2) (void);
00063        void (*indicator_service_reserved3) (void);
00064        void (*indicator_service_reserved4) (void);
00065 };
00066 
00072 struct _IndicatorService {
00073        GObject parent;
00074 
00075 };
00076 
00077 GType indicator_service_get_type (void);
00078 
00079 IndicatorService *   indicator_service_new            (gchar * name);
00080 IndicatorService *   indicator_service_new_version    (gchar * name,
00081                                                        guint version);
00082 
00083 G_END_DECLS
00084 
00085 #endif