1 /* ide-vcs-config.c
2 *
3 * Copyright 2016 Akshaya Kakkilaya <akshaya.kakkilaya@gmail.com>
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (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 License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * SPDX-License-Identifier: GPL-3.0-or-later
19 */
20
21 #define G_LOG_DOMAIN "ide-vcs-config"
22
23 #include "config.h"
24
25 #include "ide-vcs-config.h"
26 #include "ide-vcs-enums.h"
27
G_DEFINE_INTERFACE(IdeVcsConfig,ide_vcs_config,IDE_TYPE_OBJECT)28 G_DEFINE_INTERFACE (IdeVcsConfig, ide_vcs_config, IDE_TYPE_OBJECT)
29
30 static void
31 ide_vcs_config_default_init (IdeVcsConfigInterface *iface)
32 {
33 }
34
35 void
ide_vcs_config_get_config(IdeVcsConfig * self,IdeVcsConfigType type,GValue * value)36 ide_vcs_config_get_config (IdeVcsConfig *self,
37 IdeVcsConfigType type,
38 GValue *value)
39 {
40 g_return_if_fail (IDE_IS_VCS_CONFIG (self));
41
42 IDE_VCS_CONFIG_GET_IFACE (self)->get_config (self, type, value);
43 }
44
45 void
ide_vcs_config_set_config(IdeVcsConfig * self,IdeVcsConfigType type,const GValue * value)46 ide_vcs_config_set_config (IdeVcsConfig *self,
47 IdeVcsConfigType type,
48 const GValue *value)
49 {
50 g_return_if_fail (IDE_IS_VCS_CONFIG (self));
51
52 IDE_VCS_CONFIG_GET_IFACE (self)->set_config (self, type, value);
53 }
54