OLD | NEW |
(Empty) | |
| 1 #include "SkPdfSignatureDictionary_autogen.h" |
| 2 |
| 3 |
| 4 #include "SkPdfNativeDoc.h" |
| 5 SkString SkPdfSignatureDictionary::Type(SkPdfNativeDoc* doc) { |
| 6 SkPdfNativeObject* ret = get("Type", ""); |
| 7 if (doc) {ret = doc->resolveReference(ret);} |
| 8 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe
ference())) return ret->nameValue2(); |
| 9 // TODO(edisonn): warn about missing default value for optional fields |
| 10 return SkString(); |
| 11 } |
| 12 |
| 13 bool SkPdfSignatureDictionary::has_Type() const { |
| 14 return get("Type", "") != NULL; |
| 15 } |
| 16 |
| 17 SkString SkPdfSignatureDictionary::Filter(SkPdfNativeDoc* doc) { |
| 18 SkPdfNativeObject* ret = get("Filter", ""); |
| 19 if (doc) {ret = doc->resolveReference(ret);} |
| 20 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe
ference())) return ret->nameValue2(); |
| 21 // TODO(edisonn): warn about missing required field, assert for known good pdf
s |
| 22 return SkString(); |
| 23 } |
| 24 |
| 25 bool SkPdfSignatureDictionary::has_Filter() const { |
| 26 return get("Filter", "") != NULL; |
| 27 } |
| 28 |
| 29 SkString SkPdfSignatureDictionary::SubFilter(SkPdfNativeDoc* doc) { |
| 30 SkPdfNativeObject* ret = get("SubFilter", ""); |
| 31 if (doc) {ret = doc->resolveReference(ret);} |
| 32 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe
ference())) return ret->nameValue2(); |
| 33 // TODO(edisonn): warn about missing default value for optional fields |
| 34 return SkString(); |
| 35 } |
| 36 |
| 37 bool SkPdfSignatureDictionary::has_SubFilter() const { |
| 38 return get("SubFilter", "") != NULL; |
| 39 } |
| 40 |
| 41 SkPdfArray* SkPdfSignatureDictionary::ByteRange(SkPdfNativeDoc* doc) { |
| 42 SkPdfNativeObject* ret = get("ByteRange", ""); |
| 43 if (doc) {ret = doc->resolveReference(ret);} |
| 44 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR
eference())) return (SkPdfArray*)ret; |
| 45 // TODO(edisonn): warn about missing required field, assert for known good pdf
s |
| 46 return NULL; |
| 47 } |
| 48 |
| 49 bool SkPdfSignatureDictionary::has_ByteRange() const { |
| 50 return get("ByteRange", "") != NULL; |
| 51 } |
| 52 |
| 53 SkString SkPdfSignatureDictionary::Contents(SkPdfNativeDoc* doc) { |
| 54 SkPdfNativeObject* ret = get("Contents", ""); |
| 55 if (doc) {ret = doc->resolveReference(ret);} |
| 56 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret-
>isReference())) return ret->stringValue2(); |
| 57 // TODO(edisonn): warn about missing required field, assert for known good pdf
s |
| 58 return SkString(); |
| 59 } |
| 60 |
| 61 bool SkPdfSignatureDictionary::has_Contents() const { |
| 62 return get("Contents", "") != NULL; |
| 63 } |
| 64 |
| 65 SkString SkPdfSignatureDictionary::Name(SkPdfNativeDoc* doc) { |
| 66 SkPdfNativeObject* ret = get("Name", ""); |
| 67 if (doc) {ret = doc->resolveReference(ret);} |
| 68 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret-
>isReference())) return ret->stringValue2(); |
| 69 // TODO(edisonn): warn about missing default value for optional fields |
| 70 return SkString(); |
| 71 } |
| 72 |
| 73 bool SkPdfSignatureDictionary::has_Name() const { |
| 74 return get("Name", "") != NULL; |
| 75 } |
| 76 |
| 77 SkPdfDate SkPdfSignatureDictionary::M(SkPdfNativeDoc* doc) { |
| 78 SkPdfNativeObject* ret = get("M", ""); |
| 79 if (doc) {ret = doc->resolveReference(ret);} |
| 80 if ((ret != NULL && ret->isDate()) || (doc == NULL && ret != NULL && ret->isRe
ference())) return ret->dateValue(); |
| 81 // TODO(edisonn): warn about missing default value for optional fields |
| 82 return SkPdfDate(); |
| 83 } |
| 84 |
| 85 bool SkPdfSignatureDictionary::has_M() const { |
| 86 return get("M", "") != NULL; |
| 87 } |
| 88 |
| 89 SkString SkPdfSignatureDictionary::Location(SkPdfNativeDoc* doc) { |
| 90 SkPdfNativeObject* ret = get("Location", ""); |
| 91 if (doc) {ret = doc->resolveReference(ret);} |
| 92 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret-
>isReference())) return ret->stringValue2(); |
| 93 // TODO(edisonn): warn about missing default value for optional fields |
| 94 return SkString(); |
| 95 } |
| 96 |
| 97 bool SkPdfSignatureDictionary::has_Location() const { |
| 98 return get("Location", "") != NULL; |
| 99 } |
| 100 |
| 101 SkString SkPdfSignatureDictionary::Reason(SkPdfNativeDoc* doc) { |
| 102 SkPdfNativeObject* ret = get("Reason", ""); |
| 103 if (doc) {ret = doc->resolveReference(ret);} |
| 104 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret-
>isReference())) return ret->stringValue2(); |
| 105 // TODO(edisonn): warn about missing default value for optional fields |
| 106 return SkString(); |
| 107 } |
| 108 |
| 109 bool SkPdfSignatureDictionary::has_Reason() const { |
| 110 return get("Reason", "") != NULL; |
| 111 } |
| 112 |
OLD | NEW |