158
158
e_utf8_strftime (str, 200, _("%FT%T"), &mytm);
160
cur_node = xmlNewChild (node, NULL, tag, str);
160
cur_node = xmlNewChild (node, NULL, (unsigned char *)tag, (unsigned char *)str);
162
162
/* Not sure about this property */
163
163
timezone = calendar_config_get_timezone ();
164
164
tmp = g_strdup_printf ("http://www.w3.org/2002/12/cal/tzd/%s#tz", timezone);
165
xmlSetProp (cur_node, "rdf:datatype", tmp);
165
xmlSetProp (cur_node, (const unsigned char *)"rdf:datatype", (unsigned char *)tmp);
167
167
g_free (timezone);
241
241
xmlDocPtr doc = xmlNewDoc((xmlChar *) "1.0");
242
242
xmlNodePtr fnode = doc->children;
244
doc->children = xmlNewDocNode (doc, NULL, "rdf:RDF", NULL);
245
xmlSetProp (doc->children, "xmlns:rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#");
246
xmlSetProp (doc->children, "xmlns", "http://www.w3.org/2002/12/cal/ical#");
244
doc->children = xmlNewDocNode (doc, NULL, (const unsigned char *)"rdf:RDF", NULL);
245
xmlSetProp (doc->children, (const unsigned char *)"xmlns:rdf", (const unsigned char *)"http://www.w3.org/1999/02/22-rdf-syntax-ns#");
246
xmlSetProp (doc->children, (const unsigned char *)"xmlns", (const unsigned char *)"http://www.w3.org/2002/12/cal/ical#");
248
fnode = xmlNewChild (doc->children, NULL, "Vcalendar", NULL);
248
fnode = xmlNewChild (doc->children, NULL, (const unsigned char *)"Vcalendar", NULL);
250
250
/* Should Evolution publicise these? */
251
xmlSetProp (fnode, "xmlns:x-wr", "http://www.w3.org/2002/12/cal/prod/Apple_Comp_628d9d8459c556fa#");
252
xmlSetProp (fnode, "xmlns:x-lic", "http://www.w3.org/2002/12/cal/prod/Apple_Comp_628d9d8459c556fa#");
251
xmlSetProp (fnode, (const unsigned char *)"xmlns:x-wr", (const unsigned char *)"http://www.w3.org/2002/12/cal/prod/Apple_Comp_628d9d8459c556fa#");
252
xmlSetProp (fnode, (const unsigned char *)"xmlns:x-lic", (const unsigned char *)"http://www.w3.org/2002/12/cal/prod/Apple_Comp_628d9d8459c556fa#");
254
254
/* Not sure if it's correct like this */
255
xmlNewChild (fnode, NULL, "prodid", "-//" PACKAGE_STRING "//iCal 1.0//EN");
255
xmlNewChild (fnode, NULL, (const unsigned char *)"prodid", (const unsigned char *)"-//" PACKAGE_STRING "//iCal 1.0//EN");
257
257
/* Assuming GREGORIAN is the only supported calendar scale */
258
xmlNewChild (fnode, NULL, "calscale", "GREGORIAN");
258
xmlNewChild (fnode, NULL, (const unsigned char *)"calscale", (const unsigned char *)"GREGORIAN");
260
260
temp = calendar_config_get_timezone ();
261
xmlNewChild (fnode, NULL, "x-wr:timezone", temp);
261
xmlNewChild (fnode, NULL, (const unsigned char *)"x-wr:timezone", (unsigned char *)temp);
264
xmlNewChild (fnode, NULL, "method", "PUBLISH");
266
xmlNewChild (fnode, NULL, "x-wr:relcalid", e_source_peek_uid (primary_source));
268
xmlNewChild (fnode, NULL, "x-wr:calname", e_source_peek_name (primary_source));
264
xmlNewChild (fnode, NULL, (const unsigned char *)"method", (const unsigned char *)"PUBLISH");
266
xmlNewChild (fnode, NULL, (const unsigned char *)"x-wr:relcalid", (unsigned char *)e_source_peek_uid (primary_source));
268
xmlNewChild (fnode, NULL, (const unsigned char *)"x-wr:calname", (unsigned char *)e_source_peek_name (primary_source));
270
270
/* Version of this RDF-format */
271
xmlNewChild (fnode, NULL, "version", "2.0");
271
xmlNewChild (fnode, NULL, (const unsigned char *)"version", (const unsigned char *)"2.0");
273
273
while (objects != NULL) {
274
274
ECalComponent *comp = objects->data;
279
279
struct icaltimetype *temp_time;
281
281
ECalComponentText temp_comptext;
282
xmlNodePtr c_node = xmlNewChild (fnode, NULL, "component", NULL);
283
xmlNodePtr node = xmlNewChild (c_node, NULL, "Vevent", NULL);
282
xmlNodePtr c_node = xmlNewChild (fnode, NULL, (const unsigned char *)"component", NULL);
283
xmlNodePtr node = xmlNewChild (c_node, NULL, (const unsigned char *)"Vevent", NULL);
285
285
/* Getting the stuff */
286
286
e_cal_component_get_uid (comp, &temp_constchar);
287
287
tmp_str = g_strdup_printf ("#%s", temp_constchar);
288
xmlSetProp (node, "about", tmp_str);
288
xmlSetProp (node, (const unsigned char *)"about", (unsigned char *)tmp_str);
289
289
g_free (tmp_str);
290
290
add_string_to_rdf (node, "uid",temp_constchar);