Source

scope.bitbucket.org / scope / services / ResourceManager / ResourceManager_1_2.html

Full commit
   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>ResourceManager 1.2 &mdash; Scope Interface v1 documentation</title>
    <link rel="stylesheet" href="../../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" media="print" href="../../_static/print.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '1',
        COLLAPSE_MODINDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <link rel="copyright" title="Copyright" href="../../copyright.html" />
    <link rel="top" title="Scope Interface v1 documentation" href="../../index.html" />
    <link rel="up" title="ResourceManager" href="../ResourceManager.html" />
    <link rel="next" title="Scope" href="../Scope.html" />
    <link rel="prev" title="ResourceManager 1.1" href="ResourceManager_1_1.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../Scope.html" title="Scope"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="ResourceManager_1_1.html" title="ResourceManager 1.1"
             accesskey="P">previous</a> |</li>
        <li><a href="../../index.html">Scope Interface v1 documentation</a> &raquo;</li>
          <li><a href="../ResourceManager.html" accesskey="U">ResourceManager</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="resourcemanager-1-2">
<h1>ResourceManager 1.2<a class="headerlink" href="#resourcemanager-1-2" title="Permalink to this headline"></a></h1>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Generated:</th><td class="field-body">hob rst-doc</td>
</tr>
<tr class="field"><th class="field-name">Version:</th><td class="field-body">1.2</td>
</tr>
<tr class="field"><th class="field-name">Status:</th><td class="field-body">Published</td>
</tr>
</tbody>
</table>
<div class="section" id="service">
<h2>Service<a class="headerlink" href="#service" title="Permalink to this headline"></a></h2>
<p><strong>ResourceManager</strong> is a tool for monitoring, modifying, and creating
network activity.</p>
<div class="section" id="id-fields">
<h3>ID fields<a class="headerlink" href="#id-fields" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li>Resource IDs: a <em>resource</em> is essentially what a URL points to. For each
unique URL, there is at least one unique resource ID. Resources are kept
alive as long as something is using them. Note that ResourceManager does
not retain resources; Opera may free resources if they are not used
anywhere. An OnUrlUnload event will be sent in this case.</li>
<li>Request IDs: represents HTTP requests. The purpose of these IDs is to
make it possible to match related request/response events together.</li>
</ul>
</div>
<div class="section" id="external-id-fields">
<h3>External ID fields<a class="headerlink" href="#external-id-fields" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li>Window IDs are the same in all services, and can be used interchangeably
everywhere. See <em>WindowManager</em> for window-centric commands and events.</li>
<li>Frame IDs are described in <em>DocumentManager</em>.</li>
<li>Document IDs are also described in <em>DocumentManager</em>.</li>
</ul>
</div>
<div class="section" id="changelog">
<h3>Changelog<a class="headerlink" href="#changelog" title="Permalink to this headline"></a></h3>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">1.0:</th><td class="field-body">Initial release.</td>
</tr>
<tr class="field"><th class="field-name">1.1:</th><td class="field-body">Added <cite>GetResourceID</cite>.</td>
</tr>
<tr class="field"><th class="field-name">1.2:</th><td class="field-body">Added <cite>LoadOrigin</cite>.</td>
</tr>
</tbody>
</table>
<div class="highlight-c"><div class="highlight"><pre><span class="n">service</span> <span class="n">ResourceManager</span>
<span class="p">{</span>
  <span class="n">option</span> <span class="p">(</span><span class="n">version</span><span class="p">)</span> <span class="o">=</span> <span class="s">&quot;1.2&quot;</span><span class="p">;</span>


  <span class="n">command</span> <span class="n">GetResource</span><span class="p">(</span><span class="n">GetResourceArg</span><span class="p">)</span>                     <span class="n">returns</span> <span class="p">(</span><span class="n">ResourceData</span><span class="p">)</span>     <span class="o">=</span>  <span class="mi">1</span><span class="p">;</span>
  <span class="n">command</span> <span class="n">SetReloadPolicy</span><span class="p">(</span><span class="n">SetReloadPolicyArg</span><span class="p">)</span>             <span class="n">returns</span> <span class="p">(</span><span class="n">Default</span><span class="p">)</span>          <span class="o">=</span>  <span class="mi">2</span><span class="p">;</span>
  <span class="n">command</span> <span class="n">SetResponseMode</span><span class="p">(</span><span class="n">SetResponseModeArg</span><span class="p">)</span>             <span class="n">returns</span> <span class="p">(</span><span class="n">Default</span><span class="p">)</span>          <span class="o">=</span>  <span class="mi">3</span><span class="p">;</span>
  <span class="n">command</span> <span class="n">SetRequestMode</span><span class="p">(</span><span class="n">SetRequestModeArg</span><span class="p">)</span>               <span class="n">returns</span> <span class="p">(</span><span class="n">Default</span><span class="p">)</span>          <span class="o">=</span>  <span class="mi">4</span><span class="p">;</span>
  <span class="n">command</span> <span class="n">AddHeaderOverrides</span><span class="p">(</span><span class="n">AddHeaderOverridesArg</span><span class="p">)</span>       <span class="n">returns</span> <span class="p">(</span><span class="n">Default</span><span class="p">)</span>          <span class="o">=</span>  <span class="mi">5</span><span class="p">;</span>
  <span class="n">command</span> <span class="n">RemoveHeaderOverrides</span><span class="p">(</span><span class="n">RemoveHeaderOverridesArg</span><span class="p">)</span> <span class="n">returns</span> <span class="p">(</span><span class="n">Default</span><span class="p">)</span>          <span class="o">=</span>  <span class="mi">6</span><span class="p">;</span>
  <span class="n">command</span> <span class="n">ClearHeaderOverrides</span><span class="p">(</span><span class="n">Default</span><span class="p">)</span>                   <span class="n">returns</span> <span class="p">(</span><span class="n">Default</span><span class="p">)</span>          <span class="o">=</span>  <span class="mi">7</span><span class="p">;</span>
  <span class="n">command</span> <span class="n">CreateRequest</span><span class="p">(</span><span class="n">CreateRequestArg</span><span class="p">)</span>                 <span class="n">returns</span> <span class="p">(</span><span class="n">ResourceID</span><span class="p">)</span>       <span class="o">=</span>  <span class="mi">8</span><span class="p">;</span>
  <span class="n">command</span> <span class="n">ClearCache</span><span class="p">(</span><span class="n">Default</span><span class="p">)</span>                             <span class="n">returns</span> <span class="p">(</span><span class="n">Default</span><span class="p">)</span>          <span class="o">=</span>  <span class="mi">9</span><span class="p">;</span>
  <span class="n">command</span> <span class="n">GetResourceID</span><span class="p">(</span><span class="n">GetResourceIDArg</span><span class="p">)</span>                 <span class="n">returns</span> <span class="p">(</span><span class="n">ResourceID</span><span class="p">)</span>       <span class="o">=</span> <span class="mi">21</span><span class="p">;</span>
  <span class="n">event</span>   <span class="n">OnUrlLoad</span>                                       <span class="n">returns</span> <span class="p">(</span><span class="n">UrlLoad</span><span class="p">)</span>          <span class="o">=</span> <span class="mi">10</span><span class="p">;</span>
  <span class="n">event</span>   <span class="n">OnUrlFinished</span>                                   <span class="n">returns</span> <span class="p">(</span><span class="n">UrlFinished</span><span class="p">)</span>      <span class="o">=</span> <span class="mi">11</span><span class="p">;</span>
  <span class="n">event</span>   <span class="n">OnUrlRedirect</span>                                   <span class="n">returns</span> <span class="p">(</span><span class="n">UrlRedirect</span><span class="p">)</span>      <span class="o">=</span> <span class="mi">12</span><span class="p">;</span>
  <span class="n">event</span>   <span class="n">OnUrlUnload</span>                                     <span class="n">returns</span> <span class="p">(</span><span class="n">UrlUnload</span><span class="p">)</span>        <span class="o">=</span> <span class="mi">13</span><span class="p">;</span>
  <span class="n">event</span>   <span class="n">OnRequest</span>                                       <span class="n">returns</span> <span class="p">(</span><span class="n">Request</span><span class="p">)</span>          <span class="o">=</span> <span class="mi">14</span><span class="p">;</span>
  <span class="n">event</span>   <span class="n">OnRequestHeader</span>                                 <span class="n">returns</span> <span class="p">(</span><span class="n">RequestHeader</span><span class="p">)</span>    <span class="o">=</span> <span class="mi">15</span><span class="p">;</span>
  <span class="n">event</span>   <span class="n">OnRequestFinished</span>                               <span class="n">returns</span> <span class="p">(</span><span class="n">RequestFinished</span><span class="p">)</span>  <span class="o">=</span> <span class="mi">16</span><span class="p">;</span>
  <span class="n">event</span>   <span class="n">OnRequestRetry</span>                                  <span class="n">returns</span> <span class="p">(</span><span class="n">RequestRetry</span><span class="p">)</span>     <span class="o">=</span> <span class="mi">17</span><span class="p">;</span>
  <span class="n">event</span>   <span class="n">OnResponse</span>                                      <span class="n">returns</span> <span class="p">(</span><span class="n">Response</span><span class="p">)</span>         <span class="o">=</span> <span class="mi">18</span><span class="p">;</span>
  <span class="n">event</span>   <span class="n">OnResponseHeader</span>                                <span class="n">returns</span> <span class="p">(</span><span class="n">ResponseHeader</span><span class="p">)</span>   <span class="o">=</span> <span class="mi">19</span><span class="p">;</span>
  <span class="n">event</span>   <span class="n">OnResponseFinished</span>                              <span class="n">returns</span> <span class="p">(</span><span class="n">ResponseFinished</span><span class="p">)</span> <span class="o">=</span> <span class="mi">20</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="commands">
<h2>Commands<a class="headerlink" href="#commands" title="Permalink to this headline"></a></h2>
<div class="section" id="addheaderoverrides">
<span id="index-0"></span><h3><tt class="docutils literal"><span class="pre">AddHeaderOverrides</span></tt><a class="headerlink" href="#addheaderoverrides" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>command AddHeaderOverrides(AddHeaderOverridesArg) returns (Default) = 5;</pre>
</div>
<p>Add one or more overrides for HTTP headers. An override can be either adding
a new header, overwriting an existing one, or removing it completely
(if present).</p>
<p>argument:</p>
<div class="highlight-c" id="index-1"><div class="highlight"><pre><span class="n">message</span> <span class="n">AddHeaderOverridesArg</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * A list of headers to override. If the &#39;value&#39; field of any Header</span>
<span class="cm">   * is missing, that header will be removed from the request (if present).</span>
<span class="cm">   */</span>
  <span class="n">repeated</span> <span class="n">Header</span> <span class="n">headerList</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>references:</p>
<div class="highlight-c" id="index-2"><div class="highlight"><pre><span class="n">message</span> <span class="n">Header</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * The name of the HTTP header, for instance &quot;Accept-Charset&quot;.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">string</span> <span class="n">name</span>  <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The value of the HTTP header, for instance &quot;utf-8&quot; when using</span>
<span class="cm">   * Accept-Charset, or &quot;text/html; charset=utf8&quot; for Content-Type.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">string</span> <span class="n">value</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="clearcache">
<span id="index-3"></span><h3><tt class="docutils literal"><span class="pre">ClearCache</span></tt><a class="headerlink" href="#clearcache" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>command ClearCache(Default) returns (Default) = 9;</pre>
</div>
<p>Clear cached resources, or as many of the resources as possible.
(Resources currently in use will not be cleared).</p>
</div>
<div class="section" id="clearheaderoverrides">
<span id="index-4"></span><h3><tt class="docutils literal"><span class="pre">ClearHeaderOverrides</span></tt><a class="headerlink" href="#clearheaderoverrides" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>command ClearHeaderOverrides(Default) returns (Default) = 7;</pre>
</div>
<p>Remove all overrides previously added with AddHeaderOverride.</p>
</div>
<div class="section" id="createrequest">
<span id="index-5"></span><h3><tt class="docutils literal"><span class="pre">CreateRequest</span></tt><a class="headerlink" href="#createrequest" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>command CreateRequest(CreateRequestArg) returns (ResourceID) = 8;</pre>
</div>
<p>Create a HTTP request from scratch. It is possible to let Opera choose some
common headers, or control everything by hand.</p>
<p>argument:</p>
<div class="highlight-c" id="index-6"><div class="highlight"><pre><span class="n">message</span> <span class="n">CreateRequestArg</span>
<span class="p">{</span>
  <span class="n">message</span> <span class="n">Payload</span>
  <span class="p">{</span>
    <span class="cm">/**</span>
<span class="cm">     * The mime type of this payload.</span>
<span class="cm">     */</span>
    <span class="n">required</span> <span class="n">string</span> <span class="n">mimeType</span>   <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * The bytes to use as the payload. If this field is set, the stringData</span>
<span class="cm">     * can not also be set.</span>
<span class="cm">     */</span>
    <span class="n">optional</span> <span class="n">bytes</span>  <span class="n">byteData</span>   <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * The string to use as the payload. This is an alternative to using bytes</span>
<span class="cm">     * directly. If this field is set, byteData can not also be set.</span>
<span class="cm">     */</span>
    <span class="n">optional</span> <span class="n">string</span> <span class="n">stringData</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="p">}</span>

  <span class="k">enum</span> <span class="n">HeaderPolicy</span>
  <span class="p">{</span>
    <span class="cm">/**</span>
<span class="cm">     * Let&#39;s Opera choose request headers depending on how the resource is fetched.</span>
<span class="cm">     * Custom headers will be set but only if allowed.</span>
<span class="cm">     */</span>
    <span class="n">NORMAL</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * Similar to NORMAL but any header in headerList will overwrite those chosen by Opera.</span>
<span class="cm">     */</span>
    <span class="n">OVERWRITE</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * Replaces all headers with the custom ones. Care must be taken as illegal requests can</span>
<span class="cm">     * easily be created with this. It is primarly used for re-running a previous request with</span>
<span class="cm">     * the same or slighly altered headers.</span>
<span class="cm">     */</span>
    <span class="n">REPLACE</span> <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
  <span class="p">}</span>

  <span class="cm">/**</span>
<span class="cm">   * The Window to perform the request in. (The events triggered by this</span>
<span class="cm">   * command will appear to come from this Window).</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">uint32</span>       <span class="n">windowID</span>            <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The URL to request.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">string</span>       <span class="n">url</span>                 <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The HTTP method, e.g. &quot;GET&quot;, &quot;POST&quot;.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">string</span>       <span class="n">method</span>              <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Set HTTP headers for this request. When HeaderPolicy NORMAL is chosen,</span>
<span class="cm">   * Opera will set reasonable default headers. With HeaderPolicy NORMAL, the</span>
<span class="cm">   * following headers can not be set by the caller:</span>
<span class="cm">   *</span>
<span class="cm">   * - Accept-Charset</span>
<span class="cm">   * - Accept-Encoding</span>
<span class="cm">   * - Cache-Control</span>
<span class="cm">   * - Connection</span>
<span class="cm">   * - Cookie</span>
<span class="cm">   * - Cookie2</span>
<span class="cm">   * - Date</span>
<span class="cm">   * - Expect</span>
<span class="cm">   * - Host</span>
<span class="cm">   * - If-Range</span>
<span class="cm">   * - Pragma</span>
<span class="cm">   * - Range</span>
<span class="cm">   * - TE</span>
<span class="cm">   * - Trailer</span>
<span class="cm">   * - Upgrade</span>
<span class="cm">   * - User-Agent</span>
<span class="cm">   * - Via</span>
<span class="cm">   *</span>
<span class="cm">   * Use either HeaderPolicy OVERWRITE, or REPLACE to set these headers.</span>
<span class="cm">   */</span>
  <span class="n">repeated</span> <span class="n">Header</span>       <span class="n">headerList</span>          <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
  <span class="n">optional</span> <span class="n">Payload</span>      <span class="n">payload</span>             <span class="o">=</span> <span class="mi">5</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Controls how custom headers are handled.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">HeaderPolicy</span> <span class="n">headerPolicy</span>        <span class="o">=</span> <span class="mi">6</span> <span class="p">[</span><span class="k">default</span> <span class="o">=</span> <span class="n">NORMAL</span><span class="p">];</span>
  <span class="cm">/**</span>
<span class="cm">   * Override the global reload policy for this resource.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">ReloadPolicy</span> <span class="n">reloadPolicy</span>        <span class="o">=</span> <span class="mi">7</span> <span class="p">[</span><span class="k">default</span> <span class="o">=</span> <span class="n">DEFAULT</span><span class="p">];</span>
  <span class="cm">/**</span>
<span class="cm">   * Override the global request content mode for this resource.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">ContentMode</span>  <span class="n">requestContentMode</span>  <span class="o">=</span> <span class="mi">8</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Override the global response content mode for this resource.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">ContentMode</span>  <span class="n">responseContentMode</span> <span class="o">=</span> <span class="mi">9</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>returns:</p>
<div class="highlight-c" id="index-7"><div class="highlight"><pre><span class="n">message</span> <span class="n">ResourceID</span>
<span class="p">{</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">resourceID</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>references:</p>
<div class="highlight-c" id="index-8"><div class="highlight"><pre><span class="n">message</span> <span class="n">Header</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * The name of the HTTP header, for instance &quot;Accept-Charset&quot;.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">string</span> <span class="n">name</span>  <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The value of the HTTP header, for instance &quot;utf-8&quot; when using</span>
<span class="cm">   * Accept-Charset, or &quot;text/html; charset=utf8&quot; for Content-Type.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">string</span> <span class="n">value</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<div class="highlight-c" id="index-9"><div class="highlight"><pre><span class="n">message</span> <span class="n">ContentMode</span>
<span class="p">{</span>
  <span class="k">enum</span> <span class="n">Transport</span>
  <span class="p">{</span>
    <span class="cm">/**</span>
<span class="cm">     * Send the payload as a string.</span>
<span class="cm">     *</span>
<span class="cm">     * Selecting this transport mode  will automatically enable decoding,</span>
<span class="cm">     * and the string will automatically converted to the correct character</span>
<span class="cm">     * encoding.</span>
<span class="cm">     *</span>
<span class="cm">     * If this transport mode is used an unsuitable content type, the payload</span>
<span class="cm">     * will not be sent (without errors).</span>
<span class="cm">     */</span>
    <span class="n">STRING</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * Send the payload as bytes. When this transport mode is chosen, character</span>
<span class="cm">     * conversion will not be performed. If the payload contains text data, it</span>
<span class="cm">     * will be sent in its original encoding.</span>
<span class="cm">     */</span>
    <span class="n">BYTES</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * Send the payload as a base64-encoded data URI in the string field. When</span>
<span class="cm">     * this transport mode is chosen, character conversion will not be performed.</span>
<span class="cm">     * If the payload contains text data, it will be sent in its original encoding.</span>
<span class="cm">     */</span>
    <span class="n">DATA_URI</span> <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * Do not send the payload at all.</span>
<span class="cm">     */</span>
    <span class="n">OFF</span> <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
  <span class="p">}</span>

  <span class="cm">/**</span>
<span class="cm">   * Indicates how to send the payload.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">Transport</span> <span class="n">transport</span> <span class="o">=</span> <span class="mi">1</span> <span class="p">[</span><span class="k">default</span> <span class="o">=</span> <span class="n">OFF</span><span class="p">];</span>
  <span class="cm">/**</span>
<span class="cm">   * Decode the data (for instance, decompress it, decrypt it, etc). This is</span>
<span class="cm">   * unrelated to character encoding.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">bool</span>      <span class="n">decode</span>    <span class="o">=</span> <span class="mi">2</span> <span class="p">[</span><span class="k">default</span> <span class="o">=</span> <span class="nb">false</span><span class="p">];</span>
  <span class="cm">/**</span>
<span class="cm">   * Even if other conditions are met, do not send the payload if it</span>
<span class="cm">   * exceeds the specified amout (in bytes).</span>
<span class="cm">   *</span>
<span class="cm">   * By default, only payloads under one megabyte are sent.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">uint32</span>    <span class="n">sizeLimit</span> <span class="o">=</span> <span class="mi">3</span> <span class="p">[</span><span class="k">default</span> <span class="o">=</span> <span class="mi">1000000</span><span class="p">];</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="getresource">
<span id="index-10"></span><h3><tt class="docutils literal"><span class="pre">GetResource</span></tt><a class="headerlink" href="#getresource" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>command GetResource(GetResourceArg) returns (ResourceData) = 1;</pre>
</div>
<p>Get ResourceData for a certain resource.</p>
<p>This command provides a way to get data from a resource after
the request has completed, or in cases where there is no request.</p>
<p>It is possible to get the resource with a different content mode
than what has been set by SetResponseMode.</p>
<p>argument:</p>
<div class="highlight-c" id="index-11"><div class="highlight"><pre><span class="n">message</span> <span class="n">GetResourceArg</span>
<span class="p">{</span>
  <span class="n">required</span> <span class="n">uint32</span>      <span class="n">resourceID</span>  <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Use this ContentMode instead of the one configured with</span>
<span class="cm">   * SetResponseModeArg (if any).</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">ContentMode</span> <span class="n">contentMode</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>returns:</p>
<div class="highlight-c" id="index-12"><div class="highlight"><pre><span class="n">message</span> <span class="n">ResourceData</span>
<span class="p">{</span>
  <span class="n">required</span> <span class="n">uint32</span>  <span class="n">resourceID</span>        <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">string</span>  <span class="n">url</span>               <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The used mime type. This may be different from the mime type</span>
<span class="cm">   * advertised in the HTTP headers.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">string</span>  <span class="n">mimeType</span>          <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Original character encoding (if applicable).</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">string</span>  <span class="n">characterEncoding</span> <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Content-Length, as advertised by HTTP headers.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">uint32</span>  <span class="n">contentLength</span>     <span class="o">=</span> <span class="mi">5</span><span class="p">;</span>
  <span class="n">optional</span> <span class="n">Content</span> <span class="n">content</span>           <span class="o">=</span> <span class="mi">6</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>references:</p>
<div class="highlight-c" id="index-13"><div class="highlight"><pre><span class="n">message</span> <span class="n">ContentMode</span>
<span class="p">{</span>
  <span class="k">enum</span> <span class="n">Transport</span>
  <span class="p">{</span>
    <span class="cm">/**</span>
<span class="cm">     * Send the payload as a string.</span>
<span class="cm">     *</span>
<span class="cm">     * Selecting this transport mode  will automatically enable decoding,</span>
<span class="cm">     * and the string will automatically converted to the correct character</span>
<span class="cm">     * encoding.</span>
<span class="cm">     *</span>
<span class="cm">     * If this transport mode is used an unsuitable content type, the payload</span>
<span class="cm">     * will not be sent (without errors).</span>
<span class="cm">     */</span>
    <span class="n">STRING</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * Send the payload as bytes. When this transport mode is chosen, character</span>
<span class="cm">     * conversion will not be performed. If the payload contains text data, it</span>
<span class="cm">     * will be sent in its original encoding.</span>
<span class="cm">     */</span>
    <span class="n">BYTES</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * Send the payload as a base64-encoded data URI in the string field. When</span>
<span class="cm">     * this transport mode is chosen, character conversion will not be performed.</span>
<span class="cm">     * If the payload contains text data, it will be sent in its original encoding.</span>
<span class="cm">     */</span>
    <span class="n">DATA_URI</span> <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * Do not send the payload at all.</span>
<span class="cm">     */</span>
    <span class="n">OFF</span> <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
  <span class="p">}</span>

  <span class="cm">/**</span>
<span class="cm">   * Indicates how to send the payload.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">Transport</span> <span class="n">transport</span> <span class="o">=</span> <span class="mi">1</span> <span class="p">[</span><span class="k">default</span> <span class="o">=</span> <span class="n">OFF</span><span class="p">];</span>
  <span class="cm">/**</span>
<span class="cm">   * Decode the data (for instance, decompress it, decrypt it, etc). This is</span>
<span class="cm">   * unrelated to character encoding.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">bool</span>      <span class="n">decode</span>    <span class="o">=</span> <span class="mi">2</span> <span class="p">[</span><span class="k">default</span> <span class="o">=</span> <span class="nb">false</span><span class="p">];</span>
  <span class="cm">/**</span>
<span class="cm">   * Even if other conditions are met, do not send the payload if it</span>
<span class="cm">   * exceeds the specified amout (in bytes).</span>
<span class="cm">   *</span>
<span class="cm">   * By default, only payloads under one megabyte are sent.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">uint32</span>    <span class="n">sizeLimit</span> <span class="o">=</span> <span class="mi">3</span> <span class="p">[</span><span class="k">default</span> <span class="o">=</span> <span class="mi">1000000</span><span class="p">];</span>
<span class="p">}</span>
</pre></div>
</div>
<div class="highlight-c" id="index-14"><div class="highlight"><pre><span class="n">message</span> <span class="n">Content</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * If BYTES or DATA_URI was chosen as the transport mode, this field</span>
<span class="cm">   * contains the size of the data. (If, in addition, decoding was enabled,</span>
<span class="cm">   * the field contains the size of the decoded data).</span>
<span class="cm">   *</span>
<span class="cm">   * If STRING was chosen as the transport mode, this field contains the</span>
<span class="cm">   * string length (regardless of encoding), i.e. the number of characters,</span>
<span class="cm">   * not including zero terminator.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">uint32</span> <span class="n">length</span>            <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The (original) character encoding of the data (if applicable).</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">string</span> <span class="n">characterEncoding</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * This field contains the data if BYTES was chosen as the transport</span>
<span class="cm">   * mode. If other modes were chosen, this field is not set.</span>
<span class="cm">   *</span>
<span class="cm">   * @see ContentMode::Transport</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">bytes</span>  <span class="n">byteData</span>          <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * This field contains the data if either STRING or DATA_URI were chosen</span>
<span class="cm">   * as transport mode. If some other mode was chosen, this field is not set.</span>
<span class="cm">   *</span>
<span class="cm">   * @see ContentMode::Transport</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">string</span> <span class="n">stringData</span>        <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="getresourceid">
<span id="index-15"></span><h3><tt class="docutils literal"><span class="pre">GetResourceID</span></tt><a class="headerlink" href="#getresourceid" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>command GetResourceID(GetResourceIDArg) returns (ResourceID) = 21;</pre>
</div>
<p>Get the resource ID of a URL that is either in cache, or otherwise in use
(for instance currently being loaded).</p>
<p>In some cases the same resource may have multiple IDs, for instance POST
form results. Trying to get an ID for resources with multiple IDs will
result in an error.</p>
<p>An error will also be returned if the specified URL is not in use. Use
<tt class="docutils literal"><span class="pre">CreateRequest</span></tt> to generate a resource ID in this case.</p>
<p>Note that setting the reload policy to NO_CACHE does not exclude the
use of this command. Setting the reload policy to NO_CACHE does not
prevent resources from entering cache, it merely prevents reloading from
it.</p>
<p>&#64;since 1.1</p>
<p>argument:</p>
<div class="highlight-c" id="index-16"><div class="highlight"><pre><span class="n">message</span> <span class="n">GetResourceIDArg</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * The URL of the resource to get the ID for.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">string</span> <span class="n">url</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>returns:</p>
<div class="highlight-c" id="index-17"><div class="highlight"><pre><span class="n">message</span> <span class="n">ResourceID</span>
<span class="p">{</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">resourceID</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="removeheaderoverrides">
<span id="index-18"></span><h3><tt class="docutils literal"><span class="pre">RemoveHeaderOverrides</span></tt><a class="headerlink" href="#removeheaderoverrides" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>command RemoveHeaderOverrides(RemoveHeaderOverridesArg) returns (Default) = 6;</pre>
</div>
<p>Remove overrides previously added with AddHeaderOverrides.</p>
<p>argument:</p>
<div class="highlight-c" id="index-19"><div class="highlight"><pre><span class="n">message</span> <span class="n">RemoveHeaderOverridesArg</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * A list of header names to remove overrides for. If there is no override</span>
<span class="cm">   * for a certain name, it will be ignored.</span>
<span class="cm">   */</span>
  <span class="n">repeated</span> <span class="n">string</span> <span class="n">nameList</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="setreloadpolicy">
<span id="index-20"></span><h3><tt class="docutils literal"><span class="pre">SetReloadPolicy</span></tt><a class="headerlink" href="#setreloadpolicy" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>command SetReloadPolicy(SetReloadPolicyArg) returns (Default) = 2;</pre>
</div>
<p>Choose whether resources should be allowed to load from cache,
or whether they should be fully downloaded over the network on
each reload.</p>
<p>The default mode is to always load resources fully.</p>
<p>argument:</p>
<div class="highlight-c" id="index-21"><div class="highlight"><pre><span class="n">message</span> <span class="n">SetReloadPolicyArg</span>
<span class="p">{</span>
  <span class="n">required</span> <span class="n">ReloadPolicy</span> <span class="n">policy</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="setrequestmode">
<span id="index-22"></span><h3><tt class="docutils literal"><span class="pre">SetRequestMode</span></tt><a class="headerlink" href="#setrequestmode" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>command SetRequestMode(SetRequestModeArg) returns (Default) = 4;</pre>
</div>
<p>Choose how (and if) request data should be reported. It&#8217;s possible
to set a filter with different settings based on MIME type.</p>
<p>argument:</p>
<div class="highlight-c" id="index-23"><div class="highlight"><pre><span class="n">message</span> <span class="n">SetRequestModeArg</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * If there is no matching mode for a certain mime type, then this</span>
<span class="cm">   * mode will be used. If not present, no data is received by default.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">ContentMode</span> <span class="n">defaultContentMode</span>    <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Whenever a resource matches a mime type found in this list, the</span>
<span class="cm">   * corresponding ContentMode is used for that resource.</span>
<span class="cm">   */</span>
  <span class="n">repeated</span> <span class="n">MimeMode</span>    <span class="n">mimeModeList</span>          <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Whenever an individual part of a multipart/form-data matches a</span>
<span class="cm">   * type found in this list, the corresponding ContentMode is used</span>
<span class="cm">   * for that part.</span>
<span class="cm">   */</span>
  <span class="n">repeated</span> <span class="n">MimeMode</span>    <span class="n">multipartMimeModeList</span> <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>references:</p>
<div class="highlight-c" id="index-24"><div class="highlight"><pre><span class="n">message</span> <span class="n">ContentMode</span>
<span class="p">{</span>
  <span class="k">enum</span> <span class="n">Transport</span>
  <span class="p">{</span>
    <span class="cm">/**</span>
<span class="cm">     * Send the payload as a string.</span>
<span class="cm">     *</span>
<span class="cm">     * Selecting this transport mode  will automatically enable decoding,</span>
<span class="cm">     * and the string will automatically converted to the correct character</span>
<span class="cm">     * encoding.</span>
<span class="cm">     *</span>
<span class="cm">     * If this transport mode is used an unsuitable content type, the payload</span>
<span class="cm">     * will not be sent (without errors).</span>
<span class="cm">     */</span>
    <span class="n">STRING</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * Send the payload as bytes. When this transport mode is chosen, character</span>
<span class="cm">     * conversion will not be performed. If the payload contains text data, it</span>
<span class="cm">     * will be sent in its original encoding.</span>
<span class="cm">     */</span>
    <span class="n">BYTES</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * Send the payload as a base64-encoded data URI in the string field. When</span>
<span class="cm">     * this transport mode is chosen, character conversion will not be performed.</span>
<span class="cm">     * If the payload contains text data, it will be sent in its original encoding.</span>
<span class="cm">     */</span>
    <span class="n">DATA_URI</span> <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * Do not send the payload at all.</span>
<span class="cm">     */</span>
    <span class="n">OFF</span> <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
  <span class="p">}</span>

  <span class="cm">/**</span>
<span class="cm">   * Indicates how to send the payload.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">Transport</span> <span class="n">transport</span> <span class="o">=</span> <span class="mi">1</span> <span class="p">[</span><span class="k">default</span> <span class="o">=</span> <span class="n">OFF</span><span class="p">];</span>
  <span class="cm">/**</span>
<span class="cm">   * Decode the data (for instance, decompress it, decrypt it, etc). This is</span>
<span class="cm">   * unrelated to character encoding.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">bool</span>      <span class="n">decode</span>    <span class="o">=</span> <span class="mi">2</span> <span class="p">[</span><span class="k">default</span> <span class="o">=</span> <span class="nb">false</span><span class="p">];</span>
  <span class="cm">/**</span>
<span class="cm">   * Even if other conditions are met, do not send the payload if it</span>
<span class="cm">   * exceeds the specified amout (in bytes).</span>
<span class="cm">   *</span>
<span class="cm">   * By default, only payloads under one megabyte are sent.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">uint32</span>    <span class="n">sizeLimit</span> <span class="o">=</span> <span class="mi">3</span> <span class="p">[</span><span class="k">default</span> <span class="o">=</span> <span class="mi">1000000</span><span class="p">];</span>
<span class="p">}</span>
</pre></div>
</div>
<div class="highlight-c" id="index-25"><div class="highlight"><pre><span class="cm">/**</span>
<span class="cm"> * Used to override the default ContentMode for resources with a</span>
<span class="cm"> * certain mime type.</span>
<span class="cm"> */</span>
<span class="n">message</span> <span class="n">MimeMode</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * The mime type, for instance &#39;text/plain&#39;.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">string</span>      <span class="n">type</span>        <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * How to treat this mime type.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">ContentMode</span> <span class="n">contentMode</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="setresponsemode">
<span id="index-26"></span><h3><tt class="docutils literal"><span class="pre">SetResponseMode</span></tt><a class="headerlink" href="#setresponsemode" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>command SetResponseMode(SetResponseModeArg) returns (Default) = 3;</pre>
</div>
<p>Choose how (and if) response data should be reported. It&#8217;s possible
to set a filter with different settings based on MIME type.</p>
<p>argument:</p>
<div class="highlight-c" id="index-27"><div class="highlight"><pre><span class="n">message</span> <span class="n">SetResponseModeArg</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * If there is no matching mode for a certain mime type, then this</span>
<span class="cm">   * mode will be used. If not present, no data is received by default.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">ContentMode</span> <span class="n">defaultContentMode</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Whenever a resource matches a mime type found in this list, the</span>
<span class="cm">   * corresponding ContentMode is used for that resource.</span>
<span class="cm">   */</span>
  <span class="n">repeated</span> <span class="n">MimeMode</span>    <span class="n">mimeModeList</span>       <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>references:</p>
<div class="highlight-c" id="index-28"><div class="highlight"><pre><span class="n">message</span> <span class="n">ContentMode</span>
<span class="p">{</span>
  <span class="k">enum</span> <span class="n">Transport</span>
  <span class="p">{</span>
    <span class="cm">/**</span>
<span class="cm">     * Send the payload as a string.</span>
<span class="cm">     *</span>
<span class="cm">     * Selecting this transport mode  will automatically enable decoding,</span>
<span class="cm">     * and the string will automatically converted to the correct character</span>
<span class="cm">     * encoding.</span>
<span class="cm">     *</span>
<span class="cm">     * If this transport mode is used an unsuitable content type, the payload</span>
<span class="cm">     * will not be sent (without errors).</span>
<span class="cm">     */</span>
    <span class="n">STRING</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * Send the payload as bytes. When this transport mode is chosen, character</span>
<span class="cm">     * conversion will not be performed. If the payload contains text data, it</span>
<span class="cm">     * will be sent in its original encoding.</span>
<span class="cm">     */</span>
    <span class="n">BYTES</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * Send the payload as a base64-encoded data URI in the string field. When</span>
<span class="cm">     * this transport mode is chosen, character conversion will not be performed.</span>
<span class="cm">     * If the payload contains text data, it will be sent in its original encoding.</span>
<span class="cm">     */</span>
    <span class="n">DATA_URI</span> <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * Do not send the payload at all.</span>
<span class="cm">     */</span>
    <span class="n">OFF</span> <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
  <span class="p">}</span>

  <span class="cm">/**</span>
<span class="cm">   * Indicates how to send the payload.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">Transport</span> <span class="n">transport</span> <span class="o">=</span> <span class="mi">1</span> <span class="p">[</span><span class="k">default</span> <span class="o">=</span> <span class="n">OFF</span><span class="p">];</span>
  <span class="cm">/**</span>
<span class="cm">   * Decode the data (for instance, decompress it, decrypt it, etc). This is</span>
<span class="cm">   * unrelated to character encoding.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">bool</span>      <span class="n">decode</span>    <span class="o">=</span> <span class="mi">2</span> <span class="p">[</span><span class="k">default</span> <span class="o">=</span> <span class="nb">false</span><span class="p">];</span>
  <span class="cm">/**</span>
<span class="cm">   * Even if other conditions are met, do not send the payload if it</span>
<span class="cm">   * exceeds the specified amout (in bytes).</span>
<span class="cm">   *</span>
<span class="cm">   * By default, only payloads under one megabyte are sent.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">uint32</span>    <span class="n">sizeLimit</span> <span class="o">=</span> <span class="mi">3</span> <span class="p">[</span><span class="k">default</span> <span class="o">=</span> <span class="mi">1000000</span><span class="p">];</span>
<span class="p">}</span>
</pre></div>
</div>
<div class="highlight-c" id="index-29"><div class="highlight"><pre><span class="cm">/**</span>
<span class="cm"> * Used to override the default ContentMode for resources with a</span>
<span class="cm"> * certain mime type.</span>
<span class="cm"> */</span>
<span class="n">message</span> <span class="n">MimeMode</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * The mime type, for instance &#39;text/plain&#39;.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">string</span>      <span class="n">type</span>        <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * How to treat this mime type.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">ContentMode</span> <span class="n">contentMode</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="events">
<h2>Events<a class="headerlink" href="#events" title="Permalink to this headline"></a></h2>
<div class="section" id="onrequest">
<span id="index-30"></span><h3><tt class="docutils literal"><span class="pre">OnRequest</span></tt><a class="headerlink" href="#onrequest" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>event OnRequest returns (Request) = 14;</pre>
</div>
<p>Fired when a request is created.</p>
<p>message:</p>
<div class="highlight-c" id="index-31"><div class="highlight"><pre><span class="n">message</span> <span class="n">Request</span>
<span class="p">{</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">requestID</span>  <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">resourceID</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">windowID</span>   <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
  <span class="n">optional</span> <span class="n">uint32</span> <span class="n">frameID</span>    <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
  <span class="n">optional</span> <span class="n">uint32</span> <span class="n">documentID</span> <span class="o">=</span> <span class="mi">5</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">string</span> <span class="n">url</span>        <span class="o">=</span> <span class="mi">6</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Milliseconds since Unix epoch.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="kt">double</span> <span class="n">time</span>       <span class="o">=</span> <span class="mi">7</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">string</span> <span class="n">method</span>     <span class="o">=</span> <span class="mi">8</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="onrequestfinished">
<span id="index-32"></span><h3><tt class="docutils literal"><span class="pre">OnRequestFinished</span></tt><a class="headerlink" href="#onrequestfinished" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>event OnRequestFinished returns (RequestFinished) = 16;</pre>
</div>
<p>Fired after the entire request (including payload, if any) has been
sent.</p>
<p>message:</p>
<div class="highlight-c" id="index-33"><div class="highlight"><pre><span class="n">message</span> <span class="n">RequestFinished</span>
<span class="p">{</span>
  <span class="n">required</span> <span class="n">uint32</span>      <span class="n">requestID</span>  <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">uint32</span>      <span class="n">resourceID</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Milliseconds since Unix epoch.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="kt">double</span>      <span class="n">time</span>       <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
  <span class="n">optional</span> <span class="n">RequestData</span> <span class="n">data</span>       <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>references:</p>
<div class="highlight-c" id="index-34"><div class="highlight"><pre><span class="n">message</span> <span class="n">Content</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * If BYTES or DATA_URI was chosen as the transport mode, this field</span>
<span class="cm">   * contains the size of the data. (If, in addition, decoding was enabled,</span>
<span class="cm">   * the field contains the size of the decoded data).</span>
<span class="cm">   *</span>
<span class="cm">   * If STRING was chosen as the transport mode, this field contains the</span>
<span class="cm">   * string length (regardless of encoding), i.e. the number of characters,</span>
<span class="cm">   * not including zero terminator.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">uint32</span> <span class="n">length</span>            <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The (original) character encoding of the data (if applicable).</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">string</span> <span class="n">characterEncoding</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * This field contains the data if BYTES was chosen as the transport</span>
<span class="cm">   * mode. If other modes were chosen, this field is not set.</span>
<span class="cm">   *</span>
<span class="cm">   * @see ContentMode::Transport</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">bytes</span>  <span class="n">byteData</span>          <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * This field contains the data if either STRING or DATA_URI were chosen</span>
<span class="cm">   * as transport mode. If some other mode was chosen, this field is not set.</span>
<span class="cm">   *</span>
<span class="cm">   * @see ContentMode::Transport</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">string</span> <span class="n">stringData</span>        <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<div class="highlight-c" id="index-35"><div class="highlight"><pre><span class="n">message</span> <span class="n">Header</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * The name of the HTTP header, for instance &quot;Accept-Charset&quot;.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">string</span> <span class="n">name</span>  <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The value of the HTTP header, for instance &quot;utf-8&quot; when using</span>
<span class="cm">   * Accept-Charset, or &quot;text/html; charset=utf8&quot; for Content-Type.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">string</span> <span class="n">value</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<div class="highlight-c" id="index-36"><div class="highlight"><pre><span class="n">message</span> <span class="n">RequestData</span>
<span class="p">{</span>
  <span class="n">message</span> <span class="n">Part</span>
  <span class="p">{</span>
    <span class="cm">/**</span>
<span class="cm">     * In multi-part, each part may have its own headers.</span>
<span class="cm">     */</span>
    <span class="n">repeated</span> <span class="n">Header</span>  <span class="n">headerList</span>    <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * The length of this part.</span>
<span class="cm">     */</span>
    <span class="n">optional</span> <span class="n">uint32</span>  <span class="n">contentLength</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
    <span class="n">optional</span> <span class="n">Content</span> <span class="n">content</span>       <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
  <span class="p">}</span>

  <span class="n">required</span> <span class="n">uint32</span>  <span class="n">requestID</span>         <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">uint32</span>  <span class="n">resourceID</span>        <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="n">optional</span> <span class="n">string</span>  <span class="n">mimeType</span>          <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The character encoding of the payload. Not applicable when the</span>
<span class="cm">   * payload is of a non-text type.</span>
<span class="cm">   *</span>
<span class="cm">   * Example: utf-8</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">string</span>  <span class="n">characterEncoding</span> <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
  <span class="n">optional</span> <span class="n">uint32</span>  <span class="n">contentLength</span>     <span class="o">=</span> <span class="mi">5</span><span class="p">;</span>
  <span class="n">optional</span> <span class="n">Content</span> <span class="n">content</span>           <span class="o">=</span> <span class="mi">6</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * If the payload is multipart, this list contains the</span>
<span class="cm">   * individual parts.</span>
<span class="cm">   */</span>
  <span class="n">repeated</span> <span class="n">Part</span>    <span class="n">partList</span>          <span class="o">=</span> <span class="mi">7</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="onrequestheader">
<span id="index-37"></span><h3><tt class="docutils literal"><span class="pre">OnRequestHeader</span></tt><a class="headerlink" href="#onrequestheader" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>event OnRequestHeader returns (RequestHeader) = 15;</pre>
</div>
<p>Fired after the request headers are composed.</p>
<p>message:</p>
<div class="highlight-c" id="index-38"><div class="highlight"><pre><span class="n">message</span> <span class="n">RequestHeader</span>
<span class="p">{</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">requestID</span>  <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">resourceID</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Milliseconds since Unix epoch.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="kt">double</span> <span class="n">time</span>       <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">string</span> <span class="n">raw</span>        <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
  <span class="n">repeated</span> <span class="n">Header</span> <span class="n">headerList</span> <span class="o">=</span> <span class="mi">5</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>references:</p>
<div class="highlight-c" id="index-39"><div class="highlight"><pre><span class="n">message</span> <span class="n">Header</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * The name of the HTTP header, for instance &quot;Accept-Charset&quot;.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">string</span> <span class="n">name</span>  <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The value of the HTTP header, for instance &quot;utf-8&quot; when using</span>
<span class="cm">   * Accept-Charset, or &quot;text/html; charset=utf8&quot; for Content-Type.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">string</span> <span class="n">value</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="onrequestretry">
<span id="index-40"></span><h3><tt class="docutils literal"><span class="pre">OnRequestRetry</span></tt><a class="headerlink" href="#onrequestretry" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>event OnRequestRetry returns (RequestRetry) = 17;</pre>
</div>
<p>If pipelining is enabled, a request can sometimes be moved to another
connection if the previous connection failed, for some reason.</p>
<p>In these cases, this event will fire to indicate that we are retrying
the same request under a new requestID.</p>
<p>message:</p>
<div class="highlight-c" id="index-41"><div class="highlight"><pre><span class="n">message</span> <span class="n">RequestRetry</span>
<span class="p">{</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">resourceID</span>    <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">fromRequestID</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">toRequestID</span>   <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
  <span class="n">required</span> <span class="kt">double</span> <span class="n">time</span>          <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="onresponse">
<span id="index-42"></span><h3><tt class="docutils literal"><span class="pre">OnResponse</span></tt><a class="headerlink" href="#onresponse" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>event OnResponse returns (Response) = 18;</pre>
</div>
<p>Fired when data is first received from the server, before any headers
are parsed.</p>
<p>message:</p>
<div class="highlight-c" id="index-43"><div class="highlight"><pre><span class="n">message</span> <span class="n">Response</span>
<span class="p">{</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">requestID</span>    <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">resourceID</span>   <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Milliseconds since Unix epoch.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="kt">double</span> <span class="n">time</span>         <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * HTTP response code, such as 200, 404, etc.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">uint32</span> <span class="n">responseCode</span> <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="onresponsefinished">
<span id="index-44"></span><h3><tt class="docutils literal"><span class="pre">OnResponseFinished</span></tt><a class="headerlink" href="#onresponsefinished" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>event OnResponseFinished returns (ResponseFinished) = 20;</pre>
</div>
<p>Fired when the entire response (including payload) has been downloaded.</p>
<p>message:</p>
<div class="highlight-c" id="index-45"><div class="highlight"><pre><span class="n">message</span> <span class="n">ResponseFinished</span>
<span class="p">{</span>
  <span class="n">required</span> <span class="n">uint32</span>       <span class="n">requestID</span>     <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">uint32</span>       <span class="n">resourceID</span>    <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Milliseconds since Unix epoch.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="kt">double</span>       <span class="n">time</span>          <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">uint32</span>       <span class="n">contentLength</span> <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
  <span class="n">optional</span> <span class="n">ResourceData</span> <span class="n">data</span>          <span class="o">=</span> <span class="mi">5</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>references:</p>
<div class="highlight-c" id="index-46"><div class="highlight"><pre><span class="n">message</span> <span class="n">Content</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * If BYTES or DATA_URI was chosen as the transport mode, this field</span>
<span class="cm">   * contains the size of the data. (If, in addition, decoding was enabled,</span>
<span class="cm">   * the field contains the size of the decoded data).</span>
<span class="cm">   *</span>
<span class="cm">   * If STRING was chosen as the transport mode, this field contains the</span>
<span class="cm">   * string length (regardless of encoding), i.e. the number of characters,</span>
<span class="cm">   * not including zero terminator.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">uint32</span> <span class="n">length</span>            <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The (original) character encoding of the data (if applicable).</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">string</span> <span class="n">characterEncoding</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * This field contains the data if BYTES was chosen as the transport</span>
<span class="cm">   * mode. If other modes were chosen, this field is not set.</span>
<span class="cm">   *</span>
<span class="cm">   * @see ContentMode::Transport</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">bytes</span>  <span class="n">byteData</span>          <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * This field contains the data if either STRING or DATA_URI were chosen</span>
<span class="cm">   * as transport mode. If some other mode was chosen, this field is not set.</span>
<span class="cm">   *</span>
<span class="cm">   * @see ContentMode::Transport</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">string</span> <span class="n">stringData</span>        <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<div class="highlight-c" id="index-47"><div class="highlight"><pre><span class="n">message</span> <span class="n">ResourceData</span>
<span class="p">{</span>
  <span class="n">required</span> <span class="n">uint32</span>  <span class="n">resourceID</span>        <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">string</span>  <span class="n">url</span>               <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The used mime type. This may be different from the mime type</span>
<span class="cm">   * advertised in the HTTP headers.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">string</span>  <span class="n">mimeType</span>          <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Original character encoding (if applicable).</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">string</span>  <span class="n">characterEncoding</span> <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Content-Length, as advertised by HTTP headers.</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">uint32</span>  <span class="n">contentLength</span>     <span class="o">=</span> <span class="mi">5</span><span class="p">;</span>
  <span class="n">optional</span> <span class="n">Content</span> <span class="n">content</span>           <span class="o">=</span> <span class="mi">6</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="onresponseheader">
<span id="index-48"></span><h3><tt class="docutils literal"><span class="pre">OnResponseHeader</span></tt><a class="headerlink" href="#onresponseheader" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>event OnResponseHeader returns (ResponseHeader) = 19;</pre>
</div>
<p>Fired when headers are received and parsed.</p>
<p>message:</p>
<div class="highlight-c" id="index-49"><div class="highlight"><pre><span class="n">message</span> <span class="n">ResponseHeader</span>
<span class="p">{</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">requestID</span>  <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">resourceID</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Milliseconds since Unix epoch.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="kt">double</span> <span class="n">time</span>       <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">string</span> <span class="n">raw</span>        <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
  <span class="n">repeated</span> <span class="n">Header</span> <span class="n">headerList</span> <span class="o">=</span> <span class="mi">5</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>references:</p>
<div class="highlight-c" id="index-50"><div class="highlight"><pre><span class="n">message</span> <span class="n">Header</span>
<span class="p">{</span>
  <span class="cm">/**</span>
<span class="cm">   * The name of the HTTP header, for instance &quot;Accept-Charset&quot;.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">string</span> <span class="n">name</span>  <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The value of the HTTP header, for instance &quot;utf-8&quot; when using</span>
<span class="cm">   * Accept-Charset, or &quot;text/html; charset=utf8&quot; for Content-Type.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">string</span> <span class="n">value</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="onurlfinished">
<span id="index-51"></span><h3><tt class="docutils literal"><span class="pre">OnUrlFinished</span></tt><a class="headerlink" href="#onurlfinished" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>event OnUrlFinished returns (UrlFinished) = 11;</pre>
</div>
<p>Resource was completely loaded or failed.</p>
<p>No request events should happen after this point.</p>
<p>message:</p>
<div class="highlight-c" id="index-52"><div class="highlight"><pre><span class="n">message</span> <span class="n">UrlFinished</span>
<span class="p">{</span>
  <span class="k">enum</span> <span class="n">Result</span>
  <span class="p">{</span>
    <span class="cm">/**</span>
<span class="cm">     * A URL finished loading, without problems.</span>
<span class="cm">     */</span>
    <span class="n">FINISHED</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * A URL load failed, e.g. due to connection failure.</span>
<span class="cm">     */</span>
    <span class="n">FAILED</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * A URL load was stopped, e.g. by user request.</span>
<span class="cm">     */</span>
    <span class="n">STOPPED</span> <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
  <span class="p">}</span>

  <span class="n">required</span> <span class="n">uint32</span> <span class="n">resourceID</span>        <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">Result</span> <span class="n">result</span>            <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Milliseconds since Unix epoch.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="kt">double</span> <span class="n">time</span>              <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The MIME type of the resource. This information might not be available if the server</span>
<span class="cm">   * did not specify the MIME type, and if content detection has not yet run (or was unable</span>
<span class="cm">   * to detect the type).</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">string</span> <span class="n">mimeType</span>          <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The character encoding of the resource. This information might not be available if the server</span>
<span class="cm">   * did not specify the character encoding, and if character encoding detection has not yet run</span>
<span class="cm">   * (or was unable to detect the type).</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">string</span> <span class="n">characterEncoding</span> <span class="o">=</span> <span class="mi">5</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The size of the body (if any).</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">uint32</span> <span class="n">contentLength</span>     <span class="o">=</span> <span class="mi">6</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="onurlload">
<span id="index-53"></span><h3><tt class="docutils literal"><span class="pre">OnUrlLoad</span></tt><a class="headerlink" href="#onurlload" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>event OnUrlLoad returns (UrlLoad) = 10;</pre>
</div>
<p>A resource was requested by the browser.</p>
<p>Depending on the protocol used it may result in OnRequest/OnResponse events.
When resource is loaded OnUrlFinished is sent.</p>
<p>message:</p>
<div class="highlight-c" id="index-54"><div class="highlight"><pre><span class="n">message</span> <span class="n">UrlLoad</span>
<span class="p">{</span>
  <span class="k">enum</span> <span class="n">URLType</span>
  <span class="p">{</span>
    <span class="cm">/**</span>
<span class="cm">     * Type not known, should not occur.</span>
<span class="cm">     */</span>
    <span class="n">UNKNOWN</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * HTTP protocol.</span>
<span class="cm">     */</span>
    <span class="n">HTTP</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * HTTP protocol with SSL.</span>
<span class="cm">     */</span>
    <span class="n">HTTPS</span> <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * Local file access.</span>
<span class="cm">     */</span>
    <span class="kt">FILE</span> <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
    <span class="cm">/**</span>
<span class="cm">     * Data URIs, e.g data:text/plain,mydata</span>
<span class="cm">     */</span>
    <span class="n">DATA</span> <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
    <span class="n">FTP</span> <span class="o">=</span> <span class="mi">5</span><span class="p">;</span>
    <span class="n">GOPHER</span> <span class="o">=</span> <span class="mi">6</span><span class="p">;</span>
    <span class="n">WAIS</span> <span class="o">=</span> <span class="mi">7</span><span class="p">;</span>
    <span class="n">NEWS</span> <span class="o">=</span> <span class="mi">8</span><span class="p">;</span>
    <span class="n">SNEWS</span> <span class="o">=</span> <span class="mi">9</span><span class="p">;</span>
    <span class="n">NEWSATTACHMENT</span> <span class="o">=</span> <span class="mi">10</span><span class="p">;</span>
    <span class="n">SNEWSATTACHMENT</span> <span class="o">=</span> <span class="mi">11</span><span class="p">;</span>
    <span class="n">EMAIL</span> <span class="o">=</span> <span class="mi">12</span><span class="p">;</span>
    <span class="n">ATTACHMENT</span> <span class="o">=</span> <span class="mi">13</span><span class="p">;</span>
    <span class="n">TELNET</span> <span class="o">=</span> <span class="mi">14</span><span class="p">;</span>
    <span class="n">MAILTO</span> <span class="o">=</span> <span class="mi">15</span><span class="p">;</span>
    <span class="n">OPERA</span> <span class="o">=</span> <span class="mi">16</span><span class="p">;</span>
    <span class="n">JAVASCRIPT</span> <span class="o">=</span> <span class="mi">17</span><span class="p">;</span>
    <span class="n">CONTENT_ID</span> <span class="o">=</span> <span class="mi">18</span><span class="p">;</span>
    <span class="n">TN3270</span> <span class="o">=</span> <span class="mi">19</span><span class="p">;</span>
    <span class="n">SOURCE</span> <span class="o">=</span> <span class="mi">21</span><span class="p">;</span>
    <span class="n">CLIENT</span> <span class="o">=</span> <span class="mi">22</span><span class="p">;</span>
    <span class="n">NNTP</span> <span class="o">=</span> <span class="mi">23</span><span class="p">;</span>
    <span class="n">NNTPS</span> <span class="o">=</span> <span class="mi">25</span><span class="p">;</span>
    <span class="n">SHARE</span> <span class="o">=</span> <span class="mi">26</span><span class="p">;</span>
    <span class="n">GHTTP</span> <span class="o">=</span> <span class="mi">27</span><span class="p">;</span>
    <span class="n">TV</span> <span class="o">=</span> <span class="mi">28</span><span class="p">;</span>
    <span class="n">EDITED</span> <span class="o">=</span> <span class="mi">29</span><span class="p">;</span>
    <span class="n">ERROR</span> <span class="o">=</span> <span class="mi">30</span><span class="p">;</span>
    <span class="n">DVB</span> <span class="o">=</span> <span class="mi">31</span><span class="p">;</span>
    <span class="n">TEL</span> <span class="o">=</span> <span class="mi">32</span><span class="p">;</span>
    <span class="n">MAIL</span> <span class="o">=</span> <span class="mi">33</span><span class="p">;</span>
    <span class="n">IRC</span> <span class="o">=</span> <span class="mi">34</span><span class="p">;</span>
    <span class="n">SMS</span> <span class="o">=</span> <span class="mi">35</span><span class="p">;</span>
    <span class="n">SMSTO</span> <span class="o">=</span> <span class="mi">36</span><span class="p">;</span>
    <span class="n">CHAT_TRANSFER</span> <span class="o">=</span> <span class="mi">39</span><span class="p">;</span>
    <span class="n">DEVICE</span> <span class="o">=</span> <span class="mi">40</span><span class="p">;</span>
    <span class="n">MOUNTPOINT</span> <span class="o">=</span> <span class="mi">41</span><span class="p">;</span>
    <span class="n">WIDGET</span> <span class="o">=</span> <span class="mi">42</span><span class="p">;</span>
    <span class="n">OBMLSERVER</span> <span class="o">=</span> <span class="mi">43</span><span class="p">;</span>
    <span class="n">UNITE</span> <span class="o">=</span> <span class="mi">44</span><span class="p">;</span>
    <span class="n">INTERNAL</span> <span class="o">=</span> <span class="mi">100</span><span class="p">;</span>
  <span class="p">}</span>

  <span class="n">required</span> <span class="n">uint32</span>     <span class="n">windowID</span>   <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="n">optional</span> <span class="n">uint32</span>     <span class="n">frameID</span>    <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="n">optional</span> <span class="n">uint32</span>     <span class="n">documentID</span> <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">uint32</span>     <span class="n">resourceID</span> <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The URL which which is about to be loaded.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">string</span>     <span class="n">url</span>        <span class="o">=</span> <span class="mi">5</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * The type of URL that was started, this can referer to a specific protocol</span>
<span class="cm">   * or a special URL type.</span>
<span class="cm">   *</span>
<span class="cm">   * @note More types may be added in the future, make sure the client supports that.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="n">URLType</span>    <span class="n">urlType</span>    <span class="o">=</span> <span class="mi">6</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Milliseconds since Unix epoch.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="kt">double</span>     <span class="n">time</span>       <span class="o">=</span> <span class="mi">7</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * This field may be set to provide additional information about the</span>
<span class="cm">   * origin of a URL load.</span>
<span class="cm">   *</span>
<span class="cm">   * If the field is not set, the origin is unknown.</span>
<span class="cm">   *</span>
<span class="cm">   * @since 1.2</span>
<span class="cm">   */</span>
  <span class="n">optional</span> <span class="n">LoadOrigin</span> <span class="n">loadOrigin</span> <span class="o">=</span> <span class="mi">8</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="onurlredirect">
<span id="index-55"></span><h3><tt class="docutils literal"><span class="pre">OnUrlRedirect</span></tt><a class="headerlink" href="#onurlredirect" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>event OnUrlRedirect returns (UrlRedirect) = 12;</pre>
</div>
<p>Sent when a URL is redirect to another URL.
Contains both the original resource ID and the new resource ID.</p>
<p>message:</p>
<div class="highlight-c" id="index-56"><div class="highlight"><pre><span class="n">message</span> <span class="n">UrlRedirect</span>
<span class="p">{</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">fromResourceID</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">toResourceID</span>   <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Milliseconds since Unix epoch.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="kt">double</span> <span class="n">time</span>           <span class="o">=</span> <span class="mi">3</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="onurlunload">
<span id="index-57"></span><h3><tt class="docutils literal"><span class="pre">OnUrlUnload</span></tt><a class="headerlink" href="#onurlunload" title="Permalink to this headline"></a></h3>
<div class="highlight-python"><pre>event OnUrlUnload returns (UrlUnload) = 13;</pre>
</div>
<p>The specified URL and resource ID is no longer in use
in the browser. Any references to them should be removed.</p>
<p>&#64;note Trying to use the resource ID after this event will not work.</p>
<p>message:</p>
<div class="highlight-c" id="index-58"><div class="highlight"><pre><span class="n">message</span> <span class="n">UrlUnload</span>
<span class="p">{</span>
  <span class="n">required</span> <span class="n">uint32</span> <span class="n">resourceID</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
  <span class="cm">/**</span>
<span class="cm">   * Milliseconds since Unix epoch.</span>
<span class="cm">   */</span>
  <span class="n">required</span> <span class="kt">double</span> <span class="n">time</span>       <span class="o">=</span> <span class="mi">2</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../../index.html">
              <img class="logo" src="../../_static/Opera-logo-PNG.png" alt="Logo"/>
            </a></p>
            <h3><a href="../../index.html">Table Of Contents</a></h3>
            <ul>
<li><a class="reference internal" href="#">ResourceManager 1.2</a><ul>
<li><a class="reference internal" href="#service">Service</a><ul>
<li><a class="reference internal" href="#id-fields">ID fields</a></li>
<li><a class="reference internal" href="#external-id-fields">External ID fields</a></li>
<li><a class="reference internal" href="#changelog">Changelog</a></li>
</ul>
</li>
<li><a class="reference internal" href="#commands">Commands</a><ul>
<li><a class="reference internal" href="#addheaderoverrides"><tt class="docutils literal"><span class="pre">AddHeaderOverrides</span></tt></a></li>
<li><a class="reference internal" href="#clearcache"><tt class="docutils literal"><span class="pre">ClearCache</span></tt></a></li>
<li><a class="reference internal" href="#clearheaderoverrides"><tt class="docutils literal"><span class="pre">ClearHeaderOverrides</span></tt></a></li>
<li><a class="reference internal" href="#createrequest"><tt class="docutils literal"><span class="pre">CreateRequest</span></tt></a></li>
<li><a class="reference internal" href="#getresource"><tt class="docutils literal"><span class="pre">GetResource</span></tt></a></li>
<li><a class="reference internal" href="#getresourceid"><tt class="docutils literal"><span class="pre">GetResourceID</span></tt></a></li>
<li><a class="reference internal" href="#removeheaderoverrides"><tt class="docutils literal"><span class="pre">RemoveHeaderOverrides</span></tt></a></li>
<li><a class="reference internal" href="#setreloadpolicy"><tt class="docutils literal"><span class="pre">SetReloadPolicy</span></tt></a></li>
<li><a class="reference internal" href="#setrequestmode"><tt class="docutils literal"><span class="pre">SetRequestMode</span></tt></a></li>
<li><a class="reference internal" href="#setresponsemode"><tt class="docutils literal"><span class="pre">SetResponseMode</span></tt></a></li>
</ul>
</li>
<li><a class="reference internal" href="#events">Events</a><ul>
<li><a class="reference internal" href="#onrequest"><tt class="docutils literal"><span class="pre">OnRequest</span></tt></a></li>
<li><a class="reference internal" href="#onrequestfinished"><tt class="docutils literal"><span class="pre">OnRequestFinished</span></tt></a></li>
<li><a class="reference internal" href="#onrequestheader"><tt class="docutils literal"><span class="pre">OnRequestHeader</span></tt></a></li>
<li><a class="reference internal" href="#onrequestretry"><tt class="docutils literal"><span class="pre">OnRequestRetry</span></tt></a></li>
<li><a class="reference internal" href="#onresponse"><tt class="docutils literal"><span class="pre">OnResponse</span></tt></a></li>
<li><a class="reference internal" href="#onresponsefinished"><tt class="docutils literal"><span class="pre">OnResponseFinished</span></tt></a></li>
<li><a class="reference internal" href="#onresponseheader"><tt class="docutils literal"><span class="pre">OnResponseHeader</span></tt></a></li>
<li><a class="reference internal" href="#onurlfinished"><tt class="docutils literal"><span class="pre">OnUrlFinished</span></tt></a></li>
<li><a class="reference internal" href="#onurlload"><tt class="docutils literal"><span class="pre">OnUrlLoad</span></tt></a></li>
<li><a class="reference internal" href="#onurlredirect"><tt class="docutils literal"><span class="pre">OnUrlRedirect</span></tt></a></li>
<li><a class="reference internal" href="#onurlunload"><tt class="docutils literal"><span class="pre">OnUrlUnload</span></tt></a></li>
</ul>
</li>
</ul>
</li>
</ul>

            <h4>Previous topic</h4>
            <p class="topless"><a href="ResourceManager_1_1.html"
                                  title="previous chapter">ResourceManager 1.1</a></p>
            <h4>Next topic</h4>
            <p class="topless"><a href="../Scope.html"
                                  title="next chapter">Scope</a></p>
            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="../../_sources/services/ResourceManager/ResourceManager_1_2.txt"
                     rel="nofollow">Show Source</a></li>
             <li><a href="./pdf/ScopeInterface.pdf" rel="nofollow">Download as PDF</a></li>
            </ul>
          <div id="searchbox" style="display: none">
            <h3>Quick search</h3>
              <form class="search" action="../../search.html" method="get">
                <input type="text" name="q" size="18" />
                <input type="submit" value="Go" />
                <input type="hidden" name="check_keywords" value="yes" />
                <input type="hidden" name="area" value="default" />
              </form>
              <p class="searchtip" style="font-size: 90%">
              Enter search terms or a module, class or function name.
              </p>
          </div>
          
          <script type="text/javascript">$('#searchbox').show(0);</script>
          <h3><a href="glossary.html">Glossary</a></h3>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
    © Copyright 2006-2010, Opera Software ASA. 
    <a href="./index.html#license">Licensed under Apache License, Version 2.0.</a>
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.6.
    </div>
  </body>
</html>