src/server/webdav/webdav.c

branch
webdav
changeset 215
68e824ba4a4f
parent 214
4d7ac67a1c14
child 216
ce2866ec97f6
equal deleted inserted replaced
214:4d7ac67a1c14 215:68e824ba4a4f
652 elm = elm->next; 652 elm = elm->next;
653 } 653 }
654 return count; 654 return count;
655 } 655 }
656 656
657 WebdavPListIterator webdav_plist_iterator(WebdavPList **list) {
658 WebdavPListIterator i;
659 i.list = list;
660 i.cur = NULL;
661 i.next = *list;
662 i.index;
663 return i;
664 }
665
666 int webdav_plist_iterator_next(WebdavPListIterator *i, WebdavPList **cur) {
667 if(i->cur) {
668 i->index++;
669 }
670
671 i->cur = i->next;
672 i->next = i->cur ? i->cur->next : NULL;
673 *cur = i->cur;
674
675 return i->cur != NULL;
676 }
677
678 void webdav_plist_iterator_remove_current(WebdavPListIterator *i) {
679 WebdavPList *cur = i->cur;
680 if(cur->prev) {
681 cur->prev = cur->next;
682 if(cur->next) {
683 cur->next->prev = cur->prev;
684 }
685 } else {
686 *i->list = cur->next;
687 if(cur->next) {
688 cur->next->prev = NULL;
689 }
690 }
691 }
692
693
657 WSNamespace* webdav_dav_namespace(void) { 694 WSNamespace* webdav_dav_namespace(void) {
658 return &dav_namespace; 695 return &dav_namespace;
659 } 696 }
660 697
661 WebdavProperty* webdav_dav_property( 698 WebdavProperty* webdav_dav_property(

mercurial