aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/fs/namespace.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/fs/namespace.c')
-rw-r--r--src/plugins/fs/namespace.c144
1 files changed, 72 insertions, 72 deletions
diff --git a/src/plugins/fs/namespace.c b/src/plugins/fs/namespace.c
index ee1d0232..a61e9d2d 100644
--- a/src/plugins/fs/namespace.c
+++ b/src/plugins/fs/namespace.c
@@ -50,7 +50,7 @@ typedef struct NL
50 GtkTreeModel *model; 50 GtkTreeModel *model;
51 char *name; 51 char *name;
52 GNUNET_HashCode id; 52 GNUNET_HashCode id;
53 struct ECRS_MetaData *meta; 53 struct GNUNET_ECRS_MetaData *meta;
54} NamespaceList; 54} NamespaceList;
55 55
56/** 56/**
@@ -116,9 +116,9 @@ makeNamespaceFrame (NamespaceList * entry)
116 116
117 DEBUG_BEGIN (); 117 DEBUG_BEGIN ();
118 namespaceXML 118 namespaceXML
119 = glade_xml_new (getGladeFileName (), 119 = glade_xml_new (GNUNET_GTK_get_glade_filename (),
120 "namespaceContentFrame", PACKAGE_NAME); 120 "namespaceContentFrame", PACKAGNUNET_GENAME);
121 connectGladeWithPlugins (namespaceXML); 121 GNUNET_GTK_connect_glade_with_plugins (namespaceXML);
122 child = extractMainWidgetFromWindow (namespaceXML, "namespaceContentFrame"); 122 child = extractMainWidgetFromWindow (namespaceXML, "namespaceContentFrame");
123 resultList = glade_xml_get_widget (namespaceXML, 123 resultList = glade_xml_get_widget (namespaceXML,
124 "namespaceContentFrameTreeView"); 124 "namespaceContentFrameTreeView");
@@ -299,7 +299,7 @@ makeNamespaceFrame (NamespaceList * entry)
299 */ 299 */
300static int 300static int
301addNamespaceContentToModel (void *cls, 301addNamespaceContentToModel (void *cls,
302 const ECRS_FileInfo * fi, 302 const GNUNET_ECRS_FileInfo * fi,
303 const GNUNET_HashCode * lastId, 303 const GNUNET_HashCode * lastId,
304 const GNUNET_HashCode * nextId, 304 const GNUNET_HashCode * nextId,
305 GNUNET_Int32Time publicationFrequency, 305 GNUNET_Int32Time publicationFrequency,
@@ -319,7 +319,7 @@ addNamespaceContentToModel (void *cls,
319 char *size_h; 319 char *size_h;
320 320
321 DEBUG_BEGIN (); 321 DEBUG_BEGIN ();
322 filename = ECRS_getFirstFromMetaData (fi->meta, 322 filename = GNUNET_ECRS_meta_data_get_first_by_types (fi->meta,
323 EXTRACTOR_FILENAME, 323 EXTRACTOR_FILENAME,
324 EXTRACTOR_TITLE, 324 EXTRACTOR_TITLE,
325 EXTRACTOR_ARTIST, 325 EXTRACTOR_ARTIST,
@@ -337,7 +337,7 @@ addNamespaceContentToModel (void *cls,
337 while (NULL != (dotdot = strstr (filename, ".."))) 337 while (NULL != (dotdot = strstr (filename, "..")))
338 dotdot[0] = dotdot[1] = '_'; 338 dotdot[0] = dotdot[1] = '_';
339 } 339 }
340 desc = ECRS_getFirstFromMetaData (fi->meta, 340 desc = GNUNET_ECRS_meta_data_get_first_by_types (fi->meta,
341 EXTRACTOR_DESCRIPTION, 341 EXTRACTOR_DESCRIPTION,
342 EXTRACTOR_GENRE, 342 EXTRACTOR_GENRE,
343 EXTRACTOR_ALBUM, 343 EXTRACTOR_ALBUM,
@@ -347,22 +347,22 @@ addNamespaceContentToModel (void *cls,
347 EXTRACTOR_SIZE, EXTRACTOR_KEYWORDS, -1); 347 EXTRACTOR_SIZE, EXTRACTOR_KEYWORDS, -1);
348 if (desc == NULL) 348 if (desc == NULL)
349 desc = GNUNET_strdup (""); 349 desc = GNUNET_strdup ("");
350 mime = ECRS_getFromMetaData (fi->meta, EXTRACTOR_MIMETYPE); 350 mime = GNUNET_ECRS_meta_data_get_by_type (fi->meta, EXTRACTOR_MIMETYPE);
351 if (mime == NULL) 351 if (mime == NULL)
352 mime = GNUNET_strdup (_("unknown")); 352 mime = GNUNET_strdup (_("unknown"));
353 if (ECRS_isFileUri (fi->uri)) 353 if (GNUNET_ECRS_uri_test_chk (fi->uri))
354 size = ECRS_fileSize (fi->uri); 354 size = GNUNET_ECRS_uri_get_file_siz (fi->uri);
355 else 355 else
356 size = 0; 356 size = 0;
357 uriString = ECRS_uriToString (fi->uri); 357 uriString = GNUNET_ECRS_uri_to_string (fi->uri);
358 GNUNET_hash_to_enc (lastId, &last); 358 GNUNET_hash_to_enc (lastId, &last);
359 if (nextId != NULL) 359 if (nextId != NULL)
360 GNUNET_hash_to_enc (nextId, &next); 360 GNUNET_hash_to_enc (nextId, &next);
361 else 361 else
362 memset (&next, 0, sizeof (GNUNET_EncName)); 362 memset (&next, 0, sizeof (GNUNET_EncName));
363 if (publicationFrequency == ECRS_SBLOCK_UPDATE_SPORADIC) 363 if (publicationFrequency == GNUNET_ECRS_SBLOCK_UPDATE_SPORADIC)
364 date = GNUNET_strdup (_("unspecified")); 364 date = GNUNET_strdup (_("unspecified"));
365 else if (publicationFrequency == ECRS_SBLOCK_UPDATE_NONE) 365 else if (publicationFrequency == GNUNET_ECRS_SBLOCK_UPDATE_NONE)
366 date = GNUNET_strdup (_("never")); 366 date = GNUNET_strdup (_("never"));
367 else 367 else
368 date = GNUNET_int32_time_to_string (&nextPublicationTime); 368 date = GNUNET_int32_time_to_string (&nextPublicationTime);
@@ -383,8 +383,8 @@ addNamespaceContentToModel (void *cls,
383 IN_NAMESPACE_NEXT_STRING, &next, 383 IN_NAMESPACE_NEXT_STRING, &next,
384 IN_NAMESPACE_PUB_FREQ_STRING, freq, 384 IN_NAMESPACE_PUB_FREQ_STRING, freq,
385 IN_NAMESPACE_PUB_DATE_STRING, date, 385 IN_NAMESPACE_PUB_DATE_STRING, date,
386 IN_NAMESPACE_URI, ECRS_dupUri (fi->uri), 386 IN_NAMESPACE_URI, GNUNET_ECRS_uri_duplicate (fi->uri),
387 IN_NAMESPACE_META, ECRS_dupMetaData (fi->meta), -1); 387 IN_NAMESPACE_META, GNUNET_ECRS_meta_data_duplicate (fi->meta), -1);
388 GNUNET_free (size_h); 388 GNUNET_free (size_h);
389 GNUNET_free (filename); 389 GNUNET_free (filename);
390 GNUNET_free (uriString); 390 GNUNET_free (uriString);
@@ -402,36 +402,36 @@ int
402addTabForNamespace (void *unused, 402addTabForNamespace (void *unused,
403 const char *namespaceName, 403 const char *namespaceName,
404 const GNUNET_HashCode * namespaceId, 404 const GNUNET_HashCode * namespaceId,
405 const struct ECRS_MetaData *md, int rating) 405 const struct GNUNET_ECRS_MetaData *md, int rating)
406{ 406{
407 NamespaceList *list; 407 NamespaceList *list;
408 GtkWidget *label; 408 GtkWidget *label;
409 GtkWidget *notebook; 409 GtkWidget *notebook;
410 GtkWidget *del_menu; 410 GtkWidget *del_menu;
411 411
412 if (GNUNET_OK != ECRS_testNamespaceExists (NULL, cfg, namespaceName, namespaceId)) 412 if (GNUNET_OK != GNUNET_ECRS_namespace_test_exists (NULL, cfg, namespaceName, namespaceId))
413 return GNUNET_OK; 413 return GNUNET_OK;
414 DEBUG_BEGIN (); 414 DEBUG_BEGIN ();
415 label = gtk_label_new (namespaceName); 415 label = gtk_label_new (namespaceName);
416 list = GNUNET_malloc (sizeof (NamespaceList)); 416 list = GNUNET_malloc (sizeof (NamespaceList));
417 list->name = GNUNET_strdup (namespaceName); 417 list->name = GNUNET_strdup (namespaceName);
418 list->id = *namespaceId; 418 list->id = *namespaceId;
419 list->meta = ECRS_dupMetaData (md); 419 list->meta = GNUNET_ECRS_meta_data_duplicate (md);
420 makeNamespaceFrame (list); 420 makeNamespaceFrame (list);
421 list->next = head; 421 list->next = head;
422 head = list; 422 head = list;
423 /* update sensitivity of add button */ 423 /* update sensitivity of add button */
424 on_namespaceContentSelectionChanged (NULL, NULL); 424 on_namespaceContentSelectionChanged (NULL, NULL);
425 notebook = glade_xml_get_widget (getMainXML (), "localNamespacesNotebook"); 425 notebook = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "localNamespacesNotebook");
426 gtk_notebook_append_page (GTK_NOTEBOOK (notebook), 426 gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
427 list->namespacepage, label); 427 list->namespacepage, label);
428 gtk_widget_show (notebook); 428 gtk_widget_show (notebook);
429 NS_listNamespaceContent 429 GNUNET_NS_namespace_list_contents
430 (ectx, cfg, namespaceName, &addNamespaceContentToModel, list->model); 430 (ectx, cfg, namespaceName, &addNamespaceContentToModel, list->model);
431 DEBUG_END (); 431 DEBUG_END ();
432 /* enable "delete" menu entry */ 432 /* enable "delete" menu entry */
433 433
434 del_menu = glade_xml_get_widget (getMainXML (), "namespaceDelete"); 434 del_menu = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "namespaceDelete");
435 gtk_widget_set_sensitive (del_menu, TRUE); 435 gtk_widget_set_sensitive (del_menu, TRUE);
436 return GNUNET_OK; 436 return GNUNET_OK;
437} 437}
@@ -441,8 +441,8 @@ static void
441frame_destroy (GtkWidget * tree) 441frame_destroy (GtkWidget * tree)
442{ 442{
443 GtkTreeIter iter; 443 GtkTreeIter iter;
444 struct ECRS_URI *u; 444 struct GNUNET_ECRS_URI *u;
445 struct ECRS_MetaData *m; 445 struct GNUNET_ECRS_MetaData *m;
446 NamespaceList *prev; 446 NamespaceList *prev;
447 NamespaceList *pos; 447 NamespaceList *pos;
448 NamespaceList *next; 448 NamespaceList *next;
@@ -460,7 +460,7 @@ frame_destroy (GtkWidget * tree)
460 } 460 }
461 if (pos == NULL) 461 if (pos == NULL)
462 { 462 {
463 GE_BREAK (NULL, 0); 463 GNUNET_GEBREAK (NULL, 0);
464 return; 464 return;
465 } 465 }
466 if (prev == NULL) 466 if (prev == NULL)
@@ -468,7 +468,7 @@ frame_destroy (GtkWidget * tree)
468 else 468 else
469 prev->next = pos->next; 469 prev->next = pos->next;
470 GNUNET_free (pos->name); 470 GNUNET_free (pos->name);
471 ECRS_freeMetaData (pos->meta); 471 GNUNET_ECRS_meta_data_destroy (pos->meta);
472 if (gtk_tree_model_get_iter_first (pos->model, &iter)) 472 if (gtk_tree_model_get_iter_first (pos->model, &iter))
473 { 473 {
474 do 474 do
@@ -482,14 +482,14 @@ frame_destroy (GtkWidget * tree)
482 IN_NAMESPACE_URI, NULL, 482 IN_NAMESPACE_URI, NULL,
483 IN_NAMESPACE_META, NULL, -1); 483 IN_NAMESPACE_META, NULL, -1);
484 if (u != NULL) 484 if (u != NULL)
485 ECRS_freeUri (u); 485 GNUNET_ECRS_uri_destroy (u);
486 if (m != NULL) 486 if (m != NULL)
487 ECRS_freeMetaData (m); 487 GNUNET_ECRS_meta_data_destroy (m);
488 } 488 }
489 while (gtk_tree_model_iter_next (pos->model, &iter)); 489 while (gtk_tree_model_iter_next (pos->model, &iter));
490 } 490 }
491 GNUNET_free (pos); 491 GNUNET_free (pos);
492 del_menu = glade_xml_get_widget (getMainXML (), "namespaceDelete"); 492 del_menu = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "namespaceDelete");
493 gtk_widget_set_sensitive (del_menu, head != NULL); 493 gtk_widget_set_sensitive (del_menu, head != NULL);
494} 494}
495 495
@@ -507,7 +507,7 @@ namespaceDelete_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2)
507 gint ret; 507 gint ret;
508 508
509 DEBUG_BEGIN (); 509 DEBUG_BEGIN ();
510 notebook = glade_xml_get_widget (getMainXML (), "localNamespacesNotebook"); 510 notebook = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "localNamespacesNotebook");
511 num = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook)); 511 num = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook));
512 if (num == -1) 512 if (num == -1)
513 { 513 {
@@ -516,7 +516,7 @@ namespaceDelete_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2)
516 dialog = gtk_message_dialog_new 516 dialog = gtk_message_dialog_new
517 (NULL, 517 (NULL,
518 GTK_DIALOG_MODAL, 518 GTK_DIALOG_MODAL,
519 GTK_MESSAGE_ERROR, 519 GTK_MESSAGNUNET_GEERROR,
520 GTK_BUTTONS_CLOSE, 520 GTK_BUTTONS_CLOSE,
521 _("No local namespaces available that could be deleted!")); 521 _("No local namespaces available that could be deleted!"));
522 gtk_dialog_run (GTK_DIALOG (dialog)); 522 gtk_dialog_run (GTK_DIALOG (dialog));
@@ -533,7 +533,7 @@ namespaceDelete_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2)
533 } 533 }
534 if (list == NULL) 534 if (list == NULL)
535 { 535 {
536 GE_BREAK (ectx, 0); 536 GNUNET_GEBREAK (ectx, 0);
537 return; 537 return;
538 } 538 }
539 /* open window to ask for confirmation, 539 /* open window to ask for confirmation,
@@ -542,7 +542,7 @@ namespaceDelete_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2)
542 dialog = gtk_message_dialog_new 542 dialog = gtk_message_dialog_new
543 (NULL, 543 (NULL,
544 GTK_DIALOG_MODAL, 544 GTK_DIALOG_MODAL,
545 GTK_MESSAGE_ERROR, 545 GTK_MESSAGNUNET_GEERROR,
546 GTK_BUTTONS_YES_NO, 546 GTK_BUTTONS_YES_NO,
547 _("Should the namespace `%s' really be deleted?"), list->name); 547 _("Should the namespace `%s' really be deleted?"), list->name);
548 ret = gtk_dialog_run (GTK_DIALOG (dialog)); 548 ret = gtk_dialog_run (GTK_DIALOG (dialog));
@@ -550,7 +550,7 @@ namespaceDelete_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2)
550 if (GTK_RESPONSE_YES != ret) 550 if (GTK_RESPONSE_YES != ret)
551 return; 551 return;
552 gtk_notebook_remove_page (GTK_NOTEBOOK (notebook), num); 552 gtk_notebook_remove_page (GTK_NOTEBOOK (notebook), num);
553 NS_deleteNamespace (ectx, cfg, list->name); 553 GNUNET_NS_namespace_delete (ectx, cfg, list->name);
554 frame_destroy (list->treeview); 554 frame_destroy (list->treeview);
555 DEBUG_END (); 555 DEBUG_END ();
556} 556}
@@ -574,11 +574,11 @@ addToNamespaceCB (GtkTreeModel * model,
574 GtkTreePath * path, GtkTreeIter * iter, gpointer data) 574 GtkTreePath * path, GtkTreeIter * iter, gpointer data)
575{ 575{
576 IUC *cls = data; 576 IUC *cls = data;
577 struct ECRS_URI *resultURI; 577 struct GNUNET_ECRS_URI *resultURI;
578 struct ECRS_URI *dst; 578 struct GNUNET_ECRS_URI *dst;
579 struct ECRS_MetaData *meta; 579 struct GNUNET_ECRS_MetaData *meta;
580 NamespaceList *list; 580 NamespaceList *list;
581 ECRS_FileInfo fi; 581 GNUNET_ECRS_FileInfo fi;
582 582
583 DEBUG_BEGIN (); 583 DEBUG_BEGIN ();
584 dst = NULL; 584 dst = NULL;
@@ -586,10 +586,10 @@ addToNamespaceCB (GtkTreeModel * model,
586 iter, NAMESPACE_URI, &dst, NAMESPACE_META, &meta, -1); 586 iter, NAMESPACE_URI, &dst, NAMESPACE_META, &meta, -1);
587 if (dst == NULL) 587 if (dst == NULL)
588 { 588 {
589 GE_BREAK (ectx, 0); 589 GNUNET_GEBREAK (ectx, 0);
590 return; 590 return;
591 } 591 }
592 resultURI = NS_addToNamespace (ectx, cfg, cls->anonymityLevel, 1000, /* FIXME: priority */ 592 resultURI = GNUNET_NS_add_to_namespace (ectx, cfg, cls->anonymityLevel, 1000, /* FIXME: priority */
593 GNUNET_get_time () + 2 * GNUNET_CRON_YEARS, /* FIXME: expiration */ 593 GNUNET_get_time () + 2 * GNUNET_CRON_YEARS, /* FIXME: expiration */
594 cls->namespaceName, 594 cls->namespaceName,
595 cls->updateInterval, 595 cls->updateInterval,
@@ -602,7 +602,7 @@ addToNamespaceCB (GtkTreeModel * model,
602 list = list->next; 602 list = list->next;
603 if (list == NULL) 603 if (list == NULL)
604 { 604 {
605 GE_BREAK (ectx, 0); 605 GNUNET_GEBREAK (ectx, 0);
606 } 606 }
607 else 607 else
608 { 608 {
@@ -616,11 +616,11 @@ addToNamespaceCB (GtkTreeModel * model,
616 cls->updateInterval, 616 cls->updateInterval,
617 cls->updateInterval + GNUNET_get_time_int32 (NULL)); 617 cls->updateInterval + GNUNET_get_time_int32 (NULL));
618 } 618 }
619 ECRS_freeUri (resultURI); 619 GNUNET_ECRS_uri_destroy (resultURI);
620 } 620 }
621 else 621 else
622 { 622 {
623 infoMessage (GNUNET_YES, 623 GNUNET_GTK_show_info_message (GNUNET_YES,
624 _("Failed to insert content into namespace " 624 _("Failed to insert content into namespace "
625 "(consult logs).\n")); 625 "(consult logs).\n"));
626 } 626 }
@@ -658,24 +658,24 @@ on_namespaceInsertButton_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2)
658 IUC cls; 658 IUC cls;
659 gint num; 659 gint num;
660 660
661 notebook = glade_xml_get_widget (getMainXML (), "localNamespacesNotebook"); 661 notebook = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "localNamespacesNotebook");
662 num = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook)); 662 num = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook));
663 GE_ASSERT (ectx, num != -1); 663 GNUNET_GEASSERT (ectx, num != -1);
664 page = gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), num); 664 page = gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), num);
665 list = head; 665 list = head;
666 while ((list != NULL) && (list->namespacepage != page)) 666 while ((list != NULL) && (list->namespacepage != page))
667 list = list->next; 667 list = list->next;
668 if (list == NULL) 668 if (list == NULL)
669 { 669 {
670 GE_BREAK (ectx, 0); 670 GNUNET_GEBREAK (ectx, 0);
671 return; 671 return;
672 } 672 }
673 cls.namespaceName = list->name; 673 cls.namespaceName = list->name;
674 674
675 metaXML 675 metaXML
676 = glade_xml_new (getGladeFileName (), 676 = glade_xml_new (GNUNET_GTK_get_glade_filename (),
677 "namespaceInsertDialog", PACKAGE_NAME); 677 "namespaceInsertDialog", PACKAGNUNET_GENAME);
678 connectGladeWithPlugins (metaXML); 678 GNUNET_GTK_connect_glade_with_plugins (metaXML);
679 dialog = glade_xml_get_widget (metaXML, "namespaceInsertDialog"); 679 dialog = glade_xml_get_widget (metaXML, "namespaceInsertDialog");
680 gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); 680 gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
681 681
@@ -698,7 +698,7 @@ on_namespaceInsertButton_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2)
698 dialog = gtk_message_dialog_new 698 dialog = gtk_message_dialog_new
699 (NULL, 699 (NULL,
700 GTK_DIALOG_MODAL, 700 GTK_DIALOG_MODAL,
701 GTK_MESSAGE_ERROR, 701 GTK_MESSAGNUNET_GEERROR,
702 GTK_BUTTONS_CLOSE, _("Failed to parse given time interval!")); 702 GTK_BUTTONS_CLOSE, _("Failed to parse given time interval!"));
703 gtk_dialog_run (GTK_DIALOG (dialog)); 703 gtk_dialog_run (GTK_DIALOG (dialog));
704 gtk_widget_destroy (dialog); 704 gtk_widget_destroy (dialog);
@@ -725,7 +725,7 @@ on_namespaceInsertButton_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2)
725 GNUNET_hash (identifierName, strlen (identifierName), &nextId); 725 GNUNET_hash (identifierName, strlen (identifierName), &nextId);
726 cls.nextId = &nextId; 726 cls.nextId = &nextId;
727 } 727 }
728 ggc_tree_selection_selected_foreach 728 GNUNET_GTK_tree_selection_selected_foreach
729 (content_selection, &addToNamespaceCB, &cls); 729 (content_selection, &addToNamespaceCB, &cls);
730 } 730 }
731 gtk_widget_destroy (dialog); 731 gtk_widget_destroy (dialog);
@@ -764,16 +764,16 @@ on_namespaceUpdateButton_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2)
764 764
765 DEBUG_BEGIN (); 765 DEBUG_BEGIN ();
766 /* find out which namespace this is about */ 766 /* find out which namespace this is about */
767 notebook = glade_xml_get_widget (getMainXML (), "localNamespacesNotebook"); 767 notebook = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "localNamespacesNotebook");
768 num = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook)); 768 num = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook));
769 GE_ASSERT (ectx, num != -1); 769 GNUNET_GEASSERT (ectx, num != -1);
770 page = gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), num); 770 page = gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), num);
771 list = head; 771 list = head;
772 while ((list != NULL) && (list->namespacepage != page)) 772 while ((list != NULL) && (list->namespacepage != page))
773 list = list->next; 773 list = list->next;
774 if (list == NULL) 774 if (list == NULL)
775 { 775 {
776 GE_BREAK (ectx, 0); 776 GNUNET_GEBREAK (ectx, 0);
777 return; 777 return;
778 } 778 }
779 cls.namespaceName = list->name; 779 cls.namespaceName = list->name;
@@ -782,7 +782,7 @@ on_namespaceUpdateButton_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2)
782 selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (list->treeview)); 782 selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (list->treeview));
783 if (TRUE != gtk_tree_selection_get_selected (selection, NULL, &iter)) 783 if (TRUE != gtk_tree_selection_get_selected (selection, NULL, &iter))
784 { 784 {
785 GE_BREAK (ectx, 0); 785 GNUNET_GEBREAK (ectx, 0);
786 return; 786 return;
787 } 787 }
788 gtk_tree_model_get (list->model, 788 gtk_tree_model_get (list->model,
@@ -792,20 +792,20 @@ on_namespaceUpdateButton_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2)
792 IN_NAMESPACE_PUB_FREQ_STRING, &freq, -1); 792 IN_NAMESPACE_PUB_FREQ_STRING, &freq, -1);
793 if ((last == NULL) || (next == NULL) || (freq == NULL)) 793 if ((last == NULL) || (next == NULL) || (freq == NULL))
794 { 794 {
795 GE_BREAK (NULL, 0); 795 GNUNET_GEBREAK (NULL, 0);
796 return; 796 return;
797 } 797 }
798 if (GNUNET_OK != parseTimeInterval (freq, &cls.updateInterval)) 798 if (GNUNET_OK != parseTimeInterval (freq, &cls.updateInterval))
799 { 799 {
800 GE_BREAK (ectx, 0); 800 GNUNET_GEBREAK (ectx, 0);
801 cls.updateInterval = ECRS_SBLOCK_UPDATE_SPORADIC; 801 cls.updateInterval = GNUNET_ECRS_SBLOCK_UPDATE_SPORADIC;
802 } 802 }
803 803
804 /* create update dialog */ 804 /* create update dialog */
805 metaXML 805 metaXML
806 = glade_xml_new (getGladeFileName (), 806 = glade_xml_new (GNUNET_GTK_get_glade_filename (),
807 "namespaceUpdateDialog", PACKAGE_NAME); 807 "namespaceUpdateDialog", PACKAGNUNET_GENAME);
808 connectGladeWithPlugins (metaXML); 808 GNUNET_GTK_connect_glade_with_plugins (metaXML);
809 dialog = glade_xml_get_widget (metaXML, "namespaceUpdateDialog"); 809 dialog = glade_xml_get_widget (metaXML, "namespaceUpdateDialog");
810 gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); 810 gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
811 identifierLabel = glade_xml_get_widget (metaXML, "identifierLabel"); 811 identifierLabel = glade_xml_get_widget (metaXML, "identifierLabel");
@@ -815,8 +815,8 @@ on_namespaceUpdateButton_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2)
815 GNUNET_enc_to_hash (next, &cls.thisId); 815 GNUNET_enc_to_hash (next, &cls.thisId);
816 816
817 nextEntryLine = glade_xml_get_widget (metaXML, "nextIdentifierEntry"); 817 nextEntryLine = glade_xml_get_widget (metaXML, "nextIdentifierEntry");
818 if ((cls.updateInterval != ECRS_SBLOCK_UPDATE_SPORADIC) && 818 if ((cls.updateInterval != GNUNET_ECRS_SBLOCK_UPDATE_SPORADIC) &&
819 (GNUNET_OK == NS_computeNextId (NULL, 819 (GNUNET_OK == GNUNET_NS_compute_next_identifier (NULL,
820 cfg, 820 cfg,
821 cls.namespaceName, 821 cls.namespaceName,
822 &lastId, 822 &lastId,
@@ -856,7 +856,7 @@ on_namespaceUpdateButton_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2)
856 mdialog = gtk_message_dialog_new 856 mdialog = gtk_message_dialog_new
857 (NULL, 857 (NULL,
858 GTK_DIALOG_MODAL, 858 GTK_DIALOG_MODAL,
859 GTK_MESSAGE_ERROR, 859 GTK_MESSAGNUNET_GEERROR,
860 GTK_BUTTONS_CLOSE, _("Failed to parse given time interval!")); 860 GTK_BUTTONS_CLOSE, _("Failed to parse given time interval!"));
861 gtk_dialog_run (GTK_DIALOG (mdialog)); 861 gtk_dialog_run (GTK_DIALOG (mdialog));
862 gtk_widget_destroy (mdialog); 862 gtk_widget_destroy (mdialog);
@@ -866,7 +866,7 @@ on_namespaceUpdateButton_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2)
866 = getSpinButtonValue (metaXML, "namespaceUpdateAnonymitySpinButton"); 866 = getSpinButtonValue (metaXML, "namespaceUpdateAnonymitySpinButton");
867 867
868 /* run actual update */ 868 /* run actual update */
869 ggc_tree_selection_selected_foreach 869 GNUNET_GTK_tree_selection_selected_foreach
870 (content_selection, &addToNamespaceCB, &cls); 870 (content_selection, &addToNamespaceCB, &cls);
871CLEANUP: 871CLEANUP:
872 gtk_widget_destroy (dialog); 872 gtk_widget_destroy (dialog);
@@ -892,13 +892,13 @@ fs_namespace_start ()
892 892
893 DEBUG_BEGIN (); 893 DEBUG_BEGIN ();
894 trackCheckButton 894 trackCheckButton
895 = glade_xml_get_widget (getMainXML (), "trackingCheckButton"); 895 = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "trackingCheckButton");
896 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (trackCheckButton), 896 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (trackCheckButton),
897 URITRACK_trackStatus (ectx, 897 GNUNET_URITRACK_get_tracking_status (ectx,
898 cfg) == 898 cfg) ==
899 GNUNET_YES ? TRUE : FALSE); 899 GNUNET_YES ? TRUE : FALSE);
900 900
901 contentList = glade_xml_get_widget (getMainXML (), "availableContentList"); 901 contentList = glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "availableContentList");
902 902
903 model = gtk_list_store_new (NAMESPACE_NUM, G_TYPE_STRING, /* name */ 903 model = gtk_list_store_new (NAMESPACE_NUM, G_TYPE_STRING, /* name */
904 G_TYPE_UINT64, /* size */ 904 G_TYPE_UINT64, /* size */
@@ -961,9 +961,9 @@ fs_namespace_start ()
961 gtk_tree_view_column_set_resizable (gtk_tree_view_get_column 961 gtk_tree_view_column_set_resizable (gtk_tree_view_get_column
962 (GTK_TREE_VIEW (contentList), col - 1), 962 (GTK_TREE_VIEW (contentList), col - 1),
963 TRUE); 963 TRUE);
964 URITRACK_registerTrackCallback (ectx, cfg, &updateViewSave, NULL); 964 GNUNET_URITRACK_register_track_callback (ectx, cfg, &updateViewSave, NULL);
965 NS_listNamespaces (ectx, cfg, &addTabForNamespace, NULL); 965 GNUNET_NS_namespace_list_all (ectx, cfg, &addTabForNamespace, NULL);
966 NS_registerDiscoveryCallback (ectx, cfg, &namespace_discovered_cb, NULL); 966 GNUNET_NS_register_discovery_callback (ectx, cfg, &namespace_discovered_cb, NULL);
967 DEBUG_END (); 967 DEBUG_END ();
968} 968}
969 969
@@ -971,10 +971,10 @@ fs_namespace_start ()
971void 971void
972fs_namespace_stop () 972fs_namespace_stop ()
973{ 973{
974 NS_unregisterDiscoveryCallback (&namespace_discovered_cb, NULL); 974 GNUNET_NS_unregister_discovery_callback (&namespace_discovered_cb, NULL);
975 while (head != NULL) 975 while (head != NULL)
976 frame_destroy (head->treeview); 976 frame_destroy (head->treeview);
977 URITRACK_unregisterTrackCallback (&updateViewSave, NULL); 977 GNUNET_URITRACK_unregister_track_callback (&updateViewSave, NULL);
978} 978}
979 979
980/* end of namespace.c */ 980/* end of namespace.c */