Top | ![]() |
![]() |
![]() |
![]() |
GHashTable * | gfbgraph_connectable_get_connection_post_params () |
GList * | gfbgraph_connectable_parse_connected_data () |
gboolean | gfbgraph_connectable_is_connectable_to () |
const gchar * | gfbgraph_connectable_get_connection_path () |
GList * | gfbgraph_connectable_default_parse_connected_data () |
GFBGraphConnectable interface allow the connection between nodes. You can see the posible (not necesary implemented) connections in the section "Connections" in any node object in the
Facebook Graph API documentationGHashTable * gfbgraph_connectable_get_connection_post_params (GFBGraphConnectable *self
,GType node_type
);
Get the params to be inserted in a request to the Facebook Graph API
in order to append the node self
to a node of type node_type
.
GList * gfbgraph_connectable_parse_connected_data (GFBGraphConnectable *self
,const gchar *payload
,GError **error
);
Parse the response contained in payload
when a gfbgraph_node_get_connection_nodes()
was
executed.
self |
a GFBGraphConnectable. |
|
payload |
a const gchar with the response string from the Facebook Graph API. |
|
error |
a GError. |
[allow-none] |
a newly-allocated GList of GFBGraphNode created from the payload
or NULL
.
[element-type GFBGraphNode][transfer full]
gboolean gfbgraph_connectable_is_connectable_to (GFBGraphConnectable *self
,GType node_type
);
Check if self
object, normally a GFBGraphNode implementing the GFBGraphConnectable interface,
has the possibility to be connected to another node of type node_type
.
const gchar * gfbgraph_connectable_get_connection_path (GFBGraphConnectable *self
,GType node_type
);
Get the Facebook Graph API function path to retrieve the nodes connected with node_type
managed by the GFBGraphConnectable object.
GList * gfbgraph_connectable_default_parse_connected_data (GFBGraphConnectable *self
,const gchar *payload
,GError **error
);
In most cases, GFBGraphConnectable implementers can use this function in order to parse
the response when a gfbgraph_node_get_connection_nodes()
is executed and the
gfbgraph_connectable_parse_connected_data()
was called.
Normally, Facebook Graph API returns the connections in the same way, using JSON objects, with a root object called "data".
self |
a GFBGraphConnectable. |
|
payload |
a const gchar with the response string from the Facebook Graph API. |
|
error |
a GError or |
[allow-none] |
a newly-allocated GList of GFBGraphNode with the same GType as self
.
[element-type GFBGraphNode][transfer full]
struct GFBGraphConnectableInterface { GTypeInterface parent; GHashTable *connections; GHashTable *(*get_connection_post_params) (GFBGraphConnectable *self, GType node_type); GList *(*parse_connected_data) (GFBGraphConnectable *self, const gchar *payload, GError **error); };