Exemplo n.º 1
0
  void BookmarkStorage::storeBookmarks( const BookmarkList& bList, const ConferenceList& cList )
  {
    Tag* s = new Tag( "storage" );
    s->addAttribute( XMLNS, XMLNS_BOOKMARKS );

    BookmarkList::const_iterator itb = bList.begin();
    for( ; itb != bList.end(); ++itb )
    {
      Tag* i = new Tag( s, "url", "name", (*itb).name );
      i->addAttribute( "url", (*itb).url );
    }

    ConferenceList::const_iterator itc = cList.begin();
    for( ; itc != cList.end(); ++itc )
    {
      Tag* i = new Tag( s, "conference", "name", (*itc).name );
      i->addAttribute( "jid", (*itc).jid );
      i->addAttribute( "autojoin", (*itc).autojoin ? "true" : "false" );

      new Tag( i, "nick", (*itc).nick );
      new Tag( i, "password", (*itc).password );
    }

    storeXML( s, this );
  }
Exemplo n.º 2
0
void Annotations::storeAnnotations( const AnnotationsList& aList )
{
    Tag* s = new Tag( "storage", XMLNS, XMLNS_ANNOTATIONS );

    AnnotationsList::const_iterator it = aList.begin();
    for( ; it != aList.end(); ++it )
    {
        Tag* n = new Tag( s, "note", (*it).note );
        n->addAttribute( "jid", (*it).jid );
        n->addAttribute( "cdate", (*it).cdate );
        n->addAttribute( "mdate", (*it).mdate );
    }

    storeXML( s, this );
}