[gnome-builder] vcs: add IdeVcsConfig
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] vcs: add IdeVcsConfig
- Date: Sun, 29 May 2016 11:51:59 +0000 (UTC)
commit dda8393c22ac14047c6ed16b11a2803fb8d895b8
Author: Akshaya Kakkilaya <akshaya kakkilaya gmail com>
Date: Fri May 27 10:38:25 2016 +0530
vcs: add IdeVcsConfig
libide/Makefile.am | 2 +
libide/ide-vcs-config.c | 46 ++++++++++++++++++++++++++++++++++++
libide/ide-vcs-config.h | 59 +++++++++++++++++++++++++++++++++++++++++++++++
libide/ide.h | 1 +
4 files changed, 108 insertions(+), 0 deletions(-)
---
diff --git a/libide/Makefile.am b/libide/Makefile.am
index 03c9295..37e6e00 100644
--- a/libide/Makefile.am
+++ b/libide/Makefile.am
@@ -134,6 +134,7 @@ libide_1_0_la_public_headers = \
ide-unsaved-file.h \
ide-unsaved-files.h \
ide-uri.h \
+ ide-vcs-config.h \
ide-vcs-uri.h \
ide-vcs-initializer.h \
ide-vcs.h \
@@ -287,6 +288,7 @@ libide_1_0_la_public_sources = \
ide-unsaved-file.c \
ide-unsaved-files.c \
ide-uri.c \
+ ide-vcs-config.c \
ide-vcs-initializer.c \
ide-vcs-uri.c \
ide-vcs.c \
diff --git a/libide/ide-vcs-config.c b/libide/ide-vcs-config.c
new file mode 100644
index 0000000..8989406
--- /dev/null
+++ b/libide/ide-vcs-config.c
@@ -0,0 +1,46 @@
+/* ide-vcs-config.c
+ *
+ * Copyright (C) 2016 Akshaya Kakkilaya <akshaya kakkilaya gmail com>
+ *
+ * This program 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.
+ *
+ * This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "ide-vcs-config.h"
+
+G_DEFINE_INTERFACE (IdeVcsConfig, ide_vcs_config, G_TYPE_OBJECT)
+
+static void
+ide_vcs_config_default_init (IdeVcsConfigInterface *iface)
+{
+}
+
+void
+ide_vcs_config_get_config (IdeVcsConfig *self,
+ IdeVcsConfigType type,
+ GValue *value)
+{
+ g_return_if_fail (IDE_IS_VCS_CONFIG (self));
+
+ IDE_VCS_CONFIG_GET_IFACE (self)->get_config (self, type, value);
+}
+
+void
+ide_vcs_config_set_config (IdeVcsConfig *self,
+ IdeVcsConfigType type,
+ const GValue *value)
+{
+ g_return_if_fail (IDE_IS_VCS_CONFIG (self));
+
+ IDE_VCS_CONFIG_GET_IFACE (self)->set_config (self, type, value);
+}
diff --git a/libide/ide-vcs-config.h b/libide/ide-vcs-config.h
new file mode 100644
index 0000000..deea2cd
--- /dev/null
+++ b/libide/ide-vcs-config.h
@@ -0,0 +1,59 @@
+/* ide-vcs-config.h
+ *
+ * Copyright (C) 2016 Akshaya Kakkilaya <akshaya kakkilaya gmail com>
+ *
+ * This program 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.
+ *
+ * This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef IDE_VCS_CONFIG_H
+#define IDE_VCS_CONFIG_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define IDE_TYPE_VCS_CONFIG (ide_vcs_config_get_type ())
+
+G_DECLARE_INTERFACE (IdeVcsConfig, ide_vcs_config, IDE, VCS_CONFIG, GObject)
+
+typedef enum _IdeVcsConfigType IdeVcsConfigType;
+
+enum _IdeVcsConfigType
+{
+ IDE_VCS_CONFIG_FULL_NAME,
+ IDE_VCS_CONFIG_EMAIL
+};
+
+struct _IdeVcsConfigInterface
+{
+ GTypeInterface parent;
+
+ void (*get_config) (IdeVcsConfig *self,
+ IdeVcsConfigType type,
+ GValue *value);
+ void (*set_config) (IdeVcsConfig *self,
+ IdeVcsConfigType type,
+ const GValue *value);
+};
+
+void ide_vcs_config_get_config (IdeVcsConfig *self,
+ IdeVcsConfigType type,
+ GValue *value);
+void ide_vcs_config_set_config (IdeVcsConfig *self,
+ IdeVcsConfigType type,
+ const GValue *value);
+
+G_END_DECLS
+
+#endif /* IDE_VCS_CONFIG_H */
diff --git a/libide/ide.h b/libide/ide.h
index f12f897..22b2606 100644
--- a/libide/ide.h
+++ b/libide/ide.h
@@ -125,6 +125,7 @@ G_BEGIN_DECLS
#include "ide-unsaved-files.h"
#include "ide-uri.h"
#include "ide-vcs.h"
+#include "ide-vcs-config.h"
#include "ide-vcs-initializer.h"
#include "ide-vcs-uri.h"
#include "ide-workbench.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]