OLD | NEW |
1 #ifndef __DEFINED__SkPdfSourceInformationDictionary | 1 #ifndef __DEFINED__SkPdfSourceInformationDictionary |
2 #define __DEFINED__SkPdfSourceInformationDictionary | 2 #define __DEFINED__SkPdfSourceInformationDictionary |
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 in a source information dictionary | 9 // Entries in a source information dictionary |
10 class SkPdfSourceInformationDictionary : public SkPdfDictionary { | 10 class SkPdfSourceInformationDictionary : public SkPdfDictionary { |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 bool has_AU() const { | 531 bool has_AU() const { |
532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AU",
"", NULL)); | 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AU",
"", NULL)); |
533 } | 533 } |
534 | 534 |
535 bool isAUAString() const { | 535 bool isAUAString() const { |
536 SkPdfObject* ret = NULL; | 536 SkPdfObject* ret = NULL; |
537 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AU", "",
&ret)) return false; | 537 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AU", "",
&ret)) return false; |
538 return ret->podofo()->GetDataType() == ePdfDataType_String || ret->podofo()-
>GetDataType() == ePdfDataType_HexString; | 538 return ret->podofo()->GetDataType() == ePdfDataType_String || ret->podofo()-
>GetDataType() == ePdfDataType_HexString; |
539 } | 539 } |
540 | 540 |
541 std::string getAUAsString() const { | 541 std::string getAUAsString() const; |
542 std::string ret = ""; | |
543 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AU", "",
&ret)) return ret; | |
544 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
545 return ""; | |
546 } | |
547 | |
548 bool isAUADictionary() const { | 542 bool isAUADictionary() const { |
549 SkPdfObject* ret = NULL; | 543 SkPdfObject* ret = NULL; |
550 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AU", "",
&ret)) return false; | 544 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AU", "",
&ret)) return false; |
551 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary; | 545 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary; |
552 } | 546 } |
553 | 547 |
554 SkPdfDictionary* getAUAsDictionary() const { | 548 SkPdfDictionary* getAUAsDictionary() const; |
555 SkPdfDictionary* ret = NULL; | |
556 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AU",
"", &ret)) return ret; | |
557 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
558 return NULL; | |
559 } | |
560 | |
561 /** (Optional) A time stamp giving the most recent date and time at which the co
ntent | 549 /** (Optional) A time stamp giving the most recent date and time at which the co
ntent |
562 * set's contents were known to be up to date with the source data. | 550 * set's contents were known to be up to date with the source data. |
563 **/ | 551 **/ |
564 bool has_TS() const { | 552 bool has_TS() const { |
565 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TS",
"", NULL)); | 553 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TS",
"", NULL)); |
566 } | 554 } |
567 | 555 |
568 SkPdfDate TS() const { | 556 SkPdfDate TS() const; |
569 SkPdfDate ret; | |
570 if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TS", "", &r
et)) return ret; | |
571 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
572 return SkPdfDate(); | |
573 } | |
574 | |
575 /** (Optional) An expiration stamp giving the date and time at which the content
set's | 557 /** (Optional) An expiration stamp giving the date and time at which the content
set's |
576 * contents should be considered out of date with the source data. | 558 * contents should be considered out of date with the source data. |
577 **/ | 559 **/ |
578 bool has_E() const { | 560 bool has_E() const { |
579 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "E", "
", NULL)); | 561 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "E", "
", NULL)); |
580 } | 562 } |
581 | 563 |
582 SkPdfDate E() const { | 564 SkPdfDate E() const; |
583 SkPdfDate ret; | |
584 if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "E", "", &re
t)) return ret; | |
585 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
586 return SkPdfDate(); | |
587 } | |
588 | |
589 /** (Optional) A code indicating the type of form submission, if any, by which t
he source | 565 /** (Optional) A code indicating the type of form submission, if any, by which t
he source |
590 * data was accessed (see "Submit-Form Actions" on page 550): | 566 * data was accessed (see "Submit-Form Actions" on page 550): |
591 * 0 Not accessed via a form submission | 567 * 0 Not accessed via a form submission |
592 * 1 Accessed via an HTTP GET request | 568 * 1 Accessed via an HTTP GET request |
593 * 2 Accessed via an HTTP POST request | 569 * 2 Accessed via an HTTP POST request |
594 * This entry should be present only in source information dictionaries associa
ted with | 570 * This entry should be present only in source information dictionaries associa
ted with |
595 * page sets. Default value: 0. | 571 * page sets. Default value: 0. |
596 **/ | 572 **/ |
597 bool has_S() const { | 573 bool has_S() const { |
598 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "
", NULL)); | 574 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "
", NULL)); |
599 } | 575 } |
600 | 576 |
601 long S() const { | 577 long S() const; |
602 long ret; | |
603 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re
t)) return ret; | |
604 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
605 return 0; | |
606 } | |
607 | |
608 /** (Optional; must be an indirect reference) A command dictionary (see "Command
Dic- | 578 /** (Optional; must be an indirect reference) A command dictionary (see "Command
Dic- |
609 * tionaries" on page 672) describing the command that caused the source data t
o be | 579 * tionaries" on page 672) describing the command that caused the source data t
o be |
610 * retrieved. This entry should be present only in source information dictionar
ies associ- | 580 * retrieved. This entry should be present only in source information dictionar
ies associ- |
611 * ated with page sets. | 581 * ated with page sets. |
612 **/ | 582 **/ |
613 bool has_C() const { | 583 bool has_C() const { |
614 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "
", NULL)); | 584 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "
", NULL)); |
615 } | 585 } |
616 | 586 |
617 SkPdfDictionary* C() const { | 587 SkPdfDictionary* C() const; |
618 SkPdfDictionary* ret; | |
619 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "
", &ret)) return ret; | |
620 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
621 return NULL; | |
622 } | |
623 | |
624 }; | 588 }; |
625 | 589 |
626 #endif // __DEFINED__SkPdfSourceInformationDictionary | 590 #endif // __DEFINED__SkPdfSourceInformationDictionary |
OLD | NEW |