Exemplo n.º 1
0
void showTOC(DtMmdbInfoRequest* req)
{
   if ( req == 0 ) return ;

   DtMmdbHandle* id = DtMmdbTocGetParentId(req);
   if (id) 
      fprintf(stderr, "        TOC: parentId=%s\n", DtMmdbHandleToString(id));
   

   unsigned int ct = 0;
   DtMmdbHandle** ids = DtMmdbTocGetChildIds(req, &ct);
   if ( ids ) {
     fprintf(stderr, "ct=%d\n", ct);
     for ( int i=0; i<ct; i++ )
        fprintf(stderr, "        TOC: childid[%d]=%s\n", i, DtMmdbHandleToString(ids[i]));
   }

   int i = DtMmdbTocGetNumOfChildren(req);
   fprintf(stderr, "        TOC: NumOfChildren=%d\n", i);
}
Exemplo n.º 2
0
void showBook(DtMmdbInfoRequest* req)
{
    const char* str = 0;
    int size = 0;
    DtMmdbHandle* id = 0;
    unsigned int l;
    int x ;
    DtMmdbHandle** ids;

    if ( req == 0 ) return ;

    str = DtMmdbBookGetShortTitle(req, &l);
    if ( str )
       fprintf(stderr, "        bookInfo: shortTitle=%s\n", str);

    str = DtMmdbBookGetLongTitle(req, &l);
    if ( str )
       fprintf(stderr, "        bookInfo: longTitle=%s\n", str);

    id = DtMmdbBookGetTocObjectId(req);
    if ( id )
        fprintf(stderr, "        bookInfo: TOC section id=%s\n", DtMmdbHandleToString(id));
    DtMmdbFreeHandle(id);

    x = DtMmdbBookGetSeqNum(req);
    fprintf(stderr, "        bookInfo: seqnum =%d\n", x);

    str =DtMmdbBookGetSeqLIcense(req, &l);
    if ( str )
       fprintf(stderr, "        bookInfo: license term=%s\n", str);

    ids = DtMmdbBookGetTabList(req, &l);
    if (ids) {
      for ( x=0; x<l; x++ )
        fprintf(stderr, "        bookInfo: tab section id=%s\n", DtMmdbHandleToString(ids[x]));
    }
    DtMmdbFreeHandleList(ids);
}
Exemplo n.º 3
0
void showSection(DtMmdbInfoRequest* req)
{
   if ( req == 0 ) return ;

    const char* str = DtMmdbSectionGetLongTitle(req, 0);
    if (str) {
    fprintf(stderr, "        SectionInfo: LongTitle=%s\n", str);
    }

    str = DtMmdbSectionGetShortTitle(req, 0);
    if (str) {
    fprintf(stderr, "        SectionInfo: ShortTitle=%s\n", str);
    }

    str = DtMmdbSectionGetData(req, 0);
    if (str) {
    fprintf(stderr, "        SectionInfo: data=%s\n", str);
    }

    int size = DtMmdbSectionGetDataSize(req);
    fprintf(stderr, "        SectionInfo: dataSize=%d\n", size);


    str = DtMmdbSectionGetTocLoc(req);
    if (str) {
    fprintf(stderr, "        SectionInfo: TocLoc=%s\n", str);
    }

    DtMmdbHandle* id = DtMmdbSectionGetBookId(req);
    if (id) {
    fprintf(stderr, "        SectionInfo: BookId=%s\n", DtMmdbHandleToString(id));
    }

    id = DtMmdbSectionGetStyleSheetId(req);
    if (id) {
    fprintf(stderr, "        SectionInfo: StyleSheetId=%s\n", DtMmdbHandleToString(id));
    }
}
Exemplo n.º 4
0
void showLocator(DtMmdbInfoRequest* req)
{
   DtMmdbHandle* id = 0;
   const char* str = 0;

   if ( req == 0 ) return ;

   str = DtMmdbLocatorGetSectionLoc(req);
   if ( str )
      fprintf(stderr, "        LOC: sectionLoc=%s\n", str);

   id = DtMmdbLocatorGetSectionObjectId(req);
   if ( id )
      fprintf(stderr, "        LOC: sectionId=%s\n", DtMmdbHandleToString(id));
   DtMmdbFreeHandle(id);
}