OLD | NEW |
1 #ifndef __DEFINED__SkPdfWebCaptureCommandDictionary | 1 #ifndef __DEFINED__SkPdfWebCaptureCommandDictionary |
2 #define __DEFINED__SkPdfWebCaptureCommandDictionary | 2 #define __DEFINED__SkPdfWebCaptureCommandDictionary |
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 Web Capture command dictionary |
8 class SkPdfWebCaptureCommandDictionary : public SkPdfDictionary { | 9 class SkPdfWebCaptureCommandDictionary : public SkPdfDictionary { |
9 public: | 10 public: |
10 virtual SkPdfObjectType getType() const { return kWebCaptureCommandDictionary_
SkPdfObjectType;} | 11 virtual SkPdfObjectType getType() const { return kWebCaptureCommandDictionary_
SkPdfObjectType;} |
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kWebCapt
ureCommandDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kWebCapt
ureCommandDictionary_SkPdfObjectType + 1);} |
12 public: | 13 public: |
13 virtual SkPdfWebCaptureCommandDictionary* asWebCaptureCommandDictionary() {ret
urn this;} | 14 virtual SkPdfWebCaptureCommandDictionary* asWebCaptureCommandDictionary() {ret
urn this;} |
14 virtual const SkPdfWebCaptureCommandDictionary* asWebCaptureCommandDictionary(
) const {return this;} | 15 virtual const SkPdfWebCaptureCommandDictionary* asWebCaptureCommandDictionary(
) 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 Loading... |
514 | 515 |
515 public: | 516 public: |
516 private: | 517 private: |
517 public: | 518 public: |
518 SkPdfWebCaptureCommandDictionary(const PdfMemDocument* podofoDoc = NULL, const
PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfWebCaptureCommandDictionary(const PdfMemDocument* podofoDoc = NULL, const
PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} |
519 | 520 |
520 virtual bool valid() const {return true;} | 521 virtual bool valid() const {return true;} |
521 | 522 |
522 SkPdfWebCaptureCommandDictionary& operator=(const SkPdfWebCaptureCommandDictio
nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo
Obj; return *this;} | 523 SkPdfWebCaptureCommandDictionary& operator=(const SkPdfWebCaptureCommandDictio
nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo
Obj; return *this;} |
523 | 524 |
| 525 /** (Required) The initial URL from which source data was requested. |
| 526 **/ |
| 527 bool has_URL() const { |
| 528 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "URL",
"", NULL)); |
| 529 } |
| 530 |
524 std::string URL() const { | 531 std::string URL() const { |
525 std::string ret; | 532 std::string ret; |
526 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "URL", "",
&ret)) return ret; | 533 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "URL", "",
&ret)) return ret; |
527 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
528 return ""; | 535 return ""; |
529 } | 536 } |
530 | 537 |
| 538 /** (Optional) The number of levels of pages retrieved from the initial URL. Def
ault |
| 539 * value: 1. |
| 540 **/ |
| 541 bool has_L() const { |
| 542 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "L", "
", NULL)); |
| 543 } |
| 544 |
531 long L() const { | 545 long L() const { |
532 long ret; | 546 long ret; |
533 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "L", "", &re
t)) return ret; | 547 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "L", "", &re
t)) return ret; |
534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 548 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
535 return 0; | 549 return 0; |
536 } | 550 } |
537 | 551 |
| 552 /** (Optional) A set of flags specifying various characteristics of the command
(see |
| 553 * Table 9.39). Default value: 0. |
| 554 **/ |
| 555 bool has_F() const { |
| 556 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "
", NULL)); |
| 557 } |
| 558 |
538 long F() const { | 559 long F() const { |
539 long ret; | 560 long ret; |
540 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &re
t)) return ret; | 561 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &re
t)) return ret; |
541 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 562 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
542 return 0; | 563 return 0; |
543 } | 564 } |
544 | 565 |
| 566 /** (Optional) Data that was posted to the URL. |
| 567 **/ |
| 568 bool has_P() const { |
| 569 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "
", NULL)); |
| 570 } |
| 571 |
545 bool isPAString() const { | 572 bool isPAString() const { |
546 SkPdfObject* ret = NULL; | 573 SkPdfObject* ret = NULL; |
547 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "",
&ret)) return false; | 574 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "",
&ret)) return false; |
548 return ret->podofo()->GetDataType() == ePdfDataType_String || ret->podofo()-
>GetDataType() == ePdfDataType_HexString; | 575 return ret->podofo()->GetDataType() == ePdfDataType_String || ret->podofo()-
>GetDataType() == ePdfDataType_HexString; |
549 } | 576 } |
550 | 577 |
551 std::string getPAsString() const { | 578 std::string getPAsString() const { |
552 std::string ret = ""; | 579 std::string ret = ""; |
553 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", &
ret)) return ret; | 580 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", &
ret)) return ret; |
554 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 581 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
555 return ""; | 582 return ""; |
556 } | 583 } |
557 | 584 |
558 bool isPAStream() const { | 585 bool isPAStream() const { |
559 SkPdfObject* ret = NULL; | 586 SkPdfObject* ret = NULL; |
560 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "",
&ret)) return false; | 587 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "",
&ret)) return false; |
561 return ret->podofo()->HasStream(); | 588 return ret->podofo()->HasStream(); |
562 } | 589 } |
563 | 590 |
564 SkPdfStream getPAsStream() const { | 591 SkPdfStream getPAsStream() const { |
565 SkPdfStream ret = SkPdfStream(); | 592 SkPdfStream ret = SkPdfStream(); |
566 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", &
ret)) return ret; | 593 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "P", "", &
ret)) return ret; |
567 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 594 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
568 return SkPdfStream(); | 595 return SkPdfStream(); |
569 } | 596 } |
570 | 597 |
| 598 /** (Optional) A content type describing the data posted to the URL. Default val
ue: |
| 599 * application/x-www-form-urlencoded. |
| 600 **/ |
| 601 bool has_CT() const { |
| 602 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CT",
"", NULL)); |
| 603 } |
| 604 |
571 std::string CT() const { | 605 std::string CT() const { |
572 std::string ret; | 606 std::string ret; |
573 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CT", "",
&ret)) return ret; | 607 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CT", "",
&ret)) return ret; |
574 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 608 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
575 return ""; | 609 return ""; |
576 } | 610 } |
577 | 611 |
| 612 /** (Optional) Additional HTTP request headers sent to the URL. |
| 613 **/ |
| 614 bool has_H() const { |
| 615 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "
", NULL)); |
| 616 } |
| 617 |
578 std::string H() const { | 618 std::string H() const { |
579 std::string ret; | 619 std::string ret; |
580 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "", &
ret)) return ret; | 620 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "H", "", &
ret)) return ret; |
581 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 621 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
582 return ""; | 622 return ""; |
583 } | 623 } |
584 | 624 |
| 625 /** (Optional) A command settings dictionary containing settings used in the con
- |
| 626 * version process (see "Command Settings" on page 674). |
| 627 **/ |
| 628 bool has_S() const { |
| 629 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "
", NULL)); |
| 630 } |
| 631 |
585 SkPdfDictionary* S() const { | 632 SkPdfDictionary* S() const { |
586 SkPdfDictionary* ret; | 633 SkPdfDictionary* ret; |
587 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "
", &ret)) return ret; | 634 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "
", &ret)) return ret; |
588 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 635 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
589 return NULL; | 636 return NULL; |
590 } | 637 } |
591 | 638 |
592 }; | 639 }; |
593 | 640 |
594 #endif // __DEFINED__SkPdfWebCaptureCommandDictionary | 641 #endif // __DEFINED__SkPdfWebCaptureCommandDictionary |
OLD | NEW |