[bijiben] src: Various const-correctness fixes
- From: Jonathan Kang <jonathankang src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bijiben] src: Various const-correctness fixes
- Date: Wed, 19 Apr 2017 09:06:07 +0000 (UTC)
commit 471810c6a1bb9dd9825649520fe16228f0be0972
Author: Philip Withnall <philip withnall collabora co uk>
Date: Wed Apr 19 17:04:18 2017 +0800
src: Various const-correctness fixes
This helps clarify the memory management in several places, but is by no
means complete.
https://bugzilla.gnome.org/show_bug.cgi?id=762648
src/bjb-settings.c | 6 +++---
src/bjb-settings.h | 6 +++---
src/libbiji/biji-manager.c | 20 ++++++++++----------
src/libbiji/biji-manager.h | 20 ++++++++++----------
src/libbiji/biji-note-id.c | 9 +++++----
src/libbiji/biji-note-id.h | 8 ++++----
src/libbiji/biji-note-obj.c | 13 ++++++++-----
src/libbiji/biji-note-obj.h | 19 ++++++++++---------
src/libbiji/provider/biji-import-provider.c | 14 ++++++++------
src/libbiji/provider/biji-import-provider.h | 12 ++++++------
src/libbiji/provider/biji-local-note.c | 8 ++++----
src/libbiji/provider/biji-local-provider.c | 18 +++++++++---------
src/libbiji/provider/biji-memo-note.c | 7 ++++---
src/libbiji/provider/biji-memo-note.h | 2 +-
src/libbiji/provider/biji-memo-provider.c | 4 ++--
src/libbiji/provider/biji-own-cloud-note.c | 8 ++++----
src/libbiji/provider/biji-own-cloud-provider.c | 14 +++++++-------
src/libbiji/provider/biji-provider.h | 18 +++++++++---------
18 files changed, 107 insertions(+), 99 deletions(-)
---
diff --git a/src/bjb-settings.c b/src/bjb-settings.c
index 5d7c5b7..e49dc25 100644
--- a/src/bjb-settings.c
+++ b/src/bjb-settings.c
@@ -253,21 +253,21 @@ bjb_settings_set_use_system_font (BjbSettings *settings, gboolean value)
}
-gchar *
+const gchar *
bjb_settings_get_default_font (BjbSettings *settings)
{
return settings->priv->font;
}
-gchar *
+const gchar *
bjb_settings_get_default_color (BjbSettings *settings)
{
return settings->priv->color;
}
-gchar *
+const gchar *
bjb_settings_get_default_location (BjbSettings *settings)
{
return settings->priv->primary;
diff --git a/src/bjb-settings.h b/src/bjb-settings.h
index 2051fde..58ace60 100644
--- a/src/bjb-settings.h
+++ b/src/bjb-settings.h
@@ -61,13 +61,13 @@ void bjb_settings_set_use_system_font (BjbSettings *settings
gboolean value);
-gchar *bjb_settings_get_default_font (BjbSettings *settings);
+const gchar *bjb_settings_get_default_font (BjbSettings *settings);
-gchar *bjb_settings_get_default_color (BjbSettings *settings);
+const gchar *bjb_settings_get_default_color (BjbSettings *settings);
-gchar *bjb_settings_get_default_location (BjbSettings *settings);
+const gchar *bjb_settings_get_default_location (BjbSettings *settings);
gchar *bjb_settings_get_system_font (BjbSettings *settings);
diff --git a/src/libbiji/biji-manager.c b/src/libbiji/biji-manager.c
index 5841b5d..6ae7257 100644
--- a/src/libbiji/biji-manager.c
+++ b/src/libbiji/biji-manager.c
@@ -829,8 +829,8 @@ biji_manager_new_finish (GAsyncResult *res,
* And no need to _add_provider, it's a tmp provider. */
void
biji_manager_import_uri (BijiManager *manager,
- gchar *target_provider_id,
- gchar *uri)
+ const gchar *target_provider_id,
+ const gchar *uri)
{
BijiProvider *ret;
@@ -846,8 +846,8 @@ biji_manager_import_uri (BijiManager *manager,
*/
BijiNoteObj *
biji_manager_note_new (BijiManager *self,
- gchar *str,
- gchar *provider_id)
+ const gchar *str,
+ const gchar *provider_id)
{
BijiProvider *provider = NULL;
BijiNoteObj *retval;
@@ -872,12 +872,12 @@ biji_manager_note_new (BijiManager *self,
BijiNoteObj *
-biji_manager_note_new_full (BijiManager *manager,
- gchar *provider_id,
- gchar *suggested_path,
- BijiInfoSet *info,
- gchar *html,
- GdkRGBA *color)
+biji_manager_note_new_full (BijiManager *manager,
+ const gchar *provider_id,
+ const gchar *suggested_path,
+ BijiInfoSet *info,
+ const gchar *html,
+ const GdkRGBA *color)
{
BijiProvider *provider;
BijiNoteObj *retval;
diff --git a/src/libbiji/biji-manager.h b/src/libbiji/biji-manager.h
index 6e346c4..cf61575 100644
--- a/src/libbiji/biji-manager.h
+++ b/src/libbiji/biji-manager.h
@@ -85,8 +85,8 @@ BijiManager *biji_manager_new_finish (GAsyncResult *res,
void biji_manager_import_uri (BijiManager *manager,
- gchar *target_provider_id,
- gchar *uri);
+ const gchar *target_provider_id,
+ const gchar *uri);
GList *biji_manager_get_providers (BijiManager *manager); /* <ProviderInfo*> */
@@ -138,16 +138,16 @@ void biji_manager_empty_bin (BijiManager *manage
BijiNoteObj *biji_manager_note_new (BijiManager *manager,
- gchar *str,
- gchar *provider_id);
+ const gchar *str,
+ const gchar *provider_id);
-BijiNoteObj *biji_manager_note_new_full (BijiManager *manager,
- gchar *provider_id,
- gchar *suggested_path,
- BijiInfoSet *info,
- gchar *html,
- GdkRGBA *color);
+BijiNoteObj *biji_manager_note_new_full (BijiManager *manager,
+ const gchar *provider_id,
+ const gchar *suggested_path,
+ BijiInfoSet *info,
+ const gchar *html,
+ const GdkRGBA *color);
G_END_DECLS
diff --git a/src/libbiji/biji-note-id.c b/src/libbiji/biji-note-id.c
index 6a1753b..306c22f 100644
--- a/src/libbiji/biji-note-id.c
+++ b/src/libbiji/biji-note-id.c
@@ -1,16 +1,16 @@
/* bjb-note-id.c
* Copyright (C) Pierre-Yves LUYTEN 2012 <py luyten fr>
- *
+ *
* bijiben 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.
- *
+ *
* bijiben 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/>.
*/
@@ -228,7 +228,8 @@ biji_note_id_get_title (BijiNoteID* n)
gboolean
-biji_note_id_set_content (BijiNoteID *id, gchar *content)
+biji_note_id_set_content (BijiNoteID *id,
+ const gchar *content)
{
g_return_val_if_fail (BIJI_IS_NOTE_ID (id), FALSE);
g_return_val_if_fail ((content != NULL), FALSE);
diff --git a/src/libbiji/biji-note-id.h b/src/libbiji/biji-note-id.h
index 098e716..ddec73b 100644
--- a/src/libbiji/biji-note-id.h
+++ b/src/libbiji/biji-note-id.h
@@ -1,16 +1,16 @@
/* bjb-note-id.h
* Copyright (C) Pierre-Yves LUYTEN 2012 <py luyten fr>
- *
+ *
* bijiben 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.
- *
+ *
* bijiben 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/>.
*/
@@ -67,7 +67,7 @@ void biji_note_id_set_title (BijiNoteID* n
const gchar *biji_note_id_get_title (BijiNoteID* n);
-gboolean biji_note_id_set_content (BijiNoteID *id, gchar *content);
+gboolean biji_note_id_set_content (BijiNoteID *id, const gchar *content);
const gchar *biji_note_id_get_content (BijiNoteID *id);
diff --git a/src/libbiji/biji-note-obj.c b/src/libbiji/biji-note-obj.c
index a78c775..5f0f28f 100644
--- a/src/libbiji/biji-note-obj.c
+++ b/src/libbiji/biji-note-obj.c
@@ -411,7 +411,8 @@ biji_note_obj_clear_icons (BijiNoteObj *note)
}
static void
-biji_note_obj_set_rgba_internal (BijiNoteObj *n, GdkRGBA *rgba)
+biji_note_obj_set_rgba_internal (BijiNoteObj *n,
+ const GdkRGBA *rgba)
{
n->priv->color = gdk_rgba_copy(rgba);
@@ -419,7 +420,8 @@ biji_note_obj_set_rgba_internal (BijiNoteObj *n, GdkRGBA *rgba)
}
void
-biji_note_obj_set_rgba (BijiNoteObj *n, GdkRGBA *rgba)
+biji_note_obj_set_rgba (BijiNoteObj *n,
+ const GdkRGBA *rgba)
{
if (!n->priv->color)
biji_note_obj_set_rgba_internal (n, rgba);
@@ -458,7 +460,8 @@ biji_note_obj_get_raw_text (BijiNoteObj *note)
}
void
-biji_note_obj_set_raw_text (BijiNoteObj *note, gchar *plain_text)
+biji_note_obj_set_raw_text (BijiNoteObj *note,
+ const gchar *plain_text)
{
if (biji_note_id_set_content (note->priv->id, plain_text))
{
@@ -793,7 +796,7 @@ biji_note_obj_set_create_date (BijiNoteObj *note, gint64 time)
/* Webkit */
gchar *
-html_from_plain_text (gchar *content)
+html_from_plain_text (const gchar *content)
{
gchar *escaped, *retval;
@@ -829,7 +832,7 @@ biji_note_obj_get_html (BijiNoteObj *note)
void
biji_note_obj_set_html (BijiNoteObj *note,
- gchar *html)
+ const gchar *html)
{
BIJI_NOTE_OBJ_GET_CLASS (note)->set_html (note, html);
}
diff --git a/src/libbiji/biji-note-obj.h b/src/libbiji/biji-note-obj.h
index ec08a40..04f54ed 100644
--- a/src/libbiji/biji-note-obj.h
+++ b/src/libbiji/biji-note-obj.h
@@ -1,16 +1,16 @@
/* biji-note-obj.h
* Copyright (C) Pierre-Yves LUYTEN 2012 <py luyten fr>
- *
+ *
* bijiben 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.
- *
+ *
* bijiben 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/>.
*/
@@ -66,7 +66,7 @@ struct _BijiNoteObjClass
/*
* Mandatory. When editor amends html, assign it */
- void (*set_html) (BijiNoteObj *note, gchar *html);
+ void (*set_html) (BijiNoteObj *note, const gchar *html);
/*
* Mandatory. Store the note. This might be async. */
@@ -142,7 +142,8 @@ gboolean biji_note_obj_get_rgba (BijiNoteObj *n,
GdkRGBA *rgba) ;
-void biji_note_obj_set_rgba (BijiNoteObj *n, GdkRGBA *rgba) ;
+void biji_note_obj_set_rgba (BijiNoteObj *n,
+ const GdkRGBA *rgba) ;
GList *biji_note_obj_get_notebooks (BijiNoteObj *n);
@@ -172,7 +173,7 @@ const gchar *biji_note_obj_get_raw_text (BijiNoteObj *note)
void biji_note_obj_set_raw_text (BijiNoteObj *note,
- gchar *plain_text);
+ const gchar *plain_text);
gboolean biji_note_obj_set_title (BijiNoteObj* note_obj_ptr,
@@ -197,11 +198,11 @@ GtkWidget *biji_note_obj_get_editor (BijiNoteObj *note)
gboolean biji_note_obj_can_format (BijiNoteObj *note);
-gchar *html_from_plain_text (gchar *content);
+gchar *html_from_plain_text (const gchar *content);
-void biji_note_obj_set_html (BijiNoteObj *note,
- gchar *html);
+void biji_note_obj_set_html (BijiNoteObj *note,
+ const gchar *html);
gchar *biji_note_obj_get_html (BijiNoteObj *note);
diff --git a/src/libbiji/provider/biji-import-provider.c b/src/libbiji/provider/biji-import-provider.c
index 90b16a7..81f04b1 100644
--- a/src/libbiji/provider/biji-import-provider.c
+++ b/src/libbiji/provider/biji-import-provider.c
@@ -1,18 +1,18 @@
/*
* biji-import-provider.c
- *
+ *
* Copyright 2013 Pierre-Yves Luyten <py luyten fr>
- *
+ *
* bijiben 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.
- *
+ *
* bijiben 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/>.
*/
@@ -239,7 +239,7 @@ biji_import_provider_constructed (GObject *object)
priv->info.domain = NULL;
priv->info.user = NULL;
-
+
to_import = g_file_new_for_uri (self->priv->uri);
g_file_enumerate_children_async (to_import, ATTRIBUTES_FOR_NOTEBOOK,
@@ -358,7 +358,9 @@ biji_import_provider_init (BijiImportProvider *self)
BijiProvider *
-biji_import_provider_new (BijiManager *b, gchar *target_provider, gchar *uri)
+biji_import_provider_new (BijiManager *b,
+ const gchar *target_provider,
+ const gchar *uri)
{
return g_object_new (BIJI_TYPE_IMPORT_PROVIDER,
"manager", b,
diff --git a/src/libbiji/provider/biji-import-provider.h b/src/libbiji/provider/biji-import-provider.h
index c622462..1af67fa 100644
--- a/src/libbiji/provider/biji-import-provider.h
+++ b/src/libbiji/provider/biji-import-provider.h
@@ -1,18 +1,18 @@
/*
* biji-import-provider.h
- *
+ *
* Copyright 2013 Pierre-Yves Luyten <py luyten fr>
- *
+ *
* bijiben 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.
- *
+ *
* bijiben 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/>.
*/
@@ -66,8 +66,8 @@ GType biji_import_provider_get_type (void);
BijiProvider *biji_import_provider_new (BijiManager *manager,
- gchar *target_provider,
- gchar *uri);
+ const gchar *target_provider,
+ const gchar *uri);
G_END_DECLS
diff --git a/src/libbiji/provider/biji-local-note.c b/src/libbiji/provider/biji-local-note.c
index 3c7b071..0afb6c6 100644
--- a/src/libbiji/provider/biji-local-note.c
+++ b/src/libbiji/provider/biji-local-note.c
@@ -1,16 +1,16 @@
/* bjb-local-note.c
* Copyright (C) Pierre-Yves LUYTEN 2013 <py luyten fr>
- *
+ *
* bijiben 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.
- *
+ *
* bijiben 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/>.
*/
@@ -64,7 +64,7 @@ local_note_get_html (BijiNoteObj *note)
void
local_note_set_html (BijiNoteObj *note,
- gchar *html)
+ const gchar *html)
{
if (BIJI_LOCAL_NOTE (note)->priv->html)
g_free (BIJI_LOCAL_NOTE (note)->priv->html);
diff --git a/src/libbiji/provider/biji-local-provider.c b/src/libbiji/provider/biji-local-provider.c
index acdc488..733bbfc 100644
--- a/src/libbiji/provider/biji-local-provider.c
+++ b/src/libbiji/provider/biji-local-provider.c
@@ -1,17 +1,17 @@
/*
* biji-local-provider.c
* Copyright (C) Pierre-Yves LUYTEN 2013 <py luyten fr>
- *
+ *
* bijiben 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.
- *
+ *
* bijiben 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/>.
*/
@@ -424,7 +424,7 @@ _get_note_skeleton (BijiLocalProvider *self)
static BijiNoteObj *
local_prov_create_new_note (BijiProvider *self,
- gchar *str)
+ const gchar *str)
{
BijiNoteObj *ret = _get_note_skeleton (BIJI_LOCAL_PROVIDER (self));
BijiManager *manager;
@@ -453,11 +453,11 @@ local_prov_create_new_note (BijiProvider *self,
}
static BijiNoteObj *
-local_prov_create_note_full (BijiProvider *provider,
- gchar *suggested_path,
- BijiInfoSet *info,
- gchar *html,
- GdkRGBA *color)
+local_prov_create_note_full (BijiProvider *provider,
+ const gchar *suggested_path,
+ BijiInfoSet *info,
+ const gchar *html,
+ const GdkRGBA *color)
{
BijiLocalProvider *self;
BijiNoteObj *retval;
diff --git a/src/libbiji/provider/biji-memo-note.c b/src/libbiji/provider/biji-memo-note.c
index d7ac8c1..c9154ab 100644
--- a/src/libbiji/provider/biji-memo-note.c
+++ b/src/libbiji/provider/biji-memo-note.c
@@ -25,7 +25,7 @@ struct _BijiMemoNotePrivate
BijiProvider *provider;
ECalComponent *ecal;
ECalClient *client;
- gchar *description;
+ const gchar *description;
BijiNoteID *id;
};
@@ -309,7 +309,8 @@ biji_memo_note_get_property (GObject *object,
static void
-memo_set_html (BijiNoteObj *note, gchar *html)
+memo_set_html (BijiNoteObj *note,
+ const gchar *html)
{
/* NULL */
}
@@ -460,7 +461,7 @@ biji_memo_note_new_from_info (BijiMemoProvider *provider,
BijiManager *manager,
BijiInfoSet *info,
ECalComponent *component,
- gchar *description,
+ const gchar *description,
ECalClient *client)
{
BijiNoteID *id;
diff --git a/src/libbiji/provider/biji-memo-note.h b/src/libbiji/provider/biji-memo-note.h
index 3055e2e..3bcdde1 100644
--- a/src/libbiji/provider/biji-memo-note.h
+++ b/src/libbiji/provider/biji-memo-note.h
@@ -61,7 +61,7 @@ BijiNoteObj *biji_memo_note_new_from_info (BijiMemoProvider *
BijiManager *manager,
BijiInfoSet *info,
ECalComponent *comp,
- gchar *description,
+ const gchar *description,
ECalClient *client);
diff --git a/src/libbiji/provider/biji-memo-provider.c b/src/libbiji/provider/biji-memo-provider.c
index 76f285f..711a68c 100644
--- a/src/libbiji/provider/biji-memo-provider.c
+++ b/src/libbiji/provider/biji-memo-provider.c
@@ -535,7 +535,7 @@ on_object_created (GObject *client,
BijiNoteObj *
memo_create_note (BijiProvider *provider,
- gchar *str)
+ const gchar *str)
{
BijiMemoProvider *self = BIJI_MEMO_PROVIDER (provider);
BijiInfoSet info;
@@ -603,7 +603,7 @@ memo_create_note (BijiProvider *provider,
/* make sure the component has an UID and info get it */
- if (! (info.url = icalcomponent_get_uid (icalcomp)))
+ if (! (info.url = (gchar *) icalcomponent_get_uid (icalcomp)))
{
gchar *uid;
diff --git a/src/libbiji/provider/biji-own-cloud-note.c b/src/libbiji/provider/biji-own-cloud-note.c
index c85f287..74c591b 100644
--- a/src/libbiji/provider/biji-own-cloud-note.c
+++ b/src/libbiji/provider/biji-own-cloud-note.c
@@ -1,16 +1,16 @@
/* bjb-own-cloud-note.c
* Copyright (C) Pierre-Yves LUYTEN 2013 <py luyten fr>
- *
+ *
* bijiben 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.
- *
+ *
* bijiben 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/>.
*/
@@ -110,7 +110,7 @@ ocloud_note_get_html (BijiNoteObj *note)
/* We don't put any html to note. We do not need this */
static void
ocloud_note_set_html (BijiNoteObj *note,
- gchar *html)
+ const gchar *html)
{
}
diff --git a/src/libbiji/provider/biji-own-cloud-provider.c b/src/libbiji/provider/biji-own-cloud-provider.c
index afd7bbb..5256c0d 100644
--- a/src/libbiji/provider/biji-own-cloud-provider.c
+++ b/src/libbiji/provider/biji-own-cloud-provider.c
@@ -902,8 +902,8 @@ own_cloud_get_info (BijiProvider *provider)
* Promise. */
BijiNoteObj *
-own_cloud_create_note (BijiProvider *provider,
- gchar *str)
+own_cloud_create_note (BijiProvider *provider,
+ const gchar *str)
{
BijiInfoSet info;
BijiOwnCloudProvider *self;
@@ -928,11 +928,11 @@ own_cloud_create_note (BijiProvider *provider,
* but can't use path, nor color, nor html. */
BijiNoteObj *
-own_cloud_create_full (BijiProvider *provider,
- gchar *suggested_path,
- BijiInfoSet *info,
- gchar *html,
- GdkRGBA *color)
+own_cloud_create_full (BijiProvider *provider,
+ const gchar *suggested_path,
+ BijiInfoSet *info,
+ const gchar *html,
+ const GdkRGBA *color)
{
BijiOwnCloudProvider *self;
BijiNoteObj *retval;
diff --git a/src/libbiji/provider/biji-provider.h b/src/libbiji/provider/biji-provider.h
index 09efd28..f1dc94d 100644
--- a/src/libbiji/provider/biji-provider.h
+++ b/src/libbiji/provider/biji-provider.h
@@ -1,16 +1,16 @@
/* bjb-provider.h
* Copyright (C) Pierre-Yves LUYTEN 2013 <py luyten fr>
- *
+ *
* bijiben 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.
- *
+ *
* bijiben 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/>.
*/
@@ -95,7 +95,7 @@ struct BijiProviderClass_
* Does not allow to trick color or dates */
BijiNoteObj* (*create_new_note) (BijiProvider *provider,
- gchar *content);
+ const gchar *content);
/* Creates a single note representing some existing data,
* with title, content, dates, html, color.
@@ -116,11 +116,11 @@ struct BijiProviderClass_
* TODO: rebase startup code on local provider create note full when good enough
* TODO: owncloud provider (to handle importing) */
- BijiNoteObj* (*create_note_full) (BijiProvider *provider,
- gchar *suggested_path,
- BijiInfoSet *info,
- gchar *html,
- GdkRGBA *color);
+ BijiNoteObj* (*create_note_full) (BijiProvider *provider,
+ const gchar *suggested_path,
+ BijiInfoSet *info,
+ const gchar *html,
+ const GdkRGBA *color);
/* TODO : (*create_notebook). Add a flag into provider info? */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]