aboutsummaryrefslogtreecommitdiff
path: root/libindicator/indicator-ng.h
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2013-02-14 22:25:39 +0000
committerTarmac <Unknown>2013-02-14 22:25:39 +0000
commitd05835eae4e47417fdd41a1d4fcaf6a2bcfd96ea (patch)
tree43995c9938a1039e251512d6f9ed71971b27a476 /libindicator/indicator-ng.h
parente7966480ecd14bd6cb4c4ec5f527cfe10a1a0b0f (diff)
parent40d7c42d5212dc97ce6b07f05828fb62440d0694 (diff)
downloadlibayatana-indicator-d05835eae4e47417fdd41a1d4fcaf6a2bcfd96ea.tar.gz
libayatana-indicator-d05835eae4e47417fdd41a1d4fcaf6a2bcfd96ea.tar.bz2
libayatana-indicator-d05835eae4e47417fdd41a1d4fcaf6a2bcfd96ea.zip
Add IndicatorNg.
IndicatorNg is an indicator object that reads an indicator service file and watches the bus for a corresponding service to appear. It turns the menus and actions exported by the service into an indicator entry. I think this is a good solution for the transition period in which we support both styles of indicators. (It means we don't need to copy templates around.) An indicator service file must have an ".indicator" extension and contents simlilar to this: [Indicator Service] Name=indicator-test BusName=com.canonical.indicator.test ObjectPath=/com/canonical/indicator/test For unity-panel-service, these files will be installed somewhere. The indicator-loader in this branch accepts a path to such a file as the first command line argument (instead of the .so file). This can be tested with the example indicator in lp:~larsu/libunity/add-indicator (examples/indicator.vala). Approved by Charles Kerr, Ted Gould.
Diffstat (limited to 'libindicator/indicator-ng.h')
-rw-r--r--libindicator/indicator-ng.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/libindicator/indicator-ng.h b/libindicator/indicator-ng.h
new file mode 100644
index 0000000..f074a47
--- /dev/null
+++ b/libindicator/indicator-ng.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2013 Canonical Ltd.
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 3, as published
+ * by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranties of
+ * MERCHANTABILITY, SATISFACTORY QUALITY, 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 this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ * Lars Uebernickel <lars.uebernickel@canonical.com>
+ */
+
+#ifndef __INDICATOR_NG_H__
+#define __INDICATOR_NG_H__
+
+#include "indicator-object.h"
+
+#define INDICATOR_TYPE_NG (indicator_ng_get_type ())
+#define INDICATOR_NG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INDICATOR_TYPE_NG, IndicatorNg))
+#define INDICATOR_NG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), INDICATOR_TYPE_NG, IndicatorNgClass))
+#define INDICATOR_IS_NG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INDICATOR_TYPE_NG))
+#define INDICATOR_IS_NG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), INDICATOR_TYPE_NG))
+#define INDICATOR_NG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), INDICATOR_TYPE_NG, IndicatorNgClass))
+
+typedef struct _IndicatorNg IndicatorNg;
+typedef IndicatorObjectClass IndicatorNgClass;
+
+GType indicator_ng_get_type (void);
+
+IndicatorNg * indicator_ng_new (const gchar *service_file,
+ GError **error);
+
+IndicatorNg * indicator_ng_new_for_profile (const gchar *service_file,
+ const gchar *profile,
+ GError **error);
+
+const gchar * indicator_ng_get_service_file (IndicatorNg *indicator);
+
+const gchar * indicator_ng_get_profile (IndicatorNg *indicator);
+
+#endif