OLD | NEW |
1 #ifndef __DEFINED__SkPdfEmbeddedFileParameterDictionary | 1 #ifndef __DEFINED__SkPdfEmbeddedFileParameterDictionary |
2 #define __DEFINED__SkPdfEmbeddedFileParameterDictionary | 2 #define __DEFINED__SkPdfEmbeddedFileParameterDictionary |
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 an embedded file parameter dictionary | 9 // Entries in an embedded file parameter dictionary |
10 class SkPdfEmbeddedFileParameterDictionary : public SkPdfDictionary { | 10 class SkPdfEmbeddedFileParameterDictionary : public SkPdfDictionary { |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 virtual bool valid() const {return true;} | 524 virtual bool valid() const {return true;} |
525 | 525 |
526 SkPdfEmbeddedFileParameterDictionary& operator=(const SkPdfEmbeddedFileParamet
erDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from
.fPodofoObj; return *this;} | 526 SkPdfEmbeddedFileParameterDictionary& operator=(const SkPdfEmbeddedFileParamet
erDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from
.fPodofoObj; return *this;} |
527 | 527 |
528 /** (Optional) The size of the embedded file, in bytes. | 528 /** (Optional) The size of the embedded file, in bytes. |
529 **/ | 529 **/ |
530 bool has_Size() const { | 530 bool has_Size() const { |
531 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Size"
, "", NULL)); | 531 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Size"
, "", NULL)); |
532 } | 532 } |
533 | 533 |
534 long Size() const { | 534 long Size() const; |
535 long ret; | |
536 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Size", "",
&ret)) return ret; | |
537 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
538 return 0; | |
539 } | |
540 | |
541 /** (Optional) The date and time when the embedded file was created. | 535 /** (Optional) The date and time when the embedded file was created. |
542 **/ | 536 **/ |
543 bool has_CreationDate() const { | 537 bool has_CreationDate() const { |
544 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Creat
ionDate", "", NULL)); | 538 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Creat
ionDate", "", NULL)); |
545 } | 539 } |
546 | 540 |
547 SkPdfDate CreationDate() const { | 541 SkPdfDate CreationDate() const; |
548 SkPdfDate ret; | |
549 if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CreationDat
e", "", &ret)) return ret; | |
550 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
551 return SkPdfDate(); | |
552 } | |
553 | |
554 /** (Optional) The date and time when the embedded file was last modified. | 542 /** (Optional) The date and time when the embedded file was last modified. |
555 **/ | 543 **/ |
556 bool has_ModDate() const { | 544 bool has_ModDate() const { |
557 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ModDa
te", "", NULL)); | 545 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ModDa
te", "", NULL)); |
558 } | 546 } |
559 | 547 |
560 SkPdfDate ModDate() const { | 548 SkPdfDate ModDate() const; |
561 SkPdfDate ret; | |
562 if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ModDate", "
", &ret)) return ret; | |
563 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
564 return SkPdfDate(); | |
565 } | |
566 | |
567 /** (Optional) A subdictionary containing additional information specific to | 549 /** (Optional) A subdictionary containing additional information specific to |
568 * Mac OS files (see Table 3.35). | 550 * Mac OS files (see Table 3.35). |
569 **/ | 551 **/ |
570 bool has_Mac() const { | 552 bool has_Mac() const { |
571 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mac",
"", NULL)); | 553 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mac",
"", NULL)); |
572 } | 554 } |
573 | 555 |
574 SkPdfDictionary* Mac() const { | 556 SkPdfDictionary* Mac() const; |
575 SkPdfDictionary* ret; | |
576 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mac",
"", &ret)) return ret; | |
577 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
578 return NULL; | |
579 } | |
580 | |
581 /** (Optional) A 16-byte string that is the checksum of the bytes of the uncom- | 557 /** (Optional) A 16-byte string that is the checksum of the bytes of the uncom- |
582 * pressed embedded file. The checksum is calculated by applying the standard | 558 * pressed embedded file. The checksum is calculated by applying the standard |
583 * MD5 message-digest algorithm (described in Internet RFC 1321, The MD5 | 559 * MD5 message-digest algorithm (described in Internet RFC 1321, The MD5 |
584 * Message-Digest Algorithm; see the Bibliography) to the bytes of the embedded | 560 * Message-Digest Algorithm; see the Bibliography) to the bytes of the embedded |
585 * file stream. | 561 * file stream. |
586 **/ | 562 **/ |
587 bool has_CheckSum() const { | 563 bool has_CheckSum() const { |
588 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Check
Sum", "", NULL)); | 564 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Check
Sum", "", NULL)); |
589 } | 565 } |
590 | 566 |
591 std::string CheckSum() const { | 567 std::string CheckSum() const; |
592 std::string ret; | |
593 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CheckSum"
, "", &ret)) return ret; | |
594 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
595 return ""; | |
596 } | |
597 | |
598 }; | 568 }; |
599 | 569 |
600 #endif // __DEFINED__SkPdfEmbeddedFileParameterDictionary | 570 #endif // __DEFINED__SkPdfEmbeddedFileParameterDictionary |
OLD | NEW |