| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfWebCaptureDictionary | 1 #ifndef __DEFINED__SkPdfWebCaptureDictionary |
| 2 #define __DEFINED__SkPdfWebCaptureDictionary | 2 #define __DEFINED__SkPdfWebCaptureDictionary |
| 3 | 3 |
| 4 #include "SkPdfUtils.h" | 4 #include "SkPdfUtils.h" |
| 5 #include "SkPdfEnums_autogen.h" | 5 #include "SkPdfEnums_autogen.h" |
| 6 #include "SkPdfArray_autogen.h" | 6 #include "SkPdfArray_autogen.h" |
| 7 #include "SkPdfDictionary_autogen.h" | 7 #include "SkPdfDictionary_autogen.h" |
| 8 | 8 |
| 9 // Entries common to all Web Capture content sets | 9 // Entries common to all Web Capture content sets |
| 10 class SkPdfWebCaptureDictionary : public SkPdfDictionary { | 10 class SkPdfWebCaptureDictionary : public SkPdfDictionary { |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 | 525 |
| 526 SkPdfWebCaptureDictionary& operator=(const SkPdfWebCaptureDictionary& from) {t
his->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *t
his;} | 526 SkPdfWebCaptureDictionary& operator=(const SkPdfWebCaptureDictionary& from) {t
his->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *t
his;} |
| 527 | 527 |
| 528 /** (Optional) The type of PDF object that this dictionary describes; if present
, must be | 528 /** (Optional) The type of PDF object that this dictionary describes; if present
, must be |
| 529 * SpiderContentSet for a Web Capture content set. | 529 * SpiderContentSet for a Web Capture content set. |
| 530 **/ | 530 **/ |
| 531 bool has_Type() const { | 531 bool has_Type() const { |
| 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type"
, "", NULL)); | 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type"
, "", NULL)); |
| 533 } | 533 } |
| 534 | 534 |
| 535 std::string Type() const { | 535 std::string Type() const; |
| 536 std::string ret; | |
| 537 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "",
&ret)) return ret; | |
| 538 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 539 return ""; | |
| 540 } | |
| 541 | |
| 542 /** (Required) The subtype of content set that this dictionary describes: | 536 /** (Required) The subtype of content set that this dictionary describes: |
| 543 * SPS ("Spider page set") A page set | 537 * SPS ("Spider page set") A page set |
| 544 * SIS ("Spider image set") An image set | 538 * SIS ("Spider image set") An image set |
| 545 **/ | 539 **/ |
| 546 bool has_S() const { | 540 bool has_S() const { |
| 547 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "
", NULL)); | 541 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "
", NULL)); |
| 548 } | 542 } |
| 549 | 543 |
| 550 std::string S() const { | 544 std::string S() const; |
| 551 std::string ret; | |
| 552 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re
t)) return ret; | |
| 553 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 554 return ""; | |
| 555 } | |
| 556 | |
| 557 /** (Required) The digital identifier of the content set (see "Digital Identifie
rs" on page | 545 /** (Required) The digital identifier of the content set (see "Digital Identifie
rs" on page |
| 558 * 664). If the content set has been located via the URLS name tree, this allow
s its related | 546 * 664). If the content set has been located via the URLS name tree, this allow
s its related |
| 559 * entry in the IDS name tree to be found. | 547 * entry in the IDS name tree to be found. |
| 560 **/ | 548 **/ |
| 561 bool has_ID() const { | 549 bool has_ID() const { |
| 562 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID",
"", NULL)); | 550 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID",
"", NULL)); |
| 563 } | 551 } |
| 564 | 552 |
| 565 std::string ID() const { | 553 std::string ID() const; |
| 566 std::string ret; | |
| 567 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "",
&ret)) return ret; | |
| 568 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 569 return ""; | |
| 570 } | |
| 571 | |
| 572 /** (Required) An array of indirect references to the objects belonging to the c
ontent set. | 554 /** (Required) An array of indirect references to the objects belonging to the c
ontent set. |
| 573 * The order of objects in the array is undefined in general, but may be restri
cted by spe- | 555 * The order of objects in the array is undefined in general, but may be restri
cted by spe- |
| 574 * cific content set subtypes. | 556 * cific content set subtypes. |
| 575 **/ | 557 **/ |
| 576 bool has_O() const { | 558 bool has_O() const { |
| 577 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", "
", NULL)); | 559 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", "
", NULL)); |
| 578 } | 560 } |
| 579 | 561 |
| 580 SkPdfArray* O() const { | 562 SkPdfArray* O() const; |
| 581 SkPdfArray* ret; | |
| 582 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", "", &r
et)) return ret; | |
| 583 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 584 return NULL; | |
| 585 } | |
| 586 | |
| 587 /** (Required) A source information dictionary (see Section 9.9.4, "Source Infor
mation"), | 563 /** (Required) A source information dictionary (see Section 9.9.4, "Source Infor
mation"), |
| 588 * or an array of such dictionaries, describing the sources from which the obje
cts belong- | 564 * or an array of such dictionaries, describing the sources from which the obje
cts belong- |
| 589 * ing to the content set were created. | 565 * ing to the content set were created. |
| 590 **/ | 566 **/ |
| 591 bool has_SI() const { | 567 bool has_SI() const { |
| 592 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SI",
"", NULL)); | 568 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SI",
"", NULL)); |
| 593 } | 569 } |
| 594 | 570 |
| 595 bool isSIADictionary() const { | 571 bool isSIADictionary() const { |
| 596 SkPdfObject* ret = NULL; | 572 SkPdfObject* ret = NULL; |
| 597 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SI", "",
&ret)) return false; | 573 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SI", "",
&ret)) return false; |
| 598 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary; | 574 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary; |
| 599 } | 575 } |
| 600 | 576 |
| 601 SkPdfDictionary* getSIAsDictionary() const { | 577 SkPdfDictionary* getSIAsDictionary() const; |
| 602 SkPdfDictionary* ret = NULL; | |
| 603 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SI",
"", &ret)) return ret; | |
| 604 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 605 return NULL; | |
| 606 } | |
| 607 | |
| 608 bool isSIAArray() const { | 578 bool isSIAArray() const { |
| 609 SkPdfObject* ret = NULL; | 579 SkPdfObject* ret = NULL; |
| 610 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SI", "",
&ret)) return false; | 580 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SI", "",
&ret)) return false; |
| 611 return ret->podofo()->GetDataType() == ePdfDataType_Array; | 581 return ret->podofo()->GetDataType() == ePdfDataType_Array; |
| 612 } | 582 } |
| 613 | 583 |
| 614 SkPdfArray* getSIAsArray() const { | 584 SkPdfArray* getSIAsArray() const; |
| 615 SkPdfArray* ret = NULL; | |
| 616 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SI", "", &
ret)) return ret; | |
| 617 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 618 return NULL; | |
| 619 } | |
| 620 | |
| 621 /** (Optional) The content type, a string characterizing the source from which t
he objects | 585 /** (Optional) The content type, a string characterizing the source from which t
he objects |
| 622 * belonging to the content set were created. The string should conform to the
content | 586 * belonging to the content set were created. The string should conform to the
content |
| 623 * type specification described in Internet RFC 2045, Multipurpose Internet Mai
l Exten- | 587 * type specification described in Internet RFC 2045, Multipurpose Internet Mai
l Exten- |
| 624 * sions (MIME) Part One: Format of Internet Message Bodies (see the Bibliograp
hy). For | 588 * sions (MIME) Part One: Format of Internet Message Bodies (see the Bibliograp
hy). For |
| 625 * example, for a page set consisting of a group of PDF pages created from an H
TML file, | 589 * example, for a page set consisting of a group of PDF pages created from an H
TML file, |
| 626 * the content type would be text/html. | 590 * the content type would be text/html. |
| 627 **/ | 591 **/ |
| 628 bool has_CT() const { | 592 bool has_CT() const { |
| 629 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CT",
"", NULL)); | 593 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CT",
"", NULL)); |
| 630 } | 594 } |
| 631 | 595 |
| 632 std::string CT() const { | 596 std::string CT() const; |
| 633 std::string ret; | |
| 634 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CT", "",
&ret)) return ret; | |
| 635 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 636 return ""; | |
| 637 } | |
| 638 | |
| 639 /** (Optional) A time stamp giving the date and time at which the content set wa
s created. | 597 /** (Optional) A time stamp giving the date and time at which the content set wa
s created. |
| 640 **/ | 598 **/ |
| 641 bool has_TS() const { | 599 bool has_TS() const { |
| 642 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TS",
"", NULL)); | 600 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TS",
"", NULL)); |
| 643 } | 601 } |
| 644 | 602 |
| 645 SkPdfDate TS() const { | 603 SkPdfDate TS() const; |
| 646 SkPdfDate ret; | |
| 647 if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TS", "", &r
et)) return ret; | |
| 648 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 649 return SkPdfDate(); | |
| 650 } | |
| 651 | |
| 652 }; | 604 }; |
| 653 | 605 |
| 654 #endif // __DEFINED__SkPdfWebCaptureDictionary | 606 #endif // __DEFINED__SkPdfWebCaptureDictionary |
| OLD | NEW |