]> err.no Git - libchamplain/commitdiff
Add coverage for the missing methods.
authorEmmanuel Rodriguez <emmanuel.rodriguez@gmail.com>
Sat, 11 Jul 2009 18:13:38 +0000 (20:13 +0200)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Sat, 25 Jul 2009 00:25:07 +0000 (20:25 -0400)
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

bindings/perl/Champlain/xs/ChamplainTile.xs

index 094f619f774ecfefad3bbed5d28bc721c471a038..1591eaff9a514c89802680918b6108e3ed9a9219 100644 (file)
@@ -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);