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

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

Issue 16975013: Deal with ca and CA transparency operators in pdf. add comments to generated classes. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 6 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 "SkPdfEnums_autogen.h" 4 #include "SkPdfEnums_autogen.h"
5 #include "SkPdfArray_autogen.h" 5 #include "SkPdfArray_autogen.h"
6 #include "SkPdfDictionary_autogen.h" 6 #include "SkPdfDictionary_autogen.h"
7 7
8 // Entries in a signature dictionary
8 class SkPdfSignatureDictionary : public SkPdfDictionary { 9 class SkPdfSignatureDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kSignatureDictionary_SkPdfObj ectType;} 11 virtual SkPdfObjectType getType() const { return kSignatureDictionary_SkPdfObj ectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kSignatu reDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kSignatu reDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfSignatureDictionary* asSignatureDictionary() {return this;} 14 virtual SkPdfSignatureDictionary* asSignatureDictionary() {return this;}
14 virtual const SkPdfSignatureDictionary* asSignatureDictionary() const {return this;} 15 virtual const SkPdfSignatureDictionary* asSignatureDictionary() const {return this;}
15 16
16 private: 17 private:
17 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return NULL;} 18 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return NULL;}
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 515
515 public: 516 public:
516 private: 517 private:
517 public: 518 public:
518 SkPdfSignatureDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObje ct* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfSignatureDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObje ct* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
519 520
520 virtual bool valid() const {return true;} 521 virtual bool valid() const {return true;}
521 522
522 SkPdfSignatureDictionary& operator=(const SkPdfSignatureDictionary& from) {thi s->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *thi s;} 523 SkPdfSignatureDictionary& operator=(const SkPdfSignatureDictionary& from) {thi s->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *thi s;}
523 524
525 /** (Optional) The type of PDF object that this dictionary describes; if present ,
526 * must be Sig for a signature dictionary.
527 **/
528 bool has_Type() const {
529 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type" , "", NULL));
530 }
531
524 std::string Type() const { 532 std::string Type() const {
525 std::string ret; 533 std::string ret;
526 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret; 534 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
527 // TODO(edisonn): warn about missing required field, assert for known good p dfs 535 // TODO(edisonn): warn about missing required field, assert for known good p dfs
528 return ""; 536 return "";
529 } 537 }
530 538
539 /** (Required; inheritable) The name of the signature handler to be used for
540 * authenticating the field's contents, such as Adobe.PPKLite, Entrust.PPKEF,
541 * CICI.SignIt, or VeriSign.PPKVS.
542 **/
543 bool has_Filter() const {
544 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Filte r", "", NULL));
545 }
546
531 std::string Filter() const { 547 std::string Filter() const {
532 std::string ret; 548 std::string ret;
533 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Filter", "" , &ret)) return ret; 549 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Filter", "" , &ret)) return ret;
534 // TODO(edisonn): warn about missing required field, assert for known good p dfs 550 // TODO(edisonn): warn about missing required field, assert for known good p dfs
535 return ""; 551 return "";
536 } 552 }
537 553
554 /** (Optional) The name of a specific submethod of the specified handler.
555 **/
556 bool has_SubFilter() const {
557 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SubFi lter", "", NULL));
558 }
559
538 std::string SubFilter() const { 560 std::string SubFilter() const {
539 std::string ret; 561 std::string ret;
540 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SubFilter", "", &ret)) return ret; 562 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SubFilter", "", &ret)) return ret;
541 // TODO(edisonn): warn about missing required field, assert for known good p dfs 563 // TODO(edisonn): warn about missing required field, assert for known good p dfs
542 return ""; 564 return "";
543 } 565 }
544 566
567 /** (Required) An array of pairs of integers (starting byte offset, length in by tes)
568 * describing the exact byte range for the digest calculation. Multiple discont ig-
569 * uous byte ranges may be used to describe a digest that does not include the
570 * signature token itself.
571 **/
572 bool has_ByteRange() const {
573 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ByteR ange", "", NULL));
574 }
575
545 SkPdfArray ByteRange() const { 576 SkPdfArray ByteRange() const {
546 SkPdfArray ret; 577 SkPdfArray ret;
547 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ByteRange" , "", &ret)) return ret; 578 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ByteRange" , "", &ret)) return ret;
548 // TODO(edisonn): warn about missing required field, assert for known good p dfs 579 // TODO(edisonn): warn about missing required field, assert for known good p dfs
549 return SkPdfArray(); 580 return SkPdfArray();
550 } 581 }
551 582
583 /** (Required) The encrypted signature token.
584 **/
585 bool has_Contents() const {
586 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte nts", "", NULL));
587 }
588
552 std::string Contents() const { 589 std::string Contents() const {
553 std::string ret; 590 std::string ret;
554 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents" , "", &ret)) return ret; 591 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents" , "", &ret)) return ret;
555 // TODO(edisonn): warn about missing required field, assert for known good p dfs 592 // TODO(edisonn): warn about missing required field, assert for known good p dfs
556 return ""; 593 return "";
557 } 594 }
558 595
596 /** (Optional) The name of the person or authority signing the document.
597 **/
598 bool has_Name() const {
599 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name" , "", NULL));
600 }
601
559 std::string Name() const { 602 std::string Name() const {
560 std::string ret; 603 std::string ret;
561 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "" , &ret)) return ret; 604 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Name", "" , &ret)) return ret;
562 // TODO(edisonn): warn about missing required field, assert for known good p dfs 605 // TODO(edisonn): warn about missing required field, assert for known good p dfs
563 return ""; 606 return "";
564 } 607 }
565 608
609 /** (Optional) The time of signing. Depending on the signature handler, this
610 * may be a normal unverified computer time or a time generated in a verifiable
611 * way from a secure time server.
612 **/
613 bool has_M() const {
614 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", " ", NULL));
615 }
616
566 SkPdfDate M() const { 617 SkPdfDate M() const {
567 SkPdfDate ret; 618 SkPdfDate ret;
568 if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "", &re t)) return ret; 619 if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "", &re t)) return ret;
569 // TODO(edisonn): warn about missing required field, assert for known good p dfs 620 // TODO(edisonn): warn about missing required field, assert for known good p dfs
570 return SkPdfDate(); 621 return SkPdfDate();
571 } 622 }
572 623
624 /** (Optional) The CPU host name or physical location of the signing.
625 **/
626 bool has_Location() const {
627 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Locat ion", "", NULL));
628 }
629
573 std::string Location() const { 630 std::string Location() const {
574 std::string ret; 631 std::string ret;
575 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Location" , "", &ret)) return ret; 632 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Location" , "", &ret)) return ret;
576 // TODO(edisonn): warn about missing required field, assert for known good p dfs 633 // TODO(edisonn): warn about missing required field, assert for known good p dfs
577 return ""; 634 return "";
578 } 635 }
579 636
637 /** (Optional) The reason for the signing, such as (I agree...).
638 **/
639 bool has_Reason() const {
640 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Reaso n", "", NULL));
641 }
642
580 std::string Reason() const { 643 std::string Reason() const {
581 std::string ret; 644 std::string ret;
582 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Reason", "", &ret)) return ret; 645 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Reason", "", &ret)) return ret;
583 // TODO(edisonn): warn about missing required field, assert for known good p dfs 646 // TODO(edisonn): warn about missing required field, assert for known good p dfs
584 return ""; 647 return "";
585 } 648 }
586 649
587 }; 650 };
588 651
589 #endif // __DEFINED__SkPdfSignatureDictionary 652 #endif // __DEFINED__SkPdfSignatureDictionary
OLDNEW
« no previous file with comments | « experimental/PdfViewer/SkPdfShadingDictionary_autogen.h ('k') | experimental/PdfViewer/SkPdfSoftMaskDictionary_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698