Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: experimental/PdfViewer/autogen/SkPdfSignatureDictionary_autogen.h

Issue 17856004: refactoring for pdf viewer lib (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #ifndef __DEFINED__SkPdfSignatureDictionary 1 #ifndef __DEFINED__SkPdfSignatureDictionary
2 #define __DEFINED__SkPdfSignatureDictionary 2 #define __DEFINED__SkPdfSignatureDictionary
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 signature dictionary 9 // Entries in a signature dictionary
10 class SkPdfSignatureDictionary : public SkPdfDictionary { 10 class SkPdfSignatureDictionary : public SkPdfDictionary {
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 525
526 SkPdfSignatureDictionary& operator=(const SkPdfSignatureDictionary& from) {thi s->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *thi s;} 526 SkPdfSignatureDictionary& operator=(const SkPdfSignatureDictionary& from) {thi s->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *thi s;}
527 527
528 /** (Optional) The type of PDF object that this dictionary describes; if present , 528 /** (Optional) The type of PDF object that this dictionary describes; if present ,
529 * must be Sig for a signature dictionary. 529 * must be Sig for a signature dictionary.
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; inheritable) The name of the signature handler to be used for 536 /** (Required; inheritable) The name of the signature handler to be used for
543 * authenticating the field's contents, such as Adobe.PPKLite, Entrust.PPKEF, 537 * authenticating the field's contents, such as Adobe.PPKLite, Entrust.PPKEF,
544 * CICI.SignIt, or VeriSign.PPKVS. 538 * CICI.SignIt, or VeriSign.PPKVS.
545 **/ 539 **/
546 bool has_Filter() const { 540 bool has_Filter() const {
547 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Filte r", "", NULL)); 541 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Filte r", "", NULL));
548 } 542 }
549 543
550 std::string Filter() const { 544 std::string Filter() const;
551 std::string ret;
552 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Filter", "" , &ret)) return ret;
553 // TODO(edisonn): warn about missing required field, assert for known good p dfs
554 return "";
555 }
556
557 /** (Optional) The name of a specific submethod of the specified handler. 545 /** (Optional) The name of a specific submethod of the specified handler.
558 **/ 546 **/
559 bool has_SubFilter() const { 547 bool has_SubFilter() const {
560 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SubFi lter", "", NULL)); 548 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SubFi lter", "", NULL));
561 } 549 }
562 550
563 std::string SubFilter() const { 551 std::string SubFilter() const;
564 std::string ret;
565 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SubFilter", "", &ret)) return ret;
566 // TODO(edisonn): warn about missing required field, assert for known good p dfs
567 return "";
568 }
569
570 /** (Required) An array of pairs of integers (starting byte offset, length in by tes) 552 /** (Required) An array of pairs of integers (starting byte offset, length in by tes)
571 * describing the exact byte range for the digest calculation. Multiple discont ig- 553 * describing the exact byte range for the digest calculation. Multiple discont ig-
572 * uous byte ranges may be used to describe a digest that does not include the 554 * uous byte ranges may be used to describe a digest that does not include the
573 * signature token itself. 555 * signature token itself.
574 **/ 556 **/
575 bool has_ByteRange() const { 557 bool has_ByteRange() const {
576 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ByteR ange", "", NULL)); 558 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ByteR ange", "", NULL));
577 } 559 }
578 560
579 SkPdfArray* ByteRange() const { 561 SkPdfArray* ByteRange() const;
580 SkPdfArray* ret;
581 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ByteRange" , "", &ret)) return ret;
582 // TODO(edisonn): warn about missing required field, assert for known good p dfs
583 return NULL;
584 }
585
586 /** (Required) The encrypted signature token. 562 /** (Required) The encrypted signature token.
587 **/ 563 **/
588 bool has_Contents() const { 564 bool has_Contents() const {
589 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte nts", "", NULL)); 565 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte nts", "", NULL));
590 } 566 }
591 567
592 std::string Contents() const { 568 std::string Contents() const;
593 std::string ret;
594 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents" , "", &ret)) return ret;
595 // TODO(edisonn): warn about missing required field, assert for known good p dfs
596 return "";
597 }
598
599 /** (Optional) The name of the person or authority signing the document. 569 /** (Optional) The name of the person or authority signing the document.
600 **/ 570 **/
601 bool has_Name() const { 571 bool has_Name() const {
602 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name" , "", NULL)); 572 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name" , "", NULL));
603 } 573 }
604 574
605 std::string Name() const { 575 std::string Name() const;
606 std::string ret;
607 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "" , &ret)) return ret;
608 // TODO(edisonn): warn about missing required field, assert for known good p dfs
609 return "";
610 }
611
612 /** (Optional) The time of signing. Depending on the signature handler, this 576 /** (Optional) The time of signing. Depending on the signature handler, this
613 * may be a normal unverified computer time or a time generated in a verifiable 577 * may be a normal unverified computer time or a time generated in a verifiable
614 * way from a secure time server. 578 * way from a secure time server.
615 **/ 579 **/
616 bool has_M() const { 580 bool has_M() const {
617 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", " ", NULL)); 581 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", " ", NULL));
618 } 582 }
619 583
620 SkPdfDate M() const { 584 SkPdfDate M() const;
621 SkPdfDate ret;
622 if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "", &re t)) return ret;
623 // TODO(edisonn): warn about missing required field, assert for known good p dfs
624 return SkPdfDate();
625 }
626
627 /** (Optional) The CPU host name or physical location of the signing. 585 /** (Optional) The CPU host name or physical location of the signing.
628 **/ 586 **/
629 bool has_Location() const { 587 bool has_Location() const {
630 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Locat ion", "", NULL)); 588 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Locat ion", "", NULL));
631 } 589 }
632 590
633 std::string Location() const { 591 std::string Location() const;
634 std::string ret;
635 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Location" , "", &ret)) return ret;
636 // TODO(edisonn): warn about missing required field, assert for known good p dfs
637 return "";
638 }
639
640 /** (Optional) The reason for the signing, such as (I agree...). 592 /** (Optional) The reason for the signing, such as (I agree...).
641 **/ 593 **/
642 bool has_Reason() const { 594 bool has_Reason() const {
643 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Reaso n", "", NULL)); 595 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Reaso n", "", NULL));
644 } 596 }
645 597
646 std::string Reason() const { 598 std::string Reason() const;
647 std::string ret;
648 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Reason", "", &ret)) return ret;
649 // TODO(edisonn): warn about missing required field, assert for known good p dfs
650 return "";
651 }
652
653 }; 599 };
654 600
655 #endif // __DEFINED__SkPdfSignatureDictionary 601 #endif // __DEFINED__SkPdfSignatureDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698