[telepathy-gabble/master] GabbleCapabilitySetPredicate etc.: use const pointers
Simon McVittie
simon.mcvittie at collabora.co.uk
Tue Sep 8 04:10:09 PDT 2009
---
src/capabilities.h | 2 +-
src/presence.c | 6 +++---
src/presence.h | 11 ++++++-----
tests/test-presence.c | 2 +-
4 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/src/capabilities.h b/src/capabilities.h
index 56d2ce8..2b79d8a 100644
--- a/src/capabilities.h
+++ b/src/capabilities.h
@@ -82,7 +82,7 @@ gchar *gabble_capability_set_dump (const GabbleCapabilitySet *caps,
/* A predicate used by the presence code to select suitable resources */
typedef gboolean (*GabbleCapabilitySetPredicate) (
- const GabbleCapabilitySet *set, gpointer user_data);
+ const GabbleCapabilitySet *set, gconstpointer user_data);
/* These two functions are compatible with GabbleCapabilitySetPredicate;
* pass in the desired capabilities as the user_data */
#define gabble_capability_set_predicate_has \
diff --git a/src/presence.c b/src/presence.c
index b69c228..0e0f8e1 100644
--- a/src/presence.c
+++ b/src/presence.c
@@ -180,7 +180,7 @@ gabble_presence_dup_caps (GabblePresence *presence)
const gchar *
gabble_presence_pick_resource_by_caps (
GabblePresence *presence,
- GabbleCapabilitySetPredicate predicate, gpointer user_data)
+ GabbleCapabilitySetPredicate predicate, gconstpointer user_data)
{
GabblePresencePrivate *priv = GABBLE_PRESENCE_PRIV (presence);
GSList *i;
@@ -208,7 +208,7 @@ gboolean
gabble_presence_resource_has_caps (GabblePresence *presence,
const gchar *resource,
GabbleCapabilitySetPredicate predicate,
- gpointer user_data)
+ gconstpointer user_data)
{
GabblePresencePrivate *priv = GABBLE_PRESENCE_PRIV (presence);
GSList *i;
@@ -611,7 +611,7 @@ gabble_presence_removed_from_view (GabblePresence *self)
return ret;
}
-gpointer
+gconstpointer
gabble_presence_resource_pick_best_feature (GabblePresence *presence,
const gchar *resource,
const GabbleFeatureFallback *table,
diff --git a/src/presence.h b/src/presence.h
index ca2bc77..0746046 100644
--- a/src/presence.h
+++ b/src/presence.h
@@ -89,11 +89,11 @@ gboolean gabble_presence_has_cap (GabblePresence *presence, const gchar *ns);
GabbleCapabilitySet *gabble_presence_dup_caps (GabblePresence *presence);
const gchar *gabble_presence_pick_resource_by_caps (GabblePresence *presence,
- GabbleCapabilitySetPredicate predicate, gpointer user_data);
+ GabbleCapabilitySetPredicate predicate, gconstpointer user_data);
gboolean gabble_presence_resource_has_caps (GabblePresence *presence,
const gchar *resource, GabbleCapabilitySetPredicate predicate,
- gpointer user_data);
+ gconstpointer user_data);
LmMessage *gabble_presence_as_message (GabblePresence *presence,
const gchar *to);
@@ -105,10 +105,11 @@ gboolean gabble_presence_removed_from_view (GabblePresence *presence);
/* Data-driven feature fallback */
typedef struct {
gboolean considered;
- gpointer check_data;
- gpointer result;
+ gconstpointer check_data;
+ gconstpointer result;
} GabbleFeatureFallback;
-gpointer gabble_presence_resource_pick_best_feature (GabblePresence *presence,
+gconstpointer gabble_presence_resource_pick_best_feature (
+ GabblePresence *presence,
const gchar *resource,
const GabbleFeatureFallback *table,
GabbleCapabilitySetPredicate predicate);
diff --git a/tests/test-presence.c b/tests/test-presence.c
index d591627..b9a25cb 100644
--- a/tests/test-presence.c
+++ b/tests/test-presence.c
@@ -11,7 +11,7 @@
static gboolean
predicate_true (const GabbleCapabilitySet *set,
- gpointer unused G_GNUC_UNUSED)
+ gconstpointer unused G_GNUC_UNUSED)
{
return TRUE;
}
--
1.5.6.5
More information about the telepathy-commits
mailing list