From: Emmanuel Rodriguez Date: Sat, 11 Jul 2009 18:13:38 +0000 (+0200) Subject: Add coverage for the missing methods. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7841d5c67b2cebcb9a6c76701eaefef4b3e08f8e;p=libchamplain Add coverage for the missing methods. The following methods where not covered: champlain_tile_get_content champlain_tile_get_etag champlain_tile_get_modified_time champlain_tile_get_modified_time_string champlain_tile_set_content champlain_tile_set_etag champlain_tile_set_modified_time --- diff --git a/bindings/perl/Champlain/xs/ChamplainTile.xs b/bindings/perl/Champlain/xs/ChamplainTile.xs index 094f619..1591eaf 100644 --- a/bindings/perl/Champlain/xs/ChamplainTile.xs +++ b/bindings/perl/Champlain/xs/ChamplainTile.xs @@ -72,3 +72,78 @@ champlain_tile_set_uri (ChamplainTile *self, const gchar* uri) void champlain_tile_set_filename (ChamplainTile *self, const gchar* filename) + + +ClutterActor * +champlain_tile_get_content (ChamplainTile *self) + + +const gchar* +champlain_tile_get_etag (ChamplainTile *self) + + +void +champlain_tile_get_modified_time (ChamplainTile *self) + PREINIT: + const GTimeVal *modified_time = NULL; + + PPCODE: + modified_time = champlain_tile_get_modified_time(self); + + if (modified_time) { + EXTEND(SP, 2); + PUSHs(sv_2mortal(newSViv(modified_time->tv_sec))); + PUSHs(sv_2mortal(newSViv(modified_time->tv_usec))); + } + else { + EXTEND(SP, 2); + PUSHs(sv_2mortal(&PL_sv_undef)); + PUSHs(sv_2mortal(&PL_sv_undef)); + } + + +SV* +champlain_tile_get_modified_time_string (ChamplainTile *self) + PREINIT: + gchar *string = NULL; + + CODE: + string = champlain_tile_get_modified_time_string(self); + if (string) { + RETVAL = newSVpvn(string, 0); + g_print("--time : %s\n", string); + g_free(string); + } + else { + g_print("--Undef time\n"); + RETVAL = &PL_sv_undef; + } + + OUTPUT: + RETVAL + + + +void +champlain_tile_set_content (ChamplainTile *self, ClutterActor* actor, gboolean fade_in) + + +void +champlain_tile_set_etag (ChamplainTile *self, const gchar *etag) + + +void +champlain_tile_set_modified_time (ChamplainTile *self, guint seconds = 0, guint microseconds = 0) + PREINIT: + GTimeVal modified_time = {0, }; + + CODE: + if (microseconds || seconds) { + modified_time.tv_sec = seconds; + modified_time.tv_usec = microseconds; + } + else { + g_get_current_time(&modified_time); + } + + champlain_tile_set_modified_time(self, &modified_time);