Compare commits
2142 Commits
mozilla
...
OJINetwork
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1cee4e9073 | ||
|
|
93a3bbce56 | ||
|
|
e0dd53369a | ||
|
|
6c8b3ae9ee | ||
|
|
283fb8c0df | ||
|
|
9348bf6f5d | ||
|
|
bcf18bfa01 | ||
|
|
5774a72d30 | ||
|
|
c071ae3970 | ||
|
|
43ad2f22d6 | ||
|
|
6a972ef04e | ||
|
|
23a99f1248 | ||
|
|
1669c00013 | ||
|
|
9a9aaead6d | ||
|
|
b6f7b11a56 | ||
|
|
8c70f80362 | ||
|
|
6005513c3c | ||
|
|
e9a6a7c042 | ||
|
|
745bd85555 | ||
|
|
369b38ae1e | ||
|
|
11fc680fe3 | ||
|
|
cee7486dc6 | ||
|
|
f2395f2993 | ||
|
|
97e632a2d8 | ||
|
|
661e6070da | ||
|
|
ed77d583c6 | ||
|
|
3332bd0528 | ||
|
|
702526c746 | ||
|
|
fa8a146369 | ||
|
|
bcec7d7c3f | ||
|
|
02997b3c4d | ||
|
|
4cca9446d0 | ||
|
|
27152055ea | ||
|
|
8f7c44f6eb | ||
|
|
a909e40cf9 | ||
|
|
171cbed41d | ||
|
|
d955cfca51 | ||
|
|
dbba3fe731 | ||
|
|
59a95935d3 | ||
|
|
c4b5c7c1a9 | ||
|
|
321b7ee962 | ||
|
|
855761697c | ||
|
|
50fd6c1e43 | ||
|
|
a80dae1416 | ||
|
|
7f3510ee2e | ||
|
|
298fcbcf3e | ||
|
|
ad717f51e1 | ||
|
|
63bec11667 | ||
|
|
0de7f63f89 | ||
|
|
d79b129f5c | ||
|
|
c5cf8a4efb | ||
|
|
d0b353bec8 | ||
|
|
37fc6e5910 | ||
|
|
45c17f9410 | ||
|
|
63784f2ba1 | ||
|
|
42f6400525 | ||
|
|
0b9521b1af | ||
|
|
7931aee9d9 | ||
|
|
ba8a2e2955 | ||
|
|
46ec8b4111 | ||
|
|
20b526f9fa | ||
|
|
90737b279a | ||
|
|
88c4fba289 | ||
|
|
b7d77ef368 | ||
|
|
353feb2fe6 | ||
|
|
ea90ff591e | ||
|
|
0069eda5c1 | ||
|
|
e4b452cfd7 | ||
|
|
2af99d82b0 | ||
|
|
1a15e340d9 | ||
|
|
edf8a1125e | ||
|
|
be78567e8a | ||
|
|
3bfb6cd196 | ||
|
|
87ef5856b8 | ||
|
|
88c6e0ec95 | ||
|
|
5edd44880b | ||
|
|
4bb8a8ed37 | ||
|
|
4fa777855a | ||
|
|
82072391aa | ||
|
|
8f967ade31 | ||
|
|
725ac59f56 | ||
|
|
277450790d | ||
|
|
c1c25bfbf7 | ||
|
|
69512faa8f | ||
|
|
afeb248e3d | ||
|
|
5f53ac2b57 | ||
|
|
9040db951d | ||
|
|
cd4e898fad | ||
|
|
9446da27fe | ||
|
|
4cea6cdb22 | ||
|
|
8e2160e6db | ||
|
|
5d20ffe429 | ||
|
|
3eefd2153b | ||
|
|
71efef1ee4 | ||
|
|
647c79cbaf | ||
|
|
a18a35cc4f | ||
|
|
8a980ec5ee | ||
|
|
5b0a290d9e | ||
|
|
2f52f16b2b | ||
|
|
f8406870d2 | ||
|
|
8673b40ed5 | ||
|
|
90fba2953e | ||
|
|
9faf57d773 | ||
|
|
9337a6d773 | ||
|
|
bb5e1eca75 | ||
|
|
6fa4714901 | ||
|
|
24df681107 | ||
|
|
7bc4aa3916 | ||
|
|
a5295b280e | ||
|
|
3bcbd67a5a | ||
|
|
c45150ede3 | ||
|
|
d11f4399bc | ||
|
|
22e2ded2a8 | ||
|
|
da6504bc4c | ||
|
|
3c195f0ff8 | ||
|
|
73439c4818 | ||
|
|
ee877121c9 | ||
|
|
d01f564c80 | ||
|
|
678d6e579e | ||
|
|
e05239f07c | ||
|
|
dc118c3bbb | ||
|
|
ba293acaeb | ||
|
|
918d9669f9 | ||
|
|
719d4641d0 | ||
|
|
8ba4677348 | ||
|
|
a67e0ef2aa | ||
|
|
28f1107062 | ||
|
|
c1945f0c69 | ||
|
|
d98292211a | ||
|
|
e6336bfaee | ||
|
|
4dd4f2823f | ||
|
|
6bd298bbe0 | ||
|
|
cea5b8a6ec | ||
|
|
979f4bccb3 | ||
|
|
8526f999cd | ||
|
|
38c5cbb164 | ||
|
|
50defacc4d | ||
|
|
0bf5ab8b0f | ||
|
|
b64ec41425 | ||
|
|
0608e3fd78 | ||
|
|
20d458c395 | ||
|
|
dfdea96b6d | ||
|
|
c119975970 | ||
|
|
7a16a8a9c6 | ||
|
|
7526772863 | ||
|
|
06d57ca345 | ||
|
|
24741b9973 | ||
|
|
076d53dd27 | ||
|
|
be49e1baf4 | ||
|
|
fb2abb314f | ||
|
|
6cd03c57b9 | ||
|
|
ce650a3936 | ||
|
|
d4753fee99 | ||
|
|
0c9c5041c3 | ||
|
|
d28dcec76e | ||
|
|
7461840b06 | ||
|
|
a8251d5e68 | ||
|
|
fa7548bafd | ||
|
|
422ab7fe0f | ||
|
|
5c4056bbea | ||
|
|
cc95aca1bc | ||
|
|
7afc87f449 | ||
|
|
adc4d0083e | ||
|
|
8039a94c6a | ||
|
|
d56bd3fec6 | ||
|
|
09b9d476ef | ||
|
|
430b53b9e4 | ||
|
|
3787e9848b | ||
|
|
80cbe1eecc | ||
|
|
004c7abb79 | ||
|
|
6c07d1e6f4 | ||
|
|
e4cf2baf78 | ||
|
|
2feeb0375b | ||
|
|
52e4df93eb | ||
|
|
cb76e927cf | ||
|
|
34170d0ad5 | ||
|
|
1de0d0e996 | ||
|
|
db24360778 | ||
|
|
f8aedd9a4c | ||
|
|
8619f6dfcc | ||
|
|
3e8e5f4f7e | ||
|
|
a98743ef50 | ||
|
|
4a845227e2 | ||
|
|
0487d6f8e0 | ||
|
|
1e1931c9f5 | ||
|
|
da168af872 | ||
|
|
d2ab45317d | ||
|
|
f7091ec331 | ||
|
|
7225c36093 | ||
|
|
1d2b4fc990 | ||
|
|
6697ab47de | ||
|
|
38029dc0ad | ||
|
|
fdb56c6f63 | ||
|
|
bba6403a16 | ||
|
|
b1e81f16d9 | ||
|
|
8c909c2738 | ||
|
|
02e822d3bc | ||
|
|
4fc22b4fc7 | ||
|
|
004a69c80c | ||
|
|
0e14d5b2fa | ||
|
|
6b5cf5e240 | ||
|
|
238a3242ed | ||
|
|
cdb3424e64 | ||
|
|
9499876f5c | ||
|
|
6072a45816 | ||
|
|
82480418fa | ||
|
|
48e20a157a | ||
|
|
faed7fd133 | ||
|
|
d8061bc83e | ||
|
|
9e48820e1e | ||
|
|
2318cb3fa3 | ||
|
|
abeee03606 | ||
|
|
43c01aad71 | ||
|
|
e149fac3a4 | ||
|
|
f3a593464f | ||
|
|
998d0a9865 | ||
|
|
09c3da1b92 | ||
|
|
d763585f82 | ||
|
|
145d5f65c1 | ||
|
|
2b0e455357 | ||
|
|
9596756b89 | ||
|
|
826f56ec53 | ||
|
|
01e9b6890c | ||
|
|
225e1b2cb4 | ||
|
|
3a4a8e7217 | ||
|
|
92ec0851aa | ||
|
|
803b2253ce | ||
|
|
c613528fc5 | ||
|
|
647a672694 | ||
|
|
a3518e5690 | ||
|
|
34d304090c | ||
|
|
326152568e | ||
|
|
79b9bd88b2 | ||
|
|
01993cd6e1 | ||
|
|
916de29ee4 | ||
|
|
b4607052d2 | ||
|
|
e4d173eef8 | ||
|
|
685f033647 | ||
|
|
d7c97208e8 | ||
|
|
3322333c7d | ||
|
|
cbce85cf02 | ||
|
|
376d6feeba | ||
|
|
21d3525b26 | ||
|
|
e592c4b9fd | ||
|
|
558109f391 | ||
|
|
8279500d2f | ||
|
|
6dec4084ff | ||
|
|
9cab6028bc | ||
|
|
74ab511457 | ||
|
|
a670622534 | ||
|
|
d81d62f835 | ||
|
|
8f3cae2366 | ||
|
|
f5245c1966 | ||
|
|
d72cbff971 | ||
|
|
d66ad63461 | ||
|
|
2dac0fce6e | ||
|
|
eeef033d32 | ||
|
|
d4ad203ca1 | ||
|
|
f2e7b9f28d | ||
|
|
fc6f5d428f | ||
|
|
e2b0aa940c | ||
|
|
6b2934e06f | ||
|
|
2731820910 | ||
|
|
82426e2926 | ||
|
|
90cbfd4db8 | ||
|
|
f5847039d8 | ||
|
|
6d78dfcafa | ||
|
|
ff7a8c8a7e | ||
|
|
283c2c2a9c | ||
|
|
d1409f23fa | ||
|
|
f3918106e8 | ||
|
|
63e37513dd | ||
|
|
8d67666fe5 | ||
|
|
427cec04c9 | ||
|
|
060696ebcd | ||
|
|
eb6509d939 | ||
|
|
32e7febdab | ||
|
|
c8d8550d35 | ||
|
|
bf118b3d3d | ||
|
|
8f5d66c624 | ||
|
|
32bdffd1b0 | ||
|
|
a8c02ff8ad | ||
|
|
c6aad7fa64 | ||
|
|
ca38b8546f | ||
|
|
32ede4839b | ||
|
|
c706bf9b24 | ||
|
|
d0c8f23dbc | ||
|
|
1524945a4b | ||
|
|
0bca4e931e | ||
|
|
ed3165f8cc | ||
|
|
23894090e4 | ||
|
|
d01d831960 | ||
|
|
1530a9b3df | ||
|
|
4862b6113f | ||
|
|
bb6e9bfbd9 | ||
|
|
ee405299d7 | ||
|
|
a750ddf2ea | ||
|
|
02582a5d11 | ||
|
|
0c6461d468 | ||
|
|
769ce4cff2 | ||
|
|
691dfa71eb | ||
|
|
7f4d9acaeb | ||
|
|
4a2e9a7966 | ||
|
|
b8d1e851dd | ||
|
|
77f908d781 | ||
|
|
39523b600e | ||
|
|
bbc3e473b7 | ||
|
|
7b0dbb4932 | ||
|
|
9bda26caf9 | ||
|
|
5d24c277c9 | ||
|
|
dc73b41e94 | ||
|
|
2845e43acc | ||
|
|
1ff3503847 | ||
|
|
39dc7e01c5 | ||
|
|
97fe271a46 | ||
|
|
da9754e0a3 | ||
|
|
7ba26a9d15 | ||
|
|
9536efd914 | ||
|
|
cb0dad87de | ||
|
|
e5b7068791 | ||
|
|
90a096689a | ||
|
|
005e45fa59 | ||
|
|
da5741d35d | ||
|
|
70590f0a2a | ||
|
|
1ab1258079 | ||
|
|
8db0346764 | ||
|
|
201d6cafda | ||
|
|
dbab632bf4 | ||
|
|
437157a453 | ||
|
|
6169849f2e | ||
|
|
590b42958c | ||
|
|
9766a1b60c | ||
|
|
9a9d2d401d | ||
|
|
4046dc8f39 | ||
|
|
de647fe34d | ||
|
|
c8c5bd886a | ||
|
|
fcf6ebb325 | ||
|
|
82c24af034 | ||
|
|
c04615a2c8 | ||
|
|
e3271696e2 | ||
|
|
48fc7dd684 | ||
|
|
0c5cda0630 | ||
|
|
55664594c2 | ||
|
|
55be47f4b9 | ||
|
|
ec7bff8ef9 | ||
|
|
be6891db14 | ||
|
|
1182fd5611 | ||
|
|
63d4ed7613 | ||
|
|
b7141cc833 | ||
|
|
a36626c6b7 | ||
|
|
394241f708 | ||
|
|
92d1f8dbfc | ||
|
|
c8f993367d | ||
|
|
1b6dcf963b | ||
|
|
6a3fdcf92b | ||
|
|
15a65a6da1 | ||
|
|
66c7934273 | ||
|
|
729e100574 | ||
|
|
1aa599717a | ||
|
|
cddd352fe4 | ||
|
|
c43a7fc0eb | ||
|
|
681f028c40 | ||
|
|
9fab93c0d3 | ||
|
|
80554f1b46 | ||
|
|
fb31c68e28 | ||
|
|
fb8add8fab | ||
|
|
b7358826c8 | ||
|
|
b6ecc473ac | ||
|
|
07d650b35f | ||
|
|
e2934b277d | ||
|
|
41b4acb09b | ||
|
|
b5c9c71f16 | ||
|
|
d92ddd9be2 | ||
|
|
b86ce5eb47 | ||
|
|
ad2a89277e | ||
|
|
7e4368016a | ||
|
|
037f575ef2 | ||
|
|
a9b08a59ee | ||
|
|
8dd8360df1 | ||
|
|
3a8f1c97b7 | ||
|
|
278d3c31db | ||
|
|
79eda77222 | ||
|
|
95d9362a90 | ||
|
|
43c60ab967 | ||
|
|
8276a767de | ||
|
|
1386512ee7 | ||
|
|
52fe0546c9 | ||
|
|
e3dc03c00d | ||
|
|
c5c7024db2 | ||
|
|
0f8f315f7b | ||
|
|
fde3223be8 | ||
|
|
d670e0e0a8 | ||
|
|
b0bdb9e357 | ||
|
|
b60923ad33 | ||
|
|
9d4f222984 | ||
|
|
7bedfe4f94 | ||
|
|
c3f4681a93 | ||
|
|
fa7106b147 | ||
|
|
78de9ecbcc | ||
|
|
7e1d05c8e7 | ||
|
|
03d031e481 | ||
|
|
d6fb21a0ed | ||
|
|
133deb962e | ||
|
|
0cc33c826e | ||
|
|
84892de9bb | ||
|
|
1b2552d97a | ||
|
|
9dad554faf | ||
|
|
8a3c9ecf3d | ||
|
|
4dc47505d5 | ||
|
|
5580f46827 | ||
|
|
1cd966972f | ||
|
|
b9e18a4de2 | ||
|
|
85642b9189 | ||
|
|
d5ec2468cc | ||
|
|
d440707c51 | ||
|
|
8d1509f20c | ||
|
|
873b42bab8 | ||
|
|
2abf0e6c62 | ||
|
|
28b7bca233 | ||
|
|
8cc219ef2a | ||
|
|
11a6d6003a | ||
|
|
ffe4c93b9c | ||
|
|
d9c5508b3d | ||
|
|
6a903efb38 | ||
|
|
89adfdbbe4 | ||
|
|
521eac7fdf | ||
|
|
752499e0be | ||
|
|
ab310b46a0 | ||
|
|
3f1e9d981d | ||
|
|
5f37fc94d7 | ||
|
|
2ee95ba6e1 | ||
|
|
0bbea4a406 | ||
|
|
aabefb01c6 | ||
|
|
49a55eb55e | ||
|
|
3107ffa7bd | ||
|
|
85fa7333b6 | ||
|
|
0452c5d0d8 | ||
|
|
c878b932b0 | ||
|
|
d2df7b2380 | ||
|
|
44d5557928 | ||
|
|
edc8218b01 | ||
|
|
65a64892ea | ||
|
|
59c46e5471 | ||
|
|
6d3c8c3245 | ||
|
|
6ab448b5ac | ||
|
|
a08fa2244d | ||
|
|
22e6878541 | ||
|
|
776c60206d | ||
|
|
4e20f650e6 | ||
|
|
90becafe72 | ||
|
|
54d2e9932f | ||
|
|
8e56243356 | ||
|
|
4c83957aaa | ||
|
|
ae218ef314 | ||
|
|
ada1dee2b0 | ||
|
|
b17920e27e | ||
|
|
2646330d9e | ||
|
|
a6cd82d8fa | ||
|
|
a279be7c89 | ||
|
|
d409292d6e | ||
|
|
71760eac75 | ||
|
|
22ce87e890 | ||
|
|
51cd10b5a9 | ||
|
|
21960f2897 | ||
|
|
d156d485ce | ||
|
|
ea3cae2a29 | ||
|
|
4688f0e06e | ||
|
|
1938753e23 | ||
|
|
7609d1d6bc | ||
|
|
576429899f | ||
|
|
de85d9e164 | ||
|
|
4a1c1f1011 | ||
|
|
4a658933f1 | ||
|
|
3435dc668b | ||
|
|
892dd2f1aa | ||
|
|
6f6bc9a46b | ||
|
|
c8c3a3a102 | ||
|
|
9f4d3b87f6 | ||
|
|
c8e4c168d6 | ||
|
|
c81d4ecd99 | ||
|
|
adf1a3ab65 | ||
|
|
fc54758da9 | ||
|
|
e1bee63656 | ||
|
|
d59e07a06e | ||
|
|
44ef09dc26 | ||
|
|
db497426f5 | ||
|
|
a0b23975e0 | ||
|
|
fb52d0e62d | ||
|
|
bf1dbdd67e | ||
|
|
89cee3c002 | ||
|
|
8e62bce178 | ||
|
|
f6aaa1dadb | ||
|
|
44a2bd0758 | ||
|
|
2ed4fe8e98 | ||
|
|
19a0b04a4d | ||
|
|
5426185681 | ||
|
|
012ffdbd4b | ||
|
|
45b1862fe8 | ||
|
|
69ff0aa488 | ||
|
|
09df69244e | ||
|
|
adcf99e250 | ||
|
|
69565eea61 | ||
|
|
f0a488a96d | ||
|
|
ff64549bac | ||
|
|
402408abd7 | ||
|
|
67c6327950 | ||
|
|
882df377a4 | ||
|
|
dbc1a1f79d | ||
|
|
594d246987 | ||
|
|
7ebf8f628a | ||
|
|
94027acd31 | ||
|
|
f8e5880591 | ||
|
|
9dc6f1d1c7 | ||
|
|
32a8aa7179 | ||
|
|
d80e0cf9a7 | ||
|
|
435c373c8d | ||
|
|
1ce4b0ca1a | ||
|
|
64d4e5e4c5 | ||
|
|
fd4da3a3ed | ||
|
|
9ec1729d6e | ||
|
|
afc18ecdb3 | ||
|
|
60dfee6281 | ||
|
|
e9417fee4e | ||
|
|
486a0b2450 | ||
|
|
e792ef87b8 | ||
|
|
4590c3ac53 | ||
|
|
b4e70e6d93 | ||
|
|
7c54e19b31 | ||
|
|
edf8a94dff | ||
|
|
b8062b30c0 | ||
|
|
3e5ef8c6ca | ||
|
|
632858d72b | ||
|
|
ef14f3a242 | ||
|
|
a1eec07558 | ||
|
|
91ec47226f | ||
|
|
f78b4d45b2 | ||
|
|
7592a1906a | ||
|
|
6c08578bd3 | ||
|
|
c6e9f05f58 | ||
|
|
bcde5a0626 | ||
|
|
6cc6f7d1ad | ||
|
|
d001449914 | ||
|
|
a880832886 | ||
|
|
c2b43ff523 | ||
|
|
a857bd291e | ||
|
|
9195e9e667 | ||
|
|
a0f03120c9 | ||
|
|
8f46a864ae | ||
|
|
5467b9e959 | ||
|
|
7c6a2c1807 | ||
|
|
c7a76453a7 | ||
|
|
ca40730cd5 | ||
|
|
bfacca5f3e | ||
|
|
720b1e9105 | ||
|
|
9d3a83abde | ||
|
|
877577c907 | ||
|
|
7585eafb04 | ||
|
|
0a8de7e776 | ||
|
|
bbf3f0cec1 | ||
|
|
6c3f0127af | ||
|
|
ccdc105a09 | ||
|
|
18656de471 | ||
|
|
5533746860 | ||
|
|
90b6b18b95 | ||
|
|
a7129e5059 | ||
|
|
4733fd7870 | ||
|
|
b879804470 | ||
|
|
e2354d7665 | ||
|
|
dc7d7e8bb8 | ||
|
|
48a1e6651f | ||
|
|
b7ae7d273c | ||
|
|
04d572db49 | ||
|
|
9ceaa121f9 | ||
|
|
a80395bfae | ||
|
|
b5674d4ead | ||
|
|
2562ac522c | ||
|
|
65c8c4221c | ||
|
|
4c2353f325 | ||
|
|
bc8b34ee53 | ||
|
|
eaede0c25c | ||
|
|
4cc8bcc30b | ||
|
|
a8113ea35f | ||
|
|
f6f9317f35 | ||
|
|
c42025ef8e | ||
|
|
0dcece846a | ||
|
|
1c8e695487 | ||
|
|
81e63bacbf | ||
|
|
3ef224a9c3 | ||
|
|
fc377d03a9 | ||
|
|
7ef43433a0 | ||
|
|
3b67ca459e | ||
|
|
9af02680e2 | ||
|
|
548da2dd1a | ||
|
|
68ffaede91 | ||
|
|
496a27d449 | ||
|
|
d3ba34faaa | ||
|
|
5373f0e6e1 | ||
|
|
c726ceaa90 | ||
|
|
245ca0fe2e | ||
|
|
4d9468d373 | ||
|
|
8b2676b6e1 | ||
|
|
f66f963cdc | ||
|
|
f2d34bbd14 | ||
|
|
dc8b9e5f19 | ||
|
|
e9715906c0 | ||
|
|
5a21d40ab8 | ||
|
|
c3a01c701d | ||
|
|
7bf0b48df2 | ||
|
|
d7345f60a2 | ||
|
|
836d0903d2 | ||
|
|
a0544cb5e0 | ||
|
|
77bdb3d163 | ||
|
|
c01e583336 | ||
|
|
203638c58f | ||
|
|
3b655468fd | ||
|
|
a93fb2a92b | ||
|
|
dc64faa66e | ||
|
|
4643c44d68 | ||
|
|
a93f248631 | ||
|
|
345fb3eadb | ||
|
|
58f88ff535 | ||
|
|
1efbd33f60 | ||
|
|
dbeba878ff | ||
|
|
f5bf4b3144 | ||
|
|
2a8f50f5c9 | ||
|
|
37346ef741 | ||
|
|
119964e429 | ||
|
|
2d9cca2eec | ||
|
|
3cb9c195d8 | ||
|
|
ce59d8aee1 | ||
|
|
5ca568de4c | ||
|
|
f6757ceb72 | ||
|
|
4d978924ca | ||
|
|
3c593fd2f0 | ||
|
|
9287d6504d | ||
|
|
4579eec269 | ||
|
|
9230756830 | ||
|
|
d688a6f0a0 | ||
|
|
981afce29a | ||
|
|
035bbf7fb2 | ||
|
|
e0251b80be | ||
|
|
e09369c1f8 | ||
|
|
faf12721d1 | ||
|
|
50d0c06aec | ||
|
|
948f6f521c | ||
|
|
d2925651e3 | ||
|
|
e4f07b9064 | ||
|
|
c77e51c99a | ||
|
|
1f6655d43a | ||
|
|
bb4142abf3 | ||
|
|
ec7ed76d4d | ||
|
|
2d9c07e281 | ||
|
|
beb5a39f8e | ||
|
|
aa7254cf82 | ||
|
|
436c4b73a5 | ||
|
|
893604c431 | ||
|
|
04aa3caab1 | ||
|
|
8304001d60 | ||
|
|
5473c9c1b2 | ||
|
|
bd037db210 | ||
|
|
eef1a274fc | ||
|
|
75906a59fc | ||
|
|
f5924ec122 | ||
|
|
52a78fbd8b | ||
|
|
31d14a596b | ||
|
|
6ef6ddecb3 | ||
|
|
b663d9987b | ||
|
|
ad34d6eb08 | ||
|
|
9d2a2b65f3 | ||
|
|
c21d038d36 | ||
|
|
a9f87890d8 | ||
|
|
14e48ad656 | ||
|
|
41d9ea989b | ||
|
|
860f5caafc | ||
|
|
6132966f1a | ||
|
|
16a9f6d08b | ||
|
|
eeb3fe6af9 | ||
|
|
6bdea53350 | ||
|
|
8174b8a00a | ||
|
|
763d43f255 | ||
|
|
7cbc1b44d2 | ||
|
|
f271c3be83 | ||
|
|
cc5aacfa27 | ||
|
|
f974dd8c58 | ||
|
|
06ca545ef4 | ||
|
|
10e6bcc931 | ||
|
|
fe1de1631a | ||
|
|
26f6ed9085 | ||
|
|
a62294de07 | ||
|
|
532b0e2b0c | ||
|
|
ef7eb77867 | ||
|
|
d41ec0e2a0 | ||
|
|
7f5217ff50 | ||
|
|
258852664b | ||
|
|
ac6725e002 | ||
|
|
0f0198865f | ||
|
|
6185ea9c37 | ||
|
|
3c2d58ed0a | ||
|
|
bafbc69717 | ||
|
|
06e0f20ba6 | ||
|
|
50b4d75ff1 | ||
|
|
385f043bcb | ||
|
|
66af3da999 | ||
|
|
bf8fc9bf2b | ||
|
|
3563fa3d18 | ||
|
|
6096872983 | ||
|
|
fc6080da78 | ||
|
|
39f64e949e | ||
|
|
ff8d76d433 | ||
|
|
38981d3af7 | ||
|
|
446ae68865 | ||
|
|
60f12ef2ba | ||
|
|
1c8d847337 | ||
|
|
49ff8f66c4 | ||
|
|
55be84b8dd | ||
|
|
2451e78bb4 | ||
|
|
4f1f18498b | ||
|
|
ef5fc736c3 | ||
|
|
80189a3a87 | ||
|
|
9e43daf824 | ||
|
|
a1c09d0a73 | ||
|
|
250e947a34 | ||
|
|
a7a093b79f | ||
|
|
adef5c738a | ||
|
|
3b967286ad | ||
|
|
6adb1c959c | ||
|
|
2bb9a8a545 | ||
|
|
68b263feca | ||
|
|
3c169b7d04 | ||
|
|
27a216e69c | ||
|
|
e97fd467cd | ||
|
|
faefa14a3b | ||
|
|
16f90c3fe0 | ||
|
|
419db3f0eb | ||
|
|
cb7774c7db | ||
|
|
26458fe839 | ||
|
|
795f769d5e | ||
|
|
53e0d6f4ad | ||
|
|
a5a3cc3c2c | ||
|
|
4ae2383f99 | ||
|
|
074e2ccc6f | ||
|
|
bc20d943c1 | ||
|
|
6647fe02ad | ||
|
|
282257332e | ||
|
|
6a52b74171 | ||
|
|
4a9593e1f6 | ||
|
|
8d8e8d1a47 | ||
|
|
8c8bbed687 | ||
|
|
916f525269 | ||
|
|
05141d34c2 | ||
|
|
54d328117f | ||
|
|
9095fa6e03 | ||
|
|
68c7e3cf27 | ||
|
|
bed315ee6c | ||
|
|
854414df4f | ||
|
|
82f15807dd | ||
|
|
250269edd6 | ||
|
|
d2d2c6ff59 | ||
|
|
04a5b3b832 | ||
|
|
93e167fada | ||
|
|
3f06fb0a0a | ||
|
|
4eba509d38 | ||
|
|
79c3cd8a7a | ||
|
|
458aaa4768 | ||
|
|
72ded9346c | ||
|
|
84d1794148 | ||
|
|
84cf5785b0 | ||
|
|
52bb52faa0 | ||
|
|
2bf19c7d8f | ||
|
|
24c7cf4a57 | ||
|
|
8b10125355 | ||
|
|
4fb6e7c47b | ||
|
|
aefa48de5b | ||
|
|
29aabfaa4c | ||
|
|
0fb575b027 | ||
|
|
41ba60ca7e | ||
|
|
12f4c1a56e | ||
|
|
c7b9024d78 | ||
|
|
32fd78b726 | ||
|
|
3bd21ad849 | ||
|
|
0c4d375986 | ||
|
|
9f26899c8c | ||
|
|
82f6d6f453 | ||
|
|
0c4b855072 | ||
|
|
4e6631611f | ||
|
|
0470f135c4 | ||
|
|
85c7d18ae3 | ||
|
|
3b6c53da74 | ||
|
|
512857d619 | ||
|
|
6dc2d7e4d2 | ||
|
|
d9e727b8ba | ||
|
|
555da3f7a1 | ||
|
|
dc7639086f | ||
|
|
4541f18760 | ||
|
|
b4549fd4bb | ||
|
|
2f043c9e30 | ||
|
|
4ed88cebba | ||
|
|
b8329612af | ||
|
|
172fff617c | ||
|
|
83c8cc1fae | ||
|
|
6e7f4e1670 | ||
|
|
10b6617c48 | ||
|
|
fff296425d | ||
|
|
8005dd0043 | ||
|
|
feed565fc3 | ||
|
|
b678988c90 | ||
|
|
c2d8209d5c | ||
|
|
f8b196a533 | ||
|
|
6fda7b24bf | ||
|
|
987394103f | ||
|
|
0b3cf3ff18 | ||
|
|
d9c70e46f0 | ||
|
|
f4f2970d0a | ||
|
|
13af87effd | ||
|
|
dba7583631 | ||
|
|
2c5daf4cc9 | ||
|
|
7f26f3101e | ||
|
|
4e069097cb | ||
|
|
5200561a75 | ||
|
|
757204162b | ||
|
|
8189d75efa | ||
|
|
847a52c2f3 | ||
|
|
9fa0b92dd3 | ||
|
|
6c49d37ebf | ||
|
|
d5c5ee4080 | ||
|
|
1d00b6c9c9 | ||
|
|
cb4c019521 | ||
|
|
261f51617b | ||
|
|
67d0ec8374 | ||
|
|
b1b127a551 | ||
|
|
f4bf910c8a | ||
|
|
921e6a3882 | ||
|
|
9fd5f78185 | ||
|
|
4ea3729f29 | ||
|
|
2a7a771146 | ||
|
|
051cf3669f | ||
|
|
c55576e6df | ||
|
|
4ede8ac839 | ||
|
|
3199411b18 | ||
|
|
2470c9051f | ||
|
|
e889dde9a5 | ||
|
|
8f17bab161 | ||
|
|
9a8c4bdbe9 | ||
|
|
566ec7b92f | ||
|
|
60d2cf5d1d | ||
|
|
5795cd1fe0 | ||
|
|
fb061b8d52 | ||
|
|
42e08c860c | ||
|
|
43fff83d63 | ||
|
|
057684cbd7 | ||
|
|
758261d32e | ||
|
|
de9c7c9f85 | ||
|
|
d6d35c2e0c | ||
|
|
3881a8e7ff | ||
|
|
f9b0b72f25 | ||
|
|
aba4ece1da | ||
|
|
0e8c997df5 | ||
|
|
656ff915d3 | ||
|
|
bc25cacb74 | ||
|
|
f549fa7a38 | ||
|
|
90fce3eb74 | ||
|
|
8908f97b41 | ||
|
|
67b7716d4d | ||
|
|
9393d087ea | ||
|
|
d323240c96 | ||
|
|
f7e694d878 | ||
|
|
61c60b3eb8 | ||
|
|
1135eee803 | ||
|
|
40a934496f | ||
|
|
592eefc568 | ||
|
|
a82bc29604 | ||
|
|
3aa8cb7842 | ||
|
|
b844b790f1 | ||
|
|
d087d7347a | ||
|
|
d55a65eb6b | ||
|
|
6acfcc498d | ||
|
|
d609e79f3c | ||
|
|
3058cbf555 | ||
|
|
aa492b455d | ||
|
|
a3080e873f | ||
|
|
abad008765 | ||
|
|
697080e7ab | ||
|
|
b19ab88fef | ||
|
|
c5af2f108c | ||
|
|
5ae5ce5081 | ||
|
|
02f5980d91 | ||
|
|
5c46f0b4a4 | ||
|
|
b7587ffc10 | ||
|
|
b3b4a8c2c3 | ||
|
|
30417a0709 | ||
|
|
7758150121 | ||
|
|
72786e028d | ||
|
|
9f52b981fe | ||
|
|
98245fe0d9 | ||
|
|
509191a3f7 | ||
|
|
fd4a52eaad | ||
|
|
833ee5f0d5 | ||
|
|
ec0f060783 | ||
|
|
17375f82e9 | ||
|
|
0f5f3dad67 | ||
|
|
e4f3cf32cd | ||
|
|
e704f6fd02 | ||
|
|
da872f430b | ||
|
|
bcb7a51ecb | ||
|
|
d692b45ef9 | ||
|
|
36e090e4f2 | ||
|
|
c22092efe0 | ||
|
|
b93acd208b | ||
|
|
835c0822af | ||
|
|
a55ce54bb1 | ||
|
|
dad8efe8bd | ||
|
|
a006e5dfd3 | ||
|
|
b945f26976 | ||
|
|
526d344aad | ||
|
|
e08ee4cc26 | ||
|
|
d3f5c5243c | ||
|
|
e63ed115af | ||
|
|
70e16e24c6 | ||
|
|
2d16ebc092 | ||
|
|
86ad096869 | ||
|
|
c97827f9d1 | ||
|
|
1e404fa6c0 | ||
|
|
1f0fa5c437 | ||
|
|
9f507487e2 | ||
|
|
fd10278074 | ||
|
|
9685925ebc | ||
|
|
fe3e1e70ce | ||
|
|
1eb826e1fa | ||
|
|
9f2aae11bb | ||
|
|
4e1f178389 | ||
|
|
8d91096b15 | ||
|
|
7c46498749 | ||
|
|
c0154ce534 | ||
|
|
2ffc303f9b | ||
|
|
b67f00df07 | ||
|
|
6b3b4ad6ca | ||
|
|
5b77f89a4f | ||
|
|
6185326760 | ||
|
|
cd8f11ec85 | ||
|
|
f0ab82d859 | ||
|
|
d61d9c4575 | ||
|
|
6a7c053dd0 | ||
|
|
d406d1f9c9 | ||
|
|
4e00a8e94a | ||
|
|
cd57b240f5 | ||
|
|
bca0cbbde5 | ||
|
|
396baa380e | ||
|
|
9a36fcd388 | ||
|
|
488cc4562f | ||
|
|
33324eac4f | ||
|
|
ee940a4b44 | ||
|
|
12ece32c94 | ||
|
|
ce50d36a6c | ||
|
|
40c9ee9aaa | ||
|
|
cd1fc89bea | ||
|
|
cd5f53280c | ||
|
|
0051acb625 | ||
|
|
a7194cbcf7 | ||
|
|
26a69078c9 | ||
|
|
b968139da0 | ||
|
|
cab0809536 | ||
|
|
c0daadaa20 | ||
|
|
5bde2697ba | ||
|
|
2db5860769 | ||
|
|
766161cc44 | ||
|
|
9e1c876e58 | ||
|
|
d081c01058 | ||
|
|
fe6b790a23 | ||
|
|
adfc66903c | ||
|
|
f75908c03b | ||
|
|
906fdf619c | ||
|
|
3b534f76f8 | ||
|
|
4d5a191c8b | ||
|
|
02280d597b | ||
|
|
9481d98451 | ||
|
|
449c40a89d | ||
|
|
0782be9f08 | ||
|
|
97918d4e10 | ||
|
|
4d371c0d95 | ||
|
|
a445aaa66a | ||
|
|
8105e6a166 | ||
|
|
efc54c518a | ||
|
|
ec0bf10c03 | ||
|
|
624c7671ee | ||
|
|
14caf39fd4 | ||
|
|
e621d4348a | ||
|
|
620f9317ad | ||
|
|
eea9ddc5af | ||
|
|
79ca86c7de | ||
|
|
0c4b9521d5 | ||
|
|
ee9e8bb28a | ||
|
|
4af961e25a | ||
|
|
c3765026b1 | ||
|
|
8a40ae10c1 | ||
|
|
59e74e9373 | ||
|
|
a5b1f502b6 | ||
|
|
0247d3a198 | ||
|
|
6ea82397a3 | ||
|
|
e0896531eb | ||
|
|
16bd46f732 | ||
|
|
44cb0fff3d | ||
|
|
a4892e98bf | ||
|
|
fcb837aa66 | ||
|
|
5867a55bdc | ||
|
|
b63175db20 | ||
|
|
294f5ecf41 | ||
|
|
3318a39861 | ||
|
|
d78cf05d04 | ||
|
|
0970218907 | ||
|
|
c33b41f8cc | ||
|
|
a65d91f309 | ||
|
|
442ef3d21b | ||
|
|
51035da4ff | ||
|
|
283e5bb163 | ||
|
|
1adaca9cae | ||
|
|
ab0a6e6dd0 | ||
|
|
0ef705b4ba | ||
|
|
b2413c6722 | ||
|
|
4a2003b48a | ||
|
|
91f2930140 | ||
|
|
df8781f1c9 | ||
|
|
d67b4d3f6b | ||
|
|
042141318b | ||
|
|
328e79a007 | ||
|
|
5c62edba3a | ||
|
|
4e1c527b82 | ||
|
|
6eff3c1884 | ||
|
|
116624b1b0 | ||
|
|
3c618c7265 | ||
|
|
e0eaf7f00b | ||
|
|
176e8c5451 | ||
|
|
78ea06c997 | ||
|
|
3e45e0fcd8 | ||
|
|
0236e06fda | ||
|
|
ba9d85891c | ||
|
|
d87f9d1060 | ||
|
|
596e7c0a01 | ||
|
|
8957ccb149 | ||
|
|
e382cf5f41 | ||
|
|
9857b1a59e | ||
|
|
5d50ddb72d | ||
|
|
400154027a | ||
|
|
949e30c64f | ||
|
|
4fb1136a6c | ||
|
|
148d6b590e | ||
|
|
79727e94d8 | ||
|
|
f97d444d8f | ||
|
|
74584ed8b6 | ||
|
|
5e856a67d9 | ||
|
|
c63cdad1a0 | ||
|
|
22be840209 | ||
|
|
b06ce42e18 | ||
|
|
bb7136efe1 | ||
|
|
e325a433cd | ||
|
|
b651be006c | ||
|
|
c669313675 | ||
|
|
1ac77c94fe | ||
|
|
74114cf984 | ||
|
|
056cdd590e | ||
|
|
2f8cb685c4 | ||
|
|
9f7e6c5e8a | ||
|
|
1558689e2b | ||
|
|
3ef73042ff | ||
|
|
b49b48f521 | ||
|
|
0fba81dc0a | ||
|
|
0f24b39bdf | ||
|
|
67af347c93 | ||
|
|
44aa69ed84 | ||
|
|
5d51b8377f | ||
|
|
1894fc9484 | ||
|
|
78e0c6e329 | ||
|
|
fe233fddf4 | ||
|
|
d6c0c53360 | ||
|
|
0cf8a140a9 | ||
|
|
710729e972 | ||
|
|
f0b2db257c | ||
|
|
87ac646444 | ||
|
|
698f313f61 | ||
|
|
5d665f2238 | ||
|
|
874cb1072c | ||
|
|
f9928a5225 | ||
|
|
1b47ada470 | ||
|
|
8684bc6d2a | ||
|
|
c759fe4fbd | ||
|
|
c0384026c1 | ||
|
|
0c2451e92b | ||
|
|
5dd2f359cc | ||
|
|
c9dfe90303 | ||
|
|
04671136ea | ||
|
|
7b7ccadd57 | ||
|
|
5f08bf111e | ||
|
|
d06c6009ae | ||
|
|
d12da9f536 | ||
|
|
0c04e27eb1 | ||
|
|
f69e90bfdb | ||
|
|
9206fd904c | ||
|
|
71bc545ac6 | ||
|
|
3820e80eb0 | ||
|
|
ea84a1fe8e | ||
|
|
dfee645789 | ||
|
|
623a1739b0 | ||
|
|
a35e03ab51 | ||
|
|
30fe903120 | ||
|
|
93979e7a13 | ||
|
|
4976336cd7 | ||
|
|
293dc6ae2d | ||
|
|
2722c6abf9 | ||
|
|
8458f73950 | ||
|
|
c5e8af16d8 | ||
|
|
fb7f0ca845 | ||
|
|
f2fe16c9ca | ||
|
|
d56cfbd643 | ||
|
|
79d217f984 | ||
|
|
1a09b34777 | ||
|
|
c96ec32790 | ||
|
|
a90938b7fe | ||
|
|
ff2e648658 | ||
|
|
824c376c99 | ||
|
|
b7c785dbb9 | ||
|
|
201747cf09 | ||
|
|
3b3150a851 | ||
|
|
5e7c6cadbe | ||
|
|
a629c89a47 | ||
|
|
e12d74e626 | ||
|
|
74460cc8e8 | ||
|
|
211c01a1e7 | ||
|
|
81585718f4 | ||
|
|
82eb7aec56 | ||
|
|
f92bc6705a | ||
|
|
1e5e004c86 | ||
|
|
9d8f9aaffa | ||
|
|
3ab02b9896 | ||
|
|
e2c7517492 | ||
|
|
f49ffdeb17 | ||
|
|
4688f4a267 | ||
|
|
392496f910 | ||
|
|
429035b95e | ||
|
|
60e776c0b1 | ||
|
|
3c90229bd1 | ||
|
|
e8824a34c4 | ||
|
|
5e56e0d9f0 | ||
|
|
ce87194f82 | ||
|
|
8b0ea79b27 | ||
|
|
c93a7af987 | ||
|
|
5b61252657 | ||
|
|
1ad612fe04 | ||
|
|
e82ae91d3b | ||
|
|
89a7ea308b | ||
|
|
baef3ff491 | ||
|
|
bacc204129 | ||
|
|
ad616e2ae7 | ||
|
|
11e8e272dc | ||
|
|
6049d54d57 | ||
|
|
1bce069dc7 | ||
|
|
020c0b0f7f | ||
|
|
7d0b7c66d6 | ||
|
|
91f063881e | ||
|
|
b67d47c22e | ||
|
|
02fcf730c2 | ||
|
|
85c80d8532 | ||
|
|
d3076a4587 | ||
|
|
2928e184e7 | ||
|
|
21ba3d6cb8 | ||
|
|
136fdedb42 | ||
|
|
351bb2c436 | ||
|
|
e2497544f4 | ||
|
|
83a23b5f1c | ||
|
|
108d88aa73 | ||
|
|
d4508c551c | ||
|
|
96eae3899d | ||
|
|
4ab5d272a8 | ||
|
|
ec872fb07e | ||
|
|
0fb3e85ef4 | ||
|
|
99f0b0e6ed | ||
|
|
24a97a12ef | ||
|
|
6c5d2d1f76 | ||
|
|
e75a82953c | ||
|
|
4659274e32 | ||
|
|
e759a9f0ec | ||
|
|
0448460aa8 | ||
|
|
63d006d51c | ||
|
|
8aa191848a | ||
|
|
34c2fcfcff | ||
|
|
86c01f03ff | ||
|
|
7d1f9f8984 | ||
|
|
a4b652fb6e | ||
|
|
7f284fbf17 | ||
|
|
0309575105 | ||
|
|
b1ce1292cd | ||
|
|
b56da5283c | ||
|
|
bb94402f82 | ||
|
|
f4e66ce9d5 | ||
|
|
88a72b7e1b | ||
|
|
fbb3a02aba | ||
|
|
d9d2d87c22 | ||
|
|
8a3070e4d1 | ||
|
|
795c474aa2 | ||
|
|
6acb44cc6b | ||
|
|
44348b0ffc | ||
|
|
ba637881d0 | ||
|
|
f252f64f26 | ||
|
|
f4175f9d93 | ||
|
|
c4d121b673 | ||
|
|
2305c46add | ||
|
|
cdf03c828e | ||
|
|
415018ddda | ||
|
|
1dafb61497 | ||
|
|
b90a717fb1 | ||
|
|
5853f77a56 | ||
|
|
e94feb1a94 | ||
|
|
8189f39979 | ||
|
|
12a9d81b7f | ||
|
|
36609ca04c | ||
|
|
e04e2ec644 | ||
|
|
2bfc8c424b | ||
|
|
5f974b4509 | ||
|
|
f175f1713d | ||
|
|
55d0da1124 | ||
|
|
7a4a69ccea | ||
|
|
6187415172 | ||
|
|
538780b53b | ||
|
|
7191ecc710 | ||
|
|
219619ac4d | ||
|
|
e978f4bd52 | ||
|
|
d511d6f7cf | ||
|
|
80e54a7d35 | ||
|
|
0d56597e86 | ||
|
|
3c6f0accb0 | ||
|
|
828b802387 | ||
|
|
40a84ecba5 | ||
|
|
91bc17ca27 | ||
|
|
f85feaca03 | ||
|
|
3862b13620 | ||
|
|
90c7bcd9de | ||
|
|
7c684bbb7c | ||
|
|
e9662bac89 | ||
|
|
7c2909f337 | ||
|
|
652229634f | ||
|
|
5b597d4bc6 | ||
|
|
d7badd5a07 | ||
|
|
43f634963b | ||
|
|
79472d0bf2 | ||
|
|
50a0d285a1 | ||
|
|
497b238e4c | ||
|
|
65ab40f772 | ||
|
|
53c7e57bc9 | ||
|
|
f9c2c2bcd2 | ||
|
|
cb74fa0564 | ||
|
|
41f723e37a | ||
|
|
947b11003e | ||
|
|
6d2f9e6924 | ||
|
|
458facb9aa | ||
|
|
b884486032 | ||
|
|
36caf9e033 | ||
|
|
ac435378f8 | ||
|
|
420116584d | ||
|
|
66997919f6 | ||
|
|
f5e5c0a6f4 | ||
|
|
367299ddef | ||
|
|
368872de77 | ||
|
|
5e61c45025 | ||
|
|
0f30acf71c | ||
|
|
4757c8e0e4 | ||
|
|
4049071b62 | ||
|
|
eaecbf611e | ||
|
|
5946788239 | ||
|
|
dacbe3641b | ||
|
|
91139eba00 | ||
|
|
f5b78d1114 | ||
|
|
91df78a054 | ||
|
|
454d0090b2 | ||
|
|
ab12796192 | ||
|
|
1b0fc032b5 | ||
|
|
a90118cc0c | ||
|
|
c728b9f01f | ||
|
|
c053a8b481 | ||
|
|
0e107c4842 | ||
|
|
07befae09b | ||
|
|
ac4e93b3e5 | ||
|
|
dbbef7396e | ||
|
|
df4d7336c5 | ||
|
|
22106bc014 | ||
|
|
cbd43bb108 | ||
|
|
db0b7bc7d0 | ||
|
|
7160be3fdb | ||
|
|
55df62eda3 | ||
|
|
196d4e0d9a | ||
|
|
d0a8fe62ca | ||
|
|
945b841d48 | ||
|
|
c4ef934afe | ||
|
|
9d076721e8 | ||
|
|
62fd8be727 | ||
|
|
ae9593fa10 | ||
|
|
78ab560f17 | ||
|
|
e486040111 | ||
|
|
f7dea89c7a | ||
|
|
8b5a2b428e | ||
|
|
944cace649 | ||
|
|
08f111dd0c | ||
|
|
c849307960 | ||
|
|
c846a918fc | ||
|
|
04645c7a9d | ||
|
|
7847db06f7 | ||
|
|
52ff426581 | ||
|
|
38a53f8448 | ||
|
|
e3ce6f3f30 | ||
|
|
d5701c2435 | ||
|
|
779f5ad78d | ||
|
|
306ba98b1e | ||
|
|
db39744a08 | ||
|
|
51e2313515 | ||
|
|
51d9b43023 | ||
|
|
97b5c848d9 | ||
|
|
3bf64af6a4 | ||
|
|
f62051d76f | ||
|
|
de6c30b510 | ||
|
|
4bf9e70937 | ||
|
|
bf0f71d504 | ||
|
|
23c40b5c0f | ||
|
|
93682bb687 | ||
|
|
fa2f9817cc | ||
|
|
f9cd004867 | ||
|
|
1d8ede9301 | ||
|
|
a5b7868cf3 | ||
|
|
0b1647e004 | ||
|
|
3e79243700 | ||
|
|
498b0dfae9 | ||
|
|
67c07c175d | ||
|
|
93854c4c6b | ||
|
|
b6a185a70e | ||
|
|
0485308878 | ||
|
|
952f75d830 | ||
|
|
8f8f7701f0 | ||
|
|
67b43e8565 | ||
|
|
e3b01c7595 | ||
|
|
e85e9626d1 | ||
|
|
586c0aca07 | ||
|
|
5cfb45537b | ||
|
|
245cbae5b2 | ||
|
|
f14fd1ee00 | ||
|
|
40b4bf37e7 | ||
|
|
3dc5150cef | ||
|
|
52061f624e | ||
|
|
0ac14e35b2 | ||
|
|
059f0b427f | ||
|
|
3615d64e55 | ||
|
|
ce6c987c8c | ||
|
|
372b246ae4 | ||
|
|
d7cef5dc99 | ||
|
|
47fb9492d2 | ||
|
|
807f7d7725 | ||
|
|
c1b6656939 | ||
|
|
3a33b18b34 | ||
|
|
70889d7b15 | ||
|
|
5412c22c77 | ||
|
|
241c21b75a | ||
|
|
6ea484d1f5 | ||
|
|
413fab33e5 | ||
|
|
30b0eff13f | ||
|
|
a2db8495bc | ||
|
|
48f6f9d56b | ||
|
|
3fbe1524e4 | ||
|
|
018bd46884 | ||
|
|
6d2ba575bd | ||
|
|
bbcb9cc63c | ||
|
|
e9214b000b | ||
|
|
b88451df35 | ||
|
|
38ce488bd0 | ||
|
|
35c87b9bc6 | ||
|
|
4f7c26fb59 | ||
|
|
2c188de044 | ||
|
|
227c173869 | ||
|
|
34ac502065 | ||
|
|
86035599fe | ||
|
|
745aee0c4c | ||
|
|
e39b3b0498 | ||
|
|
b4b6440297 | ||
|
|
72917f8f44 | ||
|
|
cf434cfd08 | ||
|
|
507cb508d7 | ||
|
|
bc5eaf1b20 | ||
|
|
0398940b8e | ||
|
|
b1bd236e79 | ||
|
|
f22d94b95a | ||
|
|
ce6f7d8d9f | ||
|
|
e41858a470 | ||
|
|
720db7820e | ||
|
|
58d40d97e6 | ||
|
|
560e1d1ec1 | ||
|
|
bc2d3f5307 | ||
|
|
6e086b553a | ||
|
|
47c94bbe3c | ||
|
|
ba1fadc3f7 | ||
|
|
9668f3bd42 | ||
|
|
37bfaf7023 | ||
|
|
a1fd716f3b | ||
|
|
ca034ab855 | ||
|
|
df0413f361 | ||
|
|
859eb894bc | ||
|
|
3b3e4fc761 | ||
|
|
3dd1960b2a | ||
|
|
9069de4eea | ||
|
|
4d72d837be | ||
|
|
70d9be09cc | ||
|
|
8f441bb341 | ||
|
|
f59b95da76 | ||
|
|
35c4e01d18 | ||
|
|
18f85f8dd0 | ||
|
|
a693e71f28 | ||
|
|
c9939d1fd3 | ||
|
|
b36957e25d | ||
|
|
9e8f848074 | ||
|
|
5516bd4ec8 | ||
|
|
2d724b771e | ||
|
|
5f5d8230ea | ||
|
|
642ad8797c | ||
|
|
9f90098dfb | ||
|
|
95101e1958 | ||
|
|
a20cd83e5d | ||
|
|
314b8f7958 | ||
|
|
93c3e23672 | ||
|
|
76b3e558b9 | ||
|
|
ab78e4bef0 | ||
|
|
f3e136fff6 | ||
|
|
18a14d6bf5 | ||
|
|
8be3e5f2e2 | ||
|
|
71379d00bf | ||
|
|
33f1662279 | ||
|
|
5d8f30356a | ||
|
|
60b166ac4d | ||
|
|
f01c807873 | ||
|
|
24d3f55a34 | ||
|
|
ade96f441e | ||
|
|
df22a923c4 | ||
|
|
a0b25e82f5 | ||
|
|
953feea5d3 | ||
|
|
4785e69585 | ||
|
|
4bfcd968a7 | ||
|
|
fd4b78e95d | ||
|
|
86867b76dd | ||
|
|
3584b2144e | ||
|
|
7165b8b1c8 | ||
|
|
1cdde3c8d0 | ||
|
|
d0bc5df348 | ||
|
|
802e907ae5 | ||
|
|
31019c1652 | ||
|
|
a21756dedc | ||
|
|
976d4ef267 | ||
|
|
05b2cbb310 | ||
|
|
9a8a2fb72b | ||
|
|
b355f7ea0e | ||
|
|
791b3309c8 | ||
|
|
5bc4554a6e | ||
|
|
1400e8fb8b | ||
|
|
f039948f09 | ||
|
|
112983b87d | ||
|
|
e46aa34185 | ||
|
|
211f718d25 | ||
|
|
0d77d2ea11 | ||
|
|
b52be5a0e7 | ||
|
|
1d4b7fca78 | ||
|
|
da31012521 | ||
|
|
c343611bf2 | ||
|
|
e0f3d96f9a | ||
|
|
bb3b7c2ff1 | ||
|
|
bed2259ede | ||
|
|
8208dea9e2 | ||
|
|
94729cf355 | ||
|
|
795aee180d | ||
|
|
083c21c7c6 | ||
|
|
c3aa33f7e2 | ||
|
|
ae6d9a5466 | ||
|
|
00780a8a6f | ||
|
|
097307a8f0 | ||
|
|
5d49bab0b1 | ||
|
|
6514a7cdee | ||
|
|
69cd9ff712 | ||
|
|
4682b73269 | ||
|
|
62f9808ce8 | ||
|
|
acbcec3004 | ||
|
|
417b9730b3 | ||
|
|
9a3269d91b | ||
|
|
5b2c2e76fb | ||
|
|
2d3f594b08 | ||
|
|
eed8c3afc6 | ||
|
|
512995a690 | ||
|
|
b983a196aa | ||
|
|
3717641c6c | ||
|
|
39b855dfd3 | ||
|
|
77361183d1 | ||
|
|
d2023dac41 | ||
|
|
24789aba9f | ||
|
|
9628820de0 | ||
|
|
728fea362d | ||
|
|
f0699eac56 | ||
|
|
6fe10b9054 | ||
|
|
899ed70268 | ||
|
|
968d59a50f | ||
|
|
4853d699d7 | ||
|
|
b413a9ba42 | ||
|
|
de39922342 | ||
|
|
443c21dc15 | ||
|
|
e29bad58eb | ||
|
|
c39cd1d7a2 | ||
|
|
3c22121f48 | ||
|
|
7f08256f2f | ||
|
|
c8fc80fb77 | ||
|
|
1c891d2dd6 | ||
|
|
8151679e48 | ||
|
|
a0783a4a5a | ||
|
|
a75c02b0f1 | ||
|
|
af61e4b99f | ||
|
|
9a826752e8 | ||
|
|
5a6d57899a | ||
|
|
6aa7d36e69 | ||
|
|
1e31df0004 | ||
|
|
de4253f385 | ||
|
|
68a912b36d | ||
|
|
651e6b46d0 | ||
|
|
f5e2a5ce2f | ||
|
|
179b369fde | ||
|
|
815859a7bb | ||
|
|
d9185a5a7e | ||
|
|
d1c09d04ff | ||
|
|
87de70d7ac | ||
|
|
08dcf151a6 | ||
|
|
96ef1297af | ||
|
|
9a7b48eb26 | ||
|
|
e8732ba214 | ||
|
|
c985cb4b0e | ||
|
|
51b30845c1 | ||
|
|
c1f3f02117 | ||
|
|
364b725c28 | ||
|
|
3799ccc7b8 | ||
|
|
b1a6f655d7 | ||
|
|
18df3a3df2 | ||
|
|
7df5e2ec9a | ||
|
|
8aafdcac95 | ||
|
|
c918d7df77 | ||
|
|
53df78b377 | ||
|
|
65e3dacb58 | ||
|
|
9db59e2782 | ||
|
|
3f2149f1d8 | ||
|
|
fc0025b59b | ||
|
|
ad49532330 | ||
|
|
b562308535 | ||
|
|
baba7c683c | ||
|
|
8a29b1f0b1 | ||
|
|
c9567944e7 | ||
|
|
4215e79a8b | ||
|
|
6342a98244 | ||
|
|
03a634f27d | ||
|
|
fa2721bd60 | ||
|
|
803782c140 | ||
|
|
37d6196690 | ||
|
|
5db8e09c17 | ||
|
|
6b27df86ca | ||
|
|
bfa28a9e3a | ||
|
|
20de3f4004 | ||
|
|
8695c64724 | ||
|
|
67e772ba10 | ||
|
|
f1b39ff147 | ||
|
|
978e4f71bb | ||
|
|
c36a681815 | ||
|
|
bdceeef8ff | ||
|
|
ffd0bfbf4a | ||
|
|
c59042bc00 | ||
|
|
137860a951 | ||
|
|
db81b82093 | ||
|
|
291759bd6f | ||
|
|
b1712051f1 | ||
|
|
a1fc084b4f | ||
|
|
4146681d02 | ||
|
|
ded4aa73f8 | ||
|
|
4f6a05c971 | ||
|
|
ad98d60489 | ||
|
|
99d378c03f | ||
|
|
b04526e650 | ||
|
|
09183e892f | ||
|
|
5274fdddfe | ||
|
|
061a6cb718 | ||
|
|
c46c240ec5 | ||
|
|
e7f07b3856 | ||
|
|
324119b646 | ||
|
|
e753d19e38 | ||
|
|
5da415cc22 | ||
|
|
ceda89bcfc | ||
|
|
4ed0ab4604 | ||
|
|
9b0743f19a | ||
|
|
c285c5e211 | ||
|
|
5c26a357cc | ||
|
|
c1e4733c3b | ||
|
|
60f33a4ff1 | ||
|
|
4c10477c7c | ||
|
|
61a871690c | ||
|
|
f4f7396cb9 | ||
|
|
48058fdd77 | ||
|
|
704c2ac772 | ||
|
|
9ff39fd8a4 | ||
|
|
6a5da9f5b6 | ||
|
|
cdc1c65a3d | ||
|
|
65f20a2d5a | ||
|
|
7c2b2d86a6 | ||
|
|
ed5c09e2ca | ||
|
|
a19b11738f | ||
|
|
ea7ccf3372 | ||
|
|
03e3476df4 | ||
|
|
80669eb600 | ||
|
|
17c6dc528b | ||
|
|
4fadfde870 | ||
|
|
6ba7c9234f | ||
|
|
dafe049ebd | ||
|
|
ca9ef3c2e8 | ||
|
|
034db9db1f | ||
|
|
9bee1c7ae6 | ||
|
|
bb5aa010d4 | ||
|
|
be1460ac84 | ||
|
|
f0d2463f35 | ||
|
|
dd8e829ab2 | ||
|
|
2a60b87633 | ||
|
|
45912ca0ac | ||
|
|
2be4d8d00a | ||
|
|
0ec2537a01 | ||
|
|
f6180ffc6f | ||
|
|
c90e52b4c2 | ||
|
|
94082b87b8 | ||
|
|
04398eaf11 | ||
|
|
5e494d6339 | ||
|
|
d2416e1378 | ||
|
|
119a854357 | ||
|
|
d5e7ca614a | ||
|
|
badc0769db | ||
|
|
566557a3f0 | ||
|
|
05aeccd5ca | ||
|
|
6332596a4d | ||
|
|
76b95ee227 | ||
|
|
9478439139 | ||
|
|
d49946e886 | ||
|
|
d11dbb57ab | ||
|
|
08357fe683 | ||
|
|
1f401e1f45 | ||
|
|
f5ddf2b63e | ||
|
|
c3aa4dba38 | ||
|
|
1b05ddb812 | ||
|
|
05b008edf1 | ||
|
|
110fe5a836 | ||
|
|
8b1f3d52f9 | ||
|
|
acef905cbe | ||
|
|
d4db10c832 | ||
|
|
eba879a8ca | ||
|
|
14d930dc6d | ||
|
|
f86d88868b | ||
|
|
e1725a42b9 | ||
|
|
593aba4abe | ||
|
|
9a65fa5b1b | ||
|
|
11f76bfa6b | ||
|
|
76268b0341 | ||
|
|
96501b1fca | ||
|
|
c20beab072 | ||
|
|
71712134bd | ||
|
|
2214a2a3e7 | ||
|
|
d9a4819ca7 | ||
|
|
7b045fdab6 | ||
|
|
3263b3a8ac | ||
|
|
85648460a7 | ||
|
|
767b0ee7b1 | ||
|
|
fb40581e50 | ||
|
|
61cec2f531 | ||
|
|
b34a4917dc | ||
|
|
828552e105 | ||
|
|
887b5a178a | ||
|
|
8c86df56bf | ||
|
|
b257b57e1b | ||
|
|
4e5e360aa2 | ||
|
|
4c0e52f3e9 | ||
|
|
b43dcc8fd2 | ||
|
|
abcc2d45a0 | ||
|
|
186be1466f | ||
|
|
3c3fb4e000 | ||
|
|
a1a2c8e6de | ||
|
|
4835fef626 | ||
|
|
fd1035a222 | ||
|
|
f4db6709de | ||
|
|
ed5f2fad9f | ||
|
|
9eb23637ff | ||
|
|
ad009e1438 | ||
|
|
dcc313a3b7 | ||
|
|
d1fff060c6 | ||
|
|
5db3c8ded9 | ||
|
|
3f4b2f7d99 | ||
|
|
c4f158b374 | ||
|
|
61e70e439f | ||
|
|
c66827cc8b | ||
|
|
f217d60eb4 | ||
|
|
edb5d85d3c | ||
|
|
bcc969ba8d | ||
|
|
f774effd17 | ||
|
|
b55d68ba95 | ||
|
|
d40148503c | ||
|
|
7ec8f8f604 | ||
|
|
4444e89bbc | ||
|
|
d7f0325595 | ||
|
|
f79492b78c | ||
|
|
925fbc076c | ||
|
|
6d66f71fcf | ||
|
|
4543df6c4b | ||
|
|
4e885a8ae1 | ||
|
|
de53dbf358 | ||
|
|
1e8647294a | ||
|
|
25d3af84a1 | ||
|
|
72367ff251 | ||
|
|
8b8a2d4790 | ||
|
|
eb8ec7d6d1 | ||
|
|
00bff720d0 | ||
|
|
39c80534b0 | ||
|
|
5cf0cf98f7 | ||
|
|
1a13e6103c | ||
|
|
b1f6a2ce4b | ||
|
|
8252421f26 | ||
|
|
51c3eedb87 | ||
|
|
ad73b379e6 | ||
|
|
0440512d07 | ||
|
|
865baefe82 | ||
|
|
1732adfa07 | ||
|
|
fcf05717c4 | ||
|
|
6a09708500 | ||
|
|
d3527a8a0b | ||
|
|
2f90c9532f | ||
|
|
937ce00468 | ||
|
|
8f61f8eb54 | ||
|
|
29bafb193c | ||
|
|
f2de337030 | ||
|
|
bcae082904 | ||
|
|
887320a8d2 | ||
|
|
bfcb0c92bc | ||
|
|
9a73352750 | ||
|
|
8fe9b5e86a | ||
|
|
a716f18685 | ||
|
|
2e717f67f3 | ||
|
|
ade8b21e54 | ||
|
|
a1599a84e2 | ||
|
|
0435e1c021 | ||
|
|
7528331669 | ||
|
|
42e5816d97 | ||
|
|
77788c00a0 | ||
|
|
663af9cca3 | ||
|
|
2e03ecb2b3 | ||
|
|
752f4aefc8 | ||
|
|
0dbb7eb2fd | ||
|
|
b6420f1ff6 | ||
|
|
cead6ec411 | ||
|
|
f3c665324e | ||
|
|
15cbb4eeb5 | ||
|
|
1892f9e030 | ||
|
|
716b9901a9 | ||
|
|
50516e8f79 | ||
|
|
31a4d80bf5 | ||
|
|
6e43d75756 | ||
|
|
7998ef60b2 | ||
|
|
d623edaca1 | ||
|
|
59dcb2a7df | ||
|
|
7730de5796 | ||
|
|
8fc72c0a4b | ||
|
|
226ae1a7bb | ||
|
|
324484e756 | ||
|
|
78dddd29b1 | ||
|
|
c2d6c41bed | ||
|
|
da4ceaa4fd | ||
|
|
99cc319bb3 | ||
|
|
ef858a1b5a | ||
|
|
62c0a73a69 | ||
|
|
24b7d5e489 | ||
|
|
6f46cc2695 | ||
|
|
1a58709bfd | ||
|
|
711e1f40e4 | ||
|
|
e25b1dc5b6 | ||
|
|
ce8cf140f2 | ||
|
|
005646cae3 | ||
|
|
1dd4359338 | ||
|
|
c3c997183a | ||
|
|
1e3714bd28 | ||
|
|
e413d25e7d | ||
|
|
5e8902c242 | ||
|
|
35560b569a | ||
|
|
34f95bbbdd | ||
|
|
3c890f1602 | ||
|
|
cf548d3884 | ||
|
|
8c7e275201 | ||
|
|
31ccae0cec | ||
|
|
f8fe2acdde | ||
|
|
f0e842dc4a | ||
|
|
726f629ae1 | ||
|
|
19a361f674 | ||
|
|
cb664f26da | ||
|
|
afe1ba95d3 | ||
|
|
145536c5fa | ||
|
|
da880edc7c | ||
|
|
1ce76af0e9 | ||
|
|
72cd4eeaee | ||
|
|
721a9a478f | ||
|
|
d5529afe80 | ||
|
|
44eb3af0f3 | ||
|
|
08848b2e92 | ||
|
|
142620bced | ||
|
|
d599cef011 | ||
|
|
5bba47b39c | ||
|
|
bc26d54909 | ||
|
|
6efc1700b6 | ||
|
|
fe9e562295 | ||
|
|
fe08b8a496 | ||
|
|
a71e2703a2 | ||
|
|
255014182e | ||
|
|
e209c98eab | ||
|
|
6a4a0f9c36 | ||
|
|
5c7786f39f | ||
|
|
2fd7cc20b7 | ||
|
|
a7b4e24cf4 | ||
|
|
4470edff4a | ||
|
|
b33d20d927 | ||
|
|
85b4a44fb1 | ||
|
|
8843e8b87e | ||
|
|
fcf525416f | ||
|
|
768c0e1048 | ||
|
|
a7b8207a95 | ||
|
|
1cf03b53f5 | ||
|
|
d4a8ee886c | ||
|
|
e02c67ff07 | ||
|
|
a10067bd62 | ||
|
|
0aee1faed1 | ||
|
|
e365a381c6 | ||
|
|
2c89e09d03 | ||
|
|
fd0d7ccb59 | ||
|
|
e72a6e6400 | ||
|
|
7c4dc96e03 | ||
|
|
0c4eb3452c | ||
|
|
9787972139 | ||
|
|
2b8a3458a8 | ||
|
|
ea58f0d336 | ||
|
|
e03f574b38 | ||
|
|
115715a1d8 | ||
|
|
fbfaab83ad | ||
|
|
ba2b3e9469 | ||
|
|
4768c7b5e1 | ||
|
|
66e6aa031c | ||
|
|
5dcb038fa0 | ||
|
|
6d2505f53f | ||
|
|
4f44efb156 | ||
|
|
1ad2e68e4b | ||
|
|
e2077b95a4 | ||
|
|
c18bed5a9b | ||
|
|
bdaf9a8ddf | ||
|
|
4a37c272a1 | ||
|
|
6f9015b67e | ||
|
|
664ce07f1a | ||
|
|
54c474764c | ||
|
|
29e64a354f | ||
|
|
96b63db44c | ||
|
|
8a06d2f5c0 | ||
|
|
07289be70e | ||
|
|
04d51e2437 | ||
|
|
a236f89786 | ||
|
|
91269b50d0 | ||
|
|
bc1fcf5d5a | ||
|
|
6e313c1a0a | ||
|
|
311bf3dfb6 | ||
|
|
f48912ead3 | ||
|
|
791769f2e4 | ||
|
|
e61cbfd632 | ||
|
|
f267a054e1 | ||
|
|
58743f3d5d | ||
|
|
cf4fa97a21 | ||
|
|
09107f3813 | ||
|
|
6b0996df7c | ||
|
|
9923f54f7f | ||
|
|
d9a9d0c30c | ||
|
|
d20f81781c | ||
|
|
9c9dabf8b6 | ||
|
|
b23a134de1 | ||
|
|
d68daf37b3 | ||
|
|
d44a503526 | ||
|
|
64ec20b0cd | ||
|
|
a025e7517b | ||
|
|
fa7b263033 | ||
|
|
0e6478e9bb | ||
|
|
4c85e1db08 | ||
|
|
4fdac61f25 | ||
|
|
e247d39ff4 | ||
|
|
1ab259806c | ||
|
|
65bdc27683 | ||
|
|
8a8bb3d77e | ||
|
|
4eb3df0d29 | ||
|
|
5f49f22fb7 | ||
|
|
8e2e51702b | ||
|
|
c3bc213bef | ||
|
|
1568e2814d | ||
|
|
6edcfe6a82 | ||
|
|
1a33421fe1 | ||
|
|
9f2fefb606 | ||
|
|
8d0f6d433f | ||
|
|
5ac9b15456 | ||
|
|
2ae960ccbd | ||
|
|
2ab76ffdb1 | ||
|
|
f3a8b74f77 | ||
|
|
25ac0a5f73 | ||
|
|
e106f26073 | ||
|
|
77e993115e | ||
|
|
9dd07e6ba0 | ||
|
|
22e2a9d2bf | ||
|
|
eb64550ea4 | ||
|
|
ac4f37b0a5 | ||
|
|
354837520c | ||
|
|
a7a3a142df | ||
|
|
63b976aae5 | ||
|
|
7879e50a84 | ||
|
|
16c17cd55c | ||
|
|
e9a056744d | ||
|
|
9aa5b62699 | ||
|
|
72c4d2a866 | ||
|
|
b540c7a2e7 | ||
|
|
9f84fe1bf0 | ||
|
|
a0270fc060 | ||
|
|
9c9e082f74 | ||
|
|
83d75c3fa0 | ||
|
|
dce19ba23f | ||
|
|
44d2a050e0 | ||
|
|
e0da233ad3 | ||
|
|
457a57d4bc | ||
|
|
27a5a65695 | ||
|
|
dfe6b9472a | ||
|
|
a2b0c41087 | ||
|
|
948d0b54b0 | ||
|
|
575b985fb8 | ||
|
|
3f8cc11cae | ||
|
|
9da3e5c9c9 | ||
|
|
78dd60c020 | ||
|
|
5bcda3f0f2 | ||
|
|
d6fc11d98a | ||
|
|
e23a0b6401 | ||
|
|
57b7fafb37 | ||
|
|
9f4a9bc9a2 | ||
|
|
a877826048 | ||
|
|
7876a9e765 | ||
|
|
31ab835636 | ||
|
|
7a3853ed06 | ||
|
|
7f80acda40 | ||
|
|
eb3d75865f | ||
|
|
43c5f4b46f | ||
|
|
6890fabd3c | ||
|
|
e44c8223ff | ||
|
|
dd7e62a93c | ||
|
|
20a62cdd6c | ||
|
|
3958cd059f | ||
|
|
53c9fd8dcb | ||
|
|
be05c26268 | ||
|
|
8e70f7c6b3 | ||
|
|
f7238017b5 | ||
|
|
064ec3f07b | ||
|
|
53b92f890a | ||
|
|
9b4a75a2f8 | ||
|
|
25fa2a9395 | ||
|
|
516bef3e06 | ||
|
|
74735ce7ed | ||
|
|
a7f2ec4561 | ||
|
|
5faec3d6ed | ||
|
|
9db2998134 | ||
|
|
326cdd5d93 | ||
|
|
d777ef9189 | ||
|
|
90439d8478 | ||
|
|
86bed95f8a | ||
|
|
29d4a0272c | ||
|
|
52524023bc | ||
|
|
69abb91cd8 | ||
|
|
22faac0a08 | ||
|
|
3817dceba6 | ||
|
|
9423ca5271 | ||
|
|
1dab6ce3ed | ||
|
|
143a4edd02 | ||
|
|
adec4ac54a | ||
|
|
db20bc1720 | ||
|
|
8d96945b15 | ||
|
|
a012be6a6d | ||
|
|
0c8b07b665 | ||
|
|
3434b35d86 | ||
|
|
ffd571769e | ||
|
|
c54323a1f8 | ||
|
|
b248dd0fc8 | ||
|
|
207c272479 | ||
|
|
f7c264af72 | ||
|
|
c55c619ff7 | ||
|
|
85c33a05a7 | ||
|
|
4d1d70ca76 | ||
|
|
04dcdb28d2 | ||
|
|
0a30b35651 | ||
|
|
59a413497e | ||
|
|
e24cdf321b | ||
|
|
ccf2f2da9b | ||
|
|
d4260119a8 | ||
|
|
e9e900374e | ||
|
|
7b65e1900d | ||
|
|
92b0d35986 | ||
|
|
43ea3d3f41 | ||
|
|
65433b951d | ||
|
|
6702cf7961 | ||
|
|
7b063335be | ||
|
|
b69cf1e950 | ||
|
|
1b64af0c9b | ||
|
|
cdc8077956 | ||
|
|
c9c414f1c0 | ||
|
|
d1419737b5 | ||
|
|
a230da72a6 | ||
|
|
a2271263d0 | ||
|
|
dc657f64cd | ||
|
|
c9a229357c | ||
|
|
fbb1f40d77 | ||
|
|
cded20b7b6 | ||
|
|
0e8ef25cee | ||
|
|
0be3f7f951 | ||
|
|
4fb9e17b43 | ||
|
|
d96f914fc1 | ||
|
|
1d4ec605a7 | ||
|
|
eb362e45da | ||
|
|
993b43f31c | ||
|
|
8711902173 | ||
|
|
2f43037e94 | ||
|
|
15c93f90c2 | ||
|
|
6d97cac430 | ||
|
|
ce4befff05 | ||
|
|
555a919ddd | ||
|
|
5847c66bb7 | ||
|
|
349def3a94 | ||
|
|
f4f16f6856 | ||
|
|
bdcafcea64 | ||
|
|
8ee4b70edd | ||
|
|
917cd408ec | ||
|
|
ef190fe835 | ||
|
|
26782f0ba7 | ||
|
|
9c277134e0 | ||
|
|
ad7971ffd1 | ||
|
|
049f316091 | ||
|
|
8ef5bef118 | ||
|
|
d85b33f31d | ||
|
|
6a3942478b | ||
|
|
6ec83383e2 | ||
|
|
b10aaddcd7 | ||
|
|
abea434d80 | ||
|
|
ee0e8ac41f | ||
|
|
64c2293952 | ||
|
|
c900d89367 | ||
|
|
656bd9c3e8 | ||
|
|
16915211df | ||
|
|
0343f30ff3 | ||
|
|
519fb35777 | ||
|
|
29ae90ea2b | ||
|
|
6d5ab64685 | ||
|
|
c37f617b06 | ||
|
|
08b3a23aa0 | ||
|
|
b816bd348e | ||
|
|
754bbcabc4 | ||
|
|
9583aa7936 | ||
|
|
6ffe0079d6 | ||
|
|
36dc0329f9 | ||
|
|
ce98b2dc7d | ||
|
|
d3fa62c6e9 | ||
|
|
d90e450524 | ||
|
|
0a02093753 | ||
|
|
c0a315bbec | ||
|
|
ce187b5865 | ||
|
|
9e813ee681 | ||
|
|
e0dadcef2d | ||
|
|
9b69df4fe2 | ||
|
|
f6d9f7194c | ||
|
|
a59d815420 | ||
|
|
3574dedce6 | ||
|
|
164839f6fb | ||
|
|
89e50ae71e | ||
|
|
917fc12442 | ||
|
|
0f715858f6 | ||
|
|
903f2bc165 | ||
|
|
50594d5ee2 | ||
|
|
0e484541ef | ||
|
|
3a6cdd1b67 | ||
|
|
9b42ea4cb1 | ||
|
|
7ddcb2ecb1 | ||
|
|
2d833c1592 | ||
|
|
59188b9ffd | ||
|
|
044185b9c7 | ||
|
|
541a9954be | ||
|
|
863cdb6dda | ||
|
|
2512a98a4d | ||
|
|
b27c2c0f07 | ||
|
|
b3ace934f1 | ||
|
|
6655d27071 | ||
|
|
6a79a8665f | ||
|
|
25d65b9397 | ||
|
|
2a62f344d7 | ||
|
|
6a2a44c8c2 | ||
|
|
fbcc465682 | ||
|
|
bc4211d1ed | ||
|
|
bf5ece7e7a | ||
|
|
16725b12a1 | ||
|
|
edecfc5a4c | ||
|
|
c85bf386f6 | ||
|
|
173d73ff3c | ||
|
|
f329c08189 | ||
|
|
a2915eebfa | ||
|
|
f5d79b0ece | ||
|
|
16523d1fdc | ||
|
|
d5d47cefc1 | ||
|
|
816b75fd0b | ||
|
|
fce77d4a7b | ||
|
|
70ff2bd9be | ||
|
|
f1886e2f6b | ||
|
|
c2826b34ce | ||
|
|
5704816c0b | ||
|
|
a6e15c2d3c | ||
|
|
7d0b388dfa | ||
|
|
95ddf7bfd9 | ||
|
|
d3b1cdd2e4 | ||
|
|
04599c8a68 | ||
|
|
91fea0ae34 | ||
|
|
280d940b0a | ||
|
|
094a26a86b | ||
|
|
f2557c4d40 | ||
|
|
c6b1a0acee | ||
|
|
56715faccc | ||
|
|
dac30eb9e4 | ||
|
|
b8dc6ccf8e | ||
|
|
aba751fdab | ||
|
|
215bbb6978 | ||
|
|
66ab409858 | ||
|
|
09c7594e49 | ||
|
|
0ba7886e77 | ||
|
|
e12ca36c15 | ||
|
|
02ad7fd44b | ||
|
|
764e512976 | ||
|
|
8cc794caff | ||
|
|
b6e496388d | ||
|
|
608220c2a7 | ||
|
|
3805b9c59e | ||
|
|
c15c254fa0 | ||
|
|
0a32d2eefa | ||
|
|
30412e1a6d |
31
mozilla/modules/oji/Makefile
Normal file
31
mozilla/modules/oji/Makefile
Normal file
@@ -0,0 +1,31 @@
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Makefile to build the MODULES/OJI tree
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the depth of the current directory relative to the
|
||||
#// root of NS
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DEPTH=../..
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify any "command" targets. (ie. DIRS, INSTALL_FILES, ...)
|
||||
#// (these must come before the common makefiles are included)
|
||||
#//
|
||||
#// DIRS - There are subdirectories to process
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DIRS= public src
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Include the common makefile rules
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
include $(DEPTH)/config/rules.mk
|
||||
|
||||
36
mozilla/modules/oji/Makefile.in
Normal file
36
mozilla/modules/oji/Makefile.in
Normal file
@@ -0,0 +1,36 @@
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Makefile to build the MODULES/OJI tree
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the depth of the current directory relative to the
|
||||
#// root of NS
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DEPTH=../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify any "command" targets. (ie. DIRS, INSTALL_FILES, ...)
|
||||
#// (these must come before the common makefiles are included)
|
||||
#//
|
||||
#// DIRS - There are subdirectories to process
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DIRS= public src
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Include the common makefile rules
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
9
mozilla/modules/oji/macbuild/oji.Prefix
Normal file
9
mozilla/modules/oji/macbuild/oji.Prefix
Normal file
@@ -0,0 +1,9 @@
|
||||
//
|
||||
// oji.Prefix
|
||||
//
|
||||
// Global prefix file for the oji.shlb target.
|
||||
//
|
||||
//
|
||||
|
||||
#include "MacPrefix.h"
|
||||
#include "ojiConfig.h"
|
||||
BIN
mozilla/modules/oji/macbuild/oji.mcp
Normal file
BIN
mozilla/modules/oji/macbuild/oji.mcp
Normal file
Binary file not shown.
9
mozilla/modules/oji/macbuild/ojiConfig.h
Normal file
9
mozilla/modules/oji/macbuild/ojiConfig.h
Normal file
@@ -0,0 +1,9 @@
|
||||
/* #define EDITOR 1
|
||||
|
||||
#include "NSCrossProductDefines.h"
|
||||
#include "IDE_Options.h"
|
||||
|
||||
#define JAVA
|
||||
|
||||
#define MOZILLA_CLIENT 1 */
|
||||
|
||||
8
mozilla/modules/oji/macbuild/ojiDebug.Prefix
Normal file
8
mozilla/modules/oji/macbuild/ojiDebug.Prefix
Normal file
@@ -0,0 +1,8 @@
|
||||
//
|
||||
// ojiDebug.Prefix
|
||||
//
|
||||
// Global prefix file for the ojiDebug.shlb target.
|
||||
//
|
||||
|
||||
#include "MacPrefix_debug.h"
|
||||
#include "ojiConfig.h"
|
||||
30
mozilla/modules/oji/makefile.win
Normal file
30
mozilla/modules/oji/makefile.win
Normal file
@@ -0,0 +1,30 @@
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Makefile to build the MODULES\APPLET tree
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the depth of the current directory relative to the
|
||||
#// root of NS
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DEPTH=..\..
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify any "command" targets. (ie. DIRS, INSTALL_FILES, ...)
|
||||
#// (these must come before the common makefiles are included)
|
||||
#//
|
||||
#// DIRS - There are subdirectories to process
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DIRS= public src
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Include the common makefile rules
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
30
mozilla/modules/oji/public/MANIFEST
Normal file
30
mozilla/modules/oji/public/MANIFEST
Normal file
@@ -0,0 +1,30 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist directory
|
||||
#
|
||||
|
||||
nsIJRIPlugin.h
|
||||
nsIJVMConsole.h
|
||||
nsIJVMManager.h
|
||||
nsIJVMPlugin.h
|
||||
nsIJVMPluginInstance.h
|
||||
nsIJVMPluginTagInfo.h
|
||||
nsISymantecDebugger.h
|
||||
nsISymantecDebugManager.h
|
||||
nsjvm.h
|
||||
33
mozilla/modules/oji/public/Makefile
Normal file
33
mozilla/modules/oji/public/Makefile
Normal file
@@ -0,0 +1,33 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DEPTH = ../../..
|
||||
|
||||
MODULE = oji
|
||||
|
||||
EXPORTS = \
|
||||
nsjvm.h \
|
||||
nsIJRIPlugin.h \
|
||||
nsIJVMConsole.h \
|
||||
nsIJVMManager.h \
|
||||
nsIJVMPlugin.h \
|
||||
nsIJVMPluginInstance.h \
|
||||
nsIJVMPluginTagInfo.h \
|
||||
nsISymantecDebugManager.h \
|
||||
nsISymantecDebugger.h
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
||||
40
mozilla/modules/oji/public/Makefile.in
Normal file
40
mozilla/modules/oji/public/Makefile.in
Normal file
@@ -0,0 +1,40 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = oji
|
||||
|
||||
EXPORTS = \
|
||||
nsjvm.h \
|
||||
nsIJRIPlugin.h \
|
||||
nsIJVMConsole.h \
|
||||
nsIJVMManager.h \
|
||||
nsIJVMPlugin.h \
|
||||
nsIJVMPluginInstance.h \
|
||||
nsIJVMPluginTagInfo.h \
|
||||
nsISymantecDebugManager.h \
|
||||
nsISymantecDebugger.h
|
||||
|
||||
EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
36
mozilla/modules/oji/public/makefile.win
Normal file
36
mozilla/modules/oji/public/makefile.win
Normal file
@@ -0,0 +1,36 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
IGNORE_MANIFEST=1
|
||||
|
||||
DEPTH = ..\..\..
|
||||
|
||||
MODULE = oji
|
||||
|
||||
EXPORTS = \
|
||||
nsjvm.h \
|
||||
nsIJRIPlugin.h \
|
||||
nsIJVMConsole.h \
|
||||
nsIJVMManager.h \
|
||||
nsIJVMPlugin.h \
|
||||
nsIJVMPluginInstance.h \
|
||||
nsIJVMPluginTagInfo.h \
|
||||
nsISymantecDebugManager.h \
|
||||
nsISymantecDebugger.h
|
||||
|
||||
include <$(DEPTH)/config/rules.mak>
|
||||
|
||||
66
mozilla/modules/oji/public/nsIJRIPlugin.h
Normal file
66
mozilla/modules/oji/public/nsIJRIPlugin.h
Normal file
@@ -0,0 +1,66 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// NETSCAPE JAVA VM PLUGIN EXTENSIONS
|
||||
//
|
||||
// This interface allows a Java virtual machine to be plugged into
|
||||
// Communicator to implement the APPLET tag and host applets.
|
||||
//
|
||||
// Note that this is the C++ interface that the plugin sees. The browser
|
||||
// uses a specific implementation of this, nsJVMPlugin, found in jvmmgr.h.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIJRIPlugin_h___
|
||||
#define nsIJRIPlugin_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "jri.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// JRI Plugin Class Interface
|
||||
// This interface is provided for backward compatibility for the Netscape JVM.
|
||||
|
||||
class nsIJRIPlugin : public nsISupports {
|
||||
public:
|
||||
|
||||
// QueryInterface on nsIJVMPlugin to get this.
|
||||
|
||||
// Find or create a JRIEnv for the current thread.
|
||||
// Returns NULL if an error occurs.
|
||||
NS_IMETHOD_(nsrefcnt)
|
||||
GetJRIEnv(JRIEnv* *result) = 0;
|
||||
|
||||
// This method must be called when the caller is done using the JRIEnv.
|
||||
// This decrements a refcount associated with it may free it.
|
||||
NS_IMETHOD_(nsrefcnt)
|
||||
ReleaseJRIEnv(JRIEnv* env) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IJRIPLUGIN_IID \
|
||||
{ /* bfe2d7d0-0164-11d2-815b-006008119d7a */ \
|
||||
0xbfe2d7d0, \
|
||||
0x0164, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIJRIPlugin_h___ */
|
||||
71
mozilla/modules/oji/public/nsIJVMConsole.h
Normal file
71
mozilla/modules/oji/public/nsIJVMConsole.h
Normal file
@@ -0,0 +1,71 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// NETSCAPE JAVA VM PLUGIN EXTENSIONS
|
||||
//
|
||||
// This interface allows a Java virtual machine to be plugged into
|
||||
// Communicator to implement the APPLET tag and host applets.
|
||||
//
|
||||
// Note that this is the C++ interface that the plugin sees. The browser
|
||||
// uses a specific implementation of this, nsJVMPlugin, found in jvmmgr.h.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIJVMConsole_h___
|
||||
#define nsIJVMConsole_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// JVM Console Interface
|
||||
// This interface defines the API the browser needs to show and hide the JVM's
|
||||
// Java console, and to send text to it.
|
||||
|
||||
class nsIJVMConsole : public nsISupports {
|
||||
public:
|
||||
|
||||
// QueryInterface on nsIJVMPlugin to get this.
|
||||
|
||||
NS_IMETHOD
|
||||
ShowConsole(void) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
HideConsole(void) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
IsConsoleVisible(PRBool *result) = 0;
|
||||
|
||||
// Prints a message to the Java console. The encodingName specifies the
|
||||
// encoding of the message, and if NULL, specifies the default platform
|
||||
// encoding.
|
||||
NS_IMETHOD
|
||||
Print(const char* msg, const char* encodingName = NULL) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IJVMCONSOLE_IID \
|
||||
{ /* 85344580-01c1-11d2-815b-006008119d7a */ \
|
||||
0x85344580, \
|
||||
0x01c1, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIJVMConsole_h___ */
|
||||
68
mozilla/modules/oji/public/nsIJVMManager.h
Normal file
68
mozilla/modules/oji/public/nsIJVMManager.h
Normal file
@@ -0,0 +1,68 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// NETSCAPE JAVA VM PLUGIN EXTENSIONS
|
||||
//
|
||||
// This interface allows a Java virtual machine to be plugged into
|
||||
// Communicator to implement the APPLET tag and host applets.
|
||||
//
|
||||
// Note that this is the C++ interface that the plugin sees. The browser
|
||||
// uses a specific implementation of this, nsJVMPlugin, found in jvmmgr.h.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIJVMManager_h___
|
||||
#define nsIJVMManager_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define NPJVM_MIME_TYPE "application/x-java-vm" // XXX application/java
|
||||
|
||||
enum {
|
||||
NS_JVM_ERROR_BASE = NS_ERROR_BASE + 0x10000,
|
||||
NS_JVM_ERROR_NO_CLASSES,
|
||||
NS_JVM_ERROR_WRONG_CLASSES,
|
||||
NS_JVM_ERROR_JAVA_ERROR,
|
||||
NS_JVM_ERROR_NO_DEBUGGER
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Java VM Plugin Manager
|
||||
// This interface defines additional entry points that are available
|
||||
// to JVM plugins for browsers that support JVM plugins.
|
||||
|
||||
class nsIJVMPlugin;
|
||||
|
||||
class nsIJVMManager : public nsISupports {
|
||||
public:
|
||||
|
||||
};
|
||||
|
||||
#define NS_IJVMMANAGER_IID \
|
||||
{ /* a1e5ed50-aa4a-11d1-85b2-00805f0e4dfe */ \
|
||||
0xa1e5ed50, \
|
||||
0xaa4a, \
|
||||
0x11d1, \
|
||||
{0x85, 0xb2, 0x00, 0x80, 0x5f, 0x0e, 0x4d, 0xfe} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIJVMManager_h___ */
|
||||
128
mozilla/modules/oji/public/nsIJVMPlugin.h
Normal file
128
mozilla/modules/oji/public/nsIJVMPlugin.h
Normal file
@@ -0,0 +1,128 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// NETSCAPE JAVA VM PLUGIN EXTENSIONS
|
||||
//
|
||||
// This interface allows a Java virtual machine to be plugged into
|
||||
// Communicator to implement the APPLET tag and host applets.
|
||||
//
|
||||
// Note that this is the C++ interface that the plugin sees. The browser
|
||||
// uses a specific implementation of this, nsJVMPlugin, found in jvmmgr.h.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIJVMPlugin_h___
|
||||
#define nsIJVMPlugin_h___
|
||||
|
||||
#include "nsIPlugin.h"
|
||||
#include "nsIPrincipal.h"
|
||||
#include "jni.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Java VM Plugin Interface
|
||||
// This interface defines additional entry points that a plugin developer needs
|
||||
// to implement in order to implement a Java virtual machine plugin.
|
||||
|
||||
struct nsJVMInitArgs {
|
||||
PRUint32 version;
|
||||
const char* classpathAdditions; // appended to the JVM's classpath
|
||||
// other fields may be added here for version numbers beyond 0x00010000
|
||||
};
|
||||
|
||||
/**
|
||||
* nsJVMInitArgs_Version is the current version number for the nsJVMInitArgs
|
||||
* struct specified above. The nsVersionOk macro should be used when comparing
|
||||
* a supplied nsJVMInitArgs struct against this version.
|
||||
*/
|
||||
#define nsJVMInitArgs_Version 0x00010000L
|
||||
|
||||
|
||||
class nsIJVMPlugin : public nsIPlugin {
|
||||
public:
|
||||
|
||||
// This method us used to start the Java virtual machine.
|
||||
// It sets up any global state necessary to host Java programs.
|
||||
// Note that calling this method is distinctly separate from
|
||||
// initializing the nsIJVMPlugin object (done by the Initialize
|
||||
// method).
|
||||
NS_IMETHOD
|
||||
StartupJVM(nsJVMInitArgs* initargs) = 0;
|
||||
|
||||
// This method us used to stop the Java virtual machine.
|
||||
// It tears down any global state necessary to host Java programs.
|
||||
// The fullShutdown flag specifies whether the browser is quitting
|
||||
// (PR_TRUE) or simply whether the JVM is being shut down (PR_FALSE).
|
||||
NS_IMETHOD
|
||||
ShutdownJVM(PRBool fullShutdown = PR_FALSE) = 0;
|
||||
|
||||
// Causes the JVM to append a new directory to its classpath.
|
||||
// If the JVM doesn't support this operation, an error is returned.
|
||||
NS_IMETHOD
|
||||
AddToClassPath(const char* dirPath) = 0;
|
||||
|
||||
// Causes the JVM to remove a directory from its classpath.
|
||||
// If the JVM doesn't support this operation, an error is returned.
|
||||
NS_IMETHOD
|
||||
RemoveFromClassPath(const char* dirPath) = 0;
|
||||
|
||||
// Returns the current classpath in use by the JVM.
|
||||
NS_IMETHOD
|
||||
GetClassPath(const char* *result) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
GetJavaWrapper(JNIEnv* jenv, jint obj, jobject *jobj) = 0;
|
||||
|
||||
#if 0 // still trying to decide on this
|
||||
// nsIPrincipals is a array of pointers to principals associated with this
|
||||
// java object trying to run a JS script.
|
||||
NS_IMETHOD
|
||||
GetPrincipalArray(JNIEnv *pJNIEnv, PRInt32 frameIndex, nsIPrincipal ***principalArray, PRInt32 *length) = 0;
|
||||
#endif
|
||||
|
||||
// Find or create a JNIEnv for the current thread.
|
||||
// Returns NULL if an error occurs.
|
||||
NS_IMETHOD_(nsrefcnt)
|
||||
GetJNIEnv(JNIEnv* *result) = 0;
|
||||
|
||||
// This method must be called when the caller is done using the JNIEnv.
|
||||
// This decrements a refcount associated with it may free it.
|
||||
NS_IMETHOD_(nsrefcnt)
|
||||
ReleaseJNIEnv(JNIEnv* env) = 0;
|
||||
|
||||
#ifdef XP_MAC
|
||||
// beard: since only my plugin has implemented this so far, I'll leave it conditional for now.
|
||||
/**
|
||||
* Gives time to the JVM from the main event loop of the browser. This is
|
||||
* necessary when there aren't any plugin instances around, but Java threads exist.
|
||||
*/
|
||||
NS_IMETHOD
|
||||
SpendTime(PRUint32 timeMillis) = 0;
|
||||
#endif
|
||||
};
|
||||
|
||||
#define NS_IJVMPLUGIN_IID \
|
||||
{ /* da6f3bc0-a1bc-11d1-85b1-00805f0e4dfe */ \
|
||||
0xda6f3bc0, \
|
||||
0xa1bc, \
|
||||
0x11d1, \
|
||||
{0x85, 0xb1, 0x00, 0x80, 0x5f, 0x0e, 0x4d, 0xfe} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIJVMPlugin_h___ */
|
||||
59
mozilla/modules/oji/public/nsIJVMPluginInstance.h
Normal file
59
mozilla/modules/oji/public/nsIJVMPluginInstance.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// NETSCAPE JAVA VM PLUGIN EXTENSIONS
|
||||
//
|
||||
// This interface allows a Java virtual machine to be plugged into
|
||||
// Communicator to implement the APPLET tag and host applets.
|
||||
//
|
||||
// Note that this is the C++ interface that the plugin sees. The browser
|
||||
// uses a specific implementation of this, nsJVMPlugin, found in jvmmgr.h.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIJVMPluginInstance_h___
|
||||
#define nsIJVMPluginInstance_h___
|
||||
|
||||
#include "nsIPluginInstance.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Java VM Plugin Instance Interface
|
||||
|
||||
class nsIJVMPluginInstance : public nsIPluginInstance {
|
||||
public:
|
||||
|
||||
// This method is called when LiveConnect wants to find the Java object
|
||||
// associated with this plugin instance, e.g. the Applet or JavaBean object.
|
||||
NS_IMETHOD
|
||||
GetJavaObject(jobject *result) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
GetText(const char* *result) = 0;
|
||||
};
|
||||
|
||||
#define NS_IJVMPLUGININSTANCE_IID \
|
||||
{ /* a0c057d0-01c1-11d2-815b-006008119d7a */ \
|
||||
0xa0c057d0, \
|
||||
0x01c1, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIJVMPluginInstance_h___ */
|
||||
69
mozilla/modules/oji/public/nsIJVMPluginTagInfo.h
Normal file
69
mozilla/modules/oji/public/nsIJVMPluginTagInfo.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// NETSCAPE JAVA VM PLUGIN EXTENSIONS
|
||||
//
|
||||
// This interface allows a Java virtual machine to be plugged into
|
||||
// Communicator to implement the APPLET tag and host applets.
|
||||
//
|
||||
// Note that this is the C++ interface that the plugin sees. The browser
|
||||
// uses a specific implementation of this, nsJVMPlugin, found in jvmmgr.h.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIJVMPluginTagInfo_h___
|
||||
#define nsIJVMPluginTagInfo_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Java VM Plugin Instance Peer Interface
|
||||
// This interface provides additional hooks into the plugin manager that allow
|
||||
// a plugin to implement the plugin manager's Java virtual machine.
|
||||
|
||||
class nsIJVMPluginTagInfo : public nsISupports {
|
||||
public:
|
||||
|
||||
NS_IMETHOD
|
||||
GetCode(const char* *result) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
GetCodeBase(const char* *result) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
GetArchive(const char* *result) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
GetName(const char* *result) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
GetMayScript(PRBool *result) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IJVMPLUGINTAGINFO_IID \
|
||||
{ /* 27b42df0-a1bd-11d1-85b1-00805f0e4dfe */ \
|
||||
0x27b42df0, \
|
||||
0xa1bd, \
|
||||
0x11d1, \
|
||||
{0x85, 0xb1, 0x00, 0x80, 0x5f, 0x0e, 0x4d, 0xfe} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIJVMPluginTagInfo_h___ */
|
||||
56
mozilla/modules/oji/public/nsISymantecDebugManager.h
Normal file
56
mozilla/modules/oji/public/nsISymantecDebugManager.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// NETSCAPE JAVA VM PLUGIN EXTENSIONS FOR SYMANTEC DEBUGGER
|
||||
//
|
||||
// This interface allows the browser to initialize a JVM that supports a
|
||||
// debugger. It's called the "Symantec Debugger Interface" because it currently
|
||||
// provides access to the Symantec Cafe or Visual Cafe debugger in the Netscape
|
||||
// JVM. It is not meant to be the be-all-to-end-all of debugger interfaces.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsISymantecDebugManager_h___
|
||||
#define nsISymantecDebugManager_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Symantec Debug Manager Interface
|
||||
//
|
||||
// Implemented by the browser that supports the Symantec debugger.
|
||||
|
||||
class nsISymantecDebugManager : public nsISupports {
|
||||
public:
|
||||
|
||||
NS_IMETHOD
|
||||
SetDebugAgentPassword(PRInt32 pwd) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_ISYMANTECDEBUGMANAGER_IID \
|
||||
{ /* 131362e0-d985-11d1-8155-006008119d7a */ \
|
||||
0x131362e0, \
|
||||
0xd985, \
|
||||
0x11d1, \
|
||||
{0x81, 0x55, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsISymantecDebugManager_h___ */
|
||||
62
mozilla/modules/oji/public/nsISymantecDebugger.h
Normal file
62
mozilla/modules/oji/public/nsISymantecDebugger.h
Normal file
@@ -0,0 +1,62 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// NETSCAPE JAVA VM PLUGIN EXTENSIONS FOR SYMANTEC DEBUGGER
|
||||
//
|
||||
// This interface allows the browser to initialize a JVM that supports a
|
||||
// debugger. It's called the "Symantec Debugger Interface" because it currently
|
||||
// provides access to the Symantec Cafe or Visual Cafe debugger in the Netscape
|
||||
// JVM. It is not meant to be the be-all-to-end-all of debugger interfaces.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsISymantecDebugger_h___
|
||||
#define nsISymantecDebugger_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Symantec Debugger Interface
|
||||
//
|
||||
// Implemented by the JVM plugin that supports the Symantec debugger.
|
||||
|
||||
enum nsSymantecDebugPort {
|
||||
nsSymantecDebugPort_None = 0,
|
||||
nsSymantecDebugPort_SharedMemory = -1
|
||||
// anything else is a port number
|
||||
};
|
||||
|
||||
class nsISymantecDebugger : public nsISupports {
|
||||
public:
|
||||
|
||||
NS_IMETHOD
|
||||
StartDebugger(nsSymantecDebugPort port) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_ISYMANTECDEBUGGER_IID \
|
||||
{ /* 954399f0-d980-11d1-8155-006008119d7a */ \
|
||||
0x954399f0, \
|
||||
0xd980, \
|
||||
0x11d1, \
|
||||
{0x81, 0x55, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsISymantecDebugger_h___ */
|
||||
46
mozilla/modules/oji/public/nsjvm.h
Normal file
46
mozilla/modules/oji/public/nsjvm.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// NETSCAPE JAVA VM PLUGIN EXTENSIONS
|
||||
//
|
||||
// This interface allows a Java virtual machine to be plugged into
|
||||
// Communicator to implement the APPLET tag and host applets.
|
||||
//
|
||||
// Note that this is the C++ interface that the plugin sees. The browser
|
||||
// uses a specific implementation of this, nsJVMPlugin, found in jvmmgr.h.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsjvm_h___
|
||||
#define nsjvm_h___
|
||||
|
||||
#include "nsplugin.h"
|
||||
#include "nsIJRIPlugin.h"
|
||||
#include "nsIJVMConsole.h"
|
||||
#include "nsIJVMManager.h"
|
||||
#include "nsIJVMPlugin.h"
|
||||
#include "nsIJVMPluginInstance.h"
|
||||
#include "nsIJVMPluginTagInfo.h"
|
||||
#include "nsISymantecDebugManager.h"
|
||||
#include "nsISymantecDebugger.h"
|
||||
#include "nsICapsManager.h"
|
||||
#include "nsILiveconnect.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsjvm_h___ */
|
||||
5
mozilla/modules/oji/src/MANIFEST
Normal file
5
mozilla/modules/oji/src/MANIFEST
Normal file
@@ -0,0 +1,5 @@
|
||||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist directory
|
||||
#
|
||||
|
||||
jvmmgr.h
|
||||
29
mozilla/modules/oji/src/Makefile
Normal file
29
mozilla/modules/oji/src/Makefile
Normal file
@@ -0,0 +1,29 @@
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Makefile to build OJI
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
DEPTH = ../../..
|
||||
|
||||
include $(DEPTH)/config/config.mk
|
||||
|
||||
MODULE = ojiimpl
|
||||
|
||||
ifdef MOZ_OJI
|
||||
LIBRARY_NAME = oji
|
||||
|
||||
CPPSRCS = jvmmgr.cpp \
|
||||
lcglue.cpp \
|
||||
scd.cpp
|
||||
|
||||
REQUIRES = img java js lay layer plugin plugimpl pref style util xpcom raptor oji caps
|
||||
LCFLAGS += -DJSJDLL=\"$(JSJDLL)\"
|
||||
INCLUDES += -I$(DIST)/include/private
|
||||
|
||||
endif # MOZ_OJI
|
||||
|
||||
EXPORTS = jvmmgr.h
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
||||
|
||||
35
mozilla/modules/oji/src/Makefile.in
Normal file
35
mozilla/modules/oji/src/Makefile.in
Normal file
@@ -0,0 +1,35 @@
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Makefile to build OJI
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
MODULE = ojiimpl
|
||||
|
||||
ifdef MOZ_OJI
|
||||
LIBRARY_NAME = oji
|
||||
|
||||
CPPSRCS = jvmmgr.cpp \
|
||||
lcglue.cpp \
|
||||
scd.cpp
|
||||
|
||||
REQUIRES = img java js lay layer plugin plugimpl pref style util xpcom raptor oji caps
|
||||
LCFLAGS += -DJSJDLL=\"$(JSJDLL)\"
|
||||
INCLUDES += -I$(DIST)/include/private
|
||||
endif # MOZ_OJI
|
||||
|
||||
EXPORTS = jvmmgr.h
|
||||
|
||||
EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
7
mozilla/modules/oji/src/export.mac
Normal file
7
mozilla/modules/oji/src/export.mac
Normal file
@@ -0,0 +1,7 @@
|
||||
#
|
||||
# This is a list of files to be copied to the mozilla:dist directory
|
||||
#
|
||||
|
||||
nsjvm.h
|
||||
nsscd.h
|
||||
jvmmgr.h
|
||||
1023
mozilla/modules/oji/src/jvmmgr.cpp
Normal file
1023
mozilla/modules/oji/src/jvmmgr.cpp
Normal file
File diff suppressed because it is too large
Load Diff
241
mozilla/modules/oji/src/jvmmgr.h
Normal file
241
mozilla/modules/oji/src/jvmmgr.h
Normal file
@@ -0,0 +1,241 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef jvmmgr_h___
|
||||
#define jvmmgr_h___
|
||||
|
||||
#include "xp_core.h" /* include first because of Bool problem */
|
||||
#include "prtypes.h"
|
||||
#include "nsCom.h"
|
||||
#include "nsError.h" /* for nsresult */
|
||||
#include "jni.h"
|
||||
|
||||
struct nsJVMMgr;
|
||||
|
||||
typedef enum nsJVMStatus {
|
||||
nsJVMStatus_Enabled, /* but not Running */
|
||||
nsJVMStatus_Disabled, /* explicitly disabled */
|
||||
nsJVMStatus_Running, /* enabled and started */
|
||||
nsJVMStatus_Failed /* enabled but failed to start */
|
||||
} nsJVMStatus;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include "nsjvm.h"
|
||||
#include "nsAgg.h"
|
||||
#include "jsjava.h"
|
||||
#include "nsVector.h"
|
||||
|
||||
class nsIPluginTagInfo2;
|
||||
class nsSymantecDebugManager;
|
||||
|
||||
struct ThreadLocalStorageAtIndex0 {
|
||||
PRUint32 refcount;
|
||||
};
|
||||
typedef struct ThreadLocalStorageAtIndex0 ThreadLocalStorageAtIndex0;
|
||||
|
||||
/*******************************************************************************
|
||||
* JVMMgr is the interface to the JVM manager that the browser sees. All
|
||||
* files that want to include java services should include this header file.
|
||||
* nsIJVMManager is the more limited interface what the JVM plugin sees.
|
||||
******************************************************************************/
|
||||
|
||||
struct nsJVMMgr : public nsIJVMManager {
|
||||
public:
|
||||
|
||||
NS_DECL_AGGREGATED
|
||||
|
||||
/* from nsIJVMManager: */
|
||||
|
||||
/* JVMMgr specific methods: */
|
||||
|
||||
/* ====> From here on are things only called by the browser, not the plugin... */
|
||||
|
||||
static NS_METHOD
|
||||
Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr);
|
||||
|
||||
nsIJVMPlugin* GetJVMPlugin(void) { return fJVM; }
|
||||
|
||||
/* Unlike the nsIJVMPlugin::StartupJVM, this version handles putting
|
||||
* up any error dialog: */
|
||||
nsJVMStatus StartupJVM(void);
|
||||
nsJVMStatus ShutdownJVM(PRBool fullShutdown = PR_FALSE);
|
||||
nsJVMStatus GetJVMStatus(void);
|
||||
void SetJVMEnabled(PRBool enabled);
|
||||
|
||||
void ReportJVMError(nsresult err);
|
||||
const char* GetJavaErrorString(JNIEnv* env);
|
||||
|
||||
nsresult AddToClassPath(const char* dirPath);
|
||||
PRBool MaybeStartupLiveConnect(void);
|
||||
PRBool MaybeShutdownLiveConnect(void);
|
||||
PRBool IsLiveConnectEnabled(void);
|
||||
JSJavaVM* GetJSJavaVM() { return fJSJavaVM; }
|
||||
|
||||
|
||||
protected:
|
||||
nsJVMMgr(nsISupports* outer);
|
||||
virtual ~nsJVMMgr(void);
|
||||
|
||||
void EnsurePrefCallbackRegistered(void);
|
||||
const char* GetJavaErrorString(JRIEnv* env);
|
||||
|
||||
nsIJVMPlugin* fJVM;
|
||||
nsJVMStatus fStatus;
|
||||
PRBool fRegisteredJavaPrefChanged;
|
||||
nsISupports* fDebugManager;
|
||||
JSJavaVM * fJSJavaVM;
|
||||
nsVector* fClassPathAdditions;
|
||||
};
|
||||
|
||||
/*******************************************************************************
|
||||
* Symantec Debugger Stuff
|
||||
******************************************************************************/
|
||||
|
||||
class nsSymantecDebugManager : public nsISymantecDebugManager {
|
||||
public:
|
||||
|
||||
NS_DECL_AGGREGATED
|
||||
|
||||
NS_IMETHOD
|
||||
SetDebugAgentPassword(PRInt32 pwd);
|
||||
|
||||
static NS_METHOD
|
||||
Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr,
|
||||
nsJVMMgr* jvmMgr);
|
||||
|
||||
protected:
|
||||
nsSymantecDebugManager(nsISupports* outer, nsJVMMgr* jvmMgr);
|
||||
virtual ~nsSymantecDebugManager(void);
|
||||
|
||||
nsJVMMgr* fJVMMgr;
|
||||
|
||||
};
|
||||
|
||||
/*******************************************************************************
|
||||
* nsJVMPluginTagInfo: The browser makes one of these when it sees an APPLET or
|
||||
* appropriate OBJECT tag.
|
||||
******************************************************************************/
|
||||
|
||||
class nsJVMPluginTagInfo : public nsIJVMPluginTagInfo {
|
||||
public:
|
||||
|
||||
NS_DECL_AGGREGATED
|
||||
|
||||
/* from nsIJVMPluginTagInfo: */
|
||||
|
||||
/* ====> These are usually only called by the plugin, not the browser... */
|
||||
|
||||
NS_IMETHOD
|
||||
GetCode(const char* *result);
|
||||
|
||||
NS_IMETHOD
|
||||
GetCodeBase(const char* *result);
|
||||
|
||||
NS_IMETHOD
|
||||
GetArchive(const char* *result);
|
||||
|
||||
NS_IMETHOD
|
||||
GetName(const char* *result);
|
||||
|
||||
NS_IMETHOD
|
||||
GetMayScript(PRBool *result);
|
||||
|
||||
/* Methods specific to nsJVMPluginInstancePeer: */
|
||||
|
||||
/* ====> From here on are things only called by the browser, not the plugin... */
|
||||
|
||||
static NS_METHOD
|
||||
Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr,
|
||||
nsIPluginTagInfo2* info);
|
||||
|
||||
protected:
|
||||
|
||||
nsJVMPluginTagInfo(nsISupports* outer, nsIPluginTagInfo2* info);
|
||||
virtual ~nsJVMPluginTagInfo(void);
|
||||
|
||||
/* Instance Variables: */
|
||||
nsIPluginTagInfo2* fPluginTagInfo;
|
||||
char* fSimulatedCodebase;
|
||||
char* fSimulatedCode;
|
||||
};
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*******************************************************************************
|
||||
* Convenience Routines
|
||||
******************************************************************************/
|
||||
|
||||
PR_BEGIN_EXTERN_C
|
||||
|
||||
/* Returns the JVM manager. You must do a Release on the pointer returned when
|
||||
you're done with it. */
|
||||
PR_EXTERN(struct nsJVMMgr*)
|
||||
JVM_GetJVMMgr(void);
|
||||
|
||||
PR_EXTERN(nsJVMStatus)
|
||||
JVM_StartupJVM(void);
|
||||
|
||||
PR_EXTERN(nsJVMStatus)
|
||||
JVM_ShutdownJVM(void);
|
||||
|
||||
PR_EXTERN(nsJVMStatus)
|
||||
JVM_GetJVMStatus(void);
|
||||
|
||||
PR_EXTERN(PRBool)
|
||||
JVM_AddToClassPath(const char* dirPath);
|
||||
|
||||
PR_EXTERN(void)
|
||||
JVM_ShowConsole(void);
|
||||
|
||||
PR_EXTERN(void)
|
||||
JVM_HideConsole(void);
|
||||
|
||||
PR_EXTERN(PRBool)
|
||||
JVM_IsConsoleVisible(void);
|
||||
|
||||
PR_EXTERN(void)
|
||||
JVM_ToggleConsole(void);
|
||||
|
||||
PR_EXTERN(void)
|
||||
JVM_PrintToConsole(const char* msg);
|
||||
|
||||
PR_EXTERN(void)
|
||||
JVM_StartDebugger(void);
|
||||
|
||||
PR_EXTERN(JNIEnv*)
|
||||
JVM_GetJNIEnv(void);
|
||||
|
||||
PR_IMPLEMENT(void)
|
||||
JVM_ReleaseJNIEnv(JNIEnv *pJNIEnv);
|
||||
|
||||
PR_EXTERN(nsresult)
|
||||
JVM_SpendTime(PRUint32 timeMillis);
|
||||
|
||||
PR_EXTERN(PRBool)
|
||||
JVM_MaybeStartupLiveConnect(void);
|
||||
|
||||
PR_EXTERN(PRBool)
|
||||
JVM_MaybeShutdownLiveConnect(void);
|
||||
|
||||
PR_EXTERN(PRBool)
|
||||
JVM_IsLiveConnectEnabled(void);
|
||||
|
||||
PR_END_EXTERN_C
|
||||
|
||||
#endif /* jvmmgr_h___ */
|
||||
468
mozilla/modules/oji/src/lcglue.cpp
Normal file
468
mozilla/modules/oji/src/lcglue.cpp
Normal file
@@ -0,0 +1,468 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "prthread.h"
|
||||
#include "pprthred.h"
|
||||
#include "jsjava.h"
|
||||
#ifdef MOCHA
|
||||
#include "libmocha.h"
|
||||
#include "libevent.h"
|
||||
#endif
|
||||
#include "jvmmgr.h"
|
||||
#include "npglue.h"
|
||||
|
||||
static NS_DEFINE_IID(kIJVMPluginInstanceIID, NS_IJVMPLUGININSTANCE_IID);
|
||||
static NS_DEFINE_IID(kIJVMPluginTagInfoIID, NS_IJVMPLUGINTAGINFO_IID);
|
||||
|
||||
static PRUintn tlsIndex_g = 0;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// LiveConnect callbacks
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template <class T>
|
||||
class ThreadLocalStorage {
|
||||
public:
|
||||
ThreadLocalStorage(PRThreadPrivateDTOR dtor) : mIndex(0), mValid(PR_FALSE)
|
||||
{
|
||||
mValid = (PR_NewThreadPrivateIndex(&mIndex, dtor) == PR_SUCCESS);
|
||||
}
|
||||
|
||||
void set(T value)
|
||||
{
|
||||
if (mValid) PR_SetThreadPrivate(mIndex, value);
|
||||
}
|
||||
|
||||
T get()
|
||||
{
|
||||
return (T) (mValid ? PR_GetThreadPrivate(mIndex) : 0);
|
||||
}
|
||||
|
||||
private:
|
||||
PRUintn mIndex;
|
||||
PRBool mValid;
|
||||
};
|
||||
|
||||
PR_BEGIN_EXTERN_C
|
||||
|
||||
#include "jscntxt.h"
|
||||
|
||||
#ifdef MOCHA
|
||||
|
||||
static JSContext* PR_CALLBACK
|
||||
map_jsj_thread_to_js_context_impl(JSJavaThreadState *jsj_env, JNIEnv *env, char **errp)
|
||||
{
|
||||
JSContext *cx = LM_GetCrippledContext();
|
||||
PRBool jvmMochaPrefsEnabled = PR_FALSE;
|
||||
|
||||
*errp = NULL;
|
||||
#if 0
|
||||
nsJVMMgr* pJVMMgr = JVM_GetJVMMgr();
|
||||
if (pJVMMgr != NULL) {
|
||||
nsIJVMPlugin* pJVMPI = pJVMMgr->GetJVMPlugin();
|
||||
jvmMochaPrefsEnabled = LM_GetMochaEnabled();
|
||||
if (pJVMPI != NULL) {
|
||||
nsIPluginInstance* pPIT;
|
||||
nsresult err = pJVMPI->GetPluginInstance(env, &pPIT);
|
||||
if ( (err == NS_OK) && (pPIT != NULL) ) {
|
||||
nsIJVMPluginInstance* pJVMPIT;
|
||||
if (pPIT->QueryInterface(kIJVMPluginInstanceIID,
|
||||
(void**)&pJVMPIT) == NS_OK) {
|
||||
nsPluginInstancePeer* pPITP;
|
||||
err = pJVMPIT->GetPeer((nsIPluginInstancePeer**)&pPITP);
|
||||
if ( (err == NS_OK) &&(pPITP != NULL) ) {
|
||||
cx = pPITP->GetJSContext();
|
||||
pPITP->Release();
|
||||
}
|
||||
pJVMPIT->Release();
|
||||
}
|
||||
pPIT->Release();
|
||||
}
|
||||
// pJVMPI->Release(); // GetJVMPlugin no longer calls AddRef
|
||||
}
|
||||
pJVMMgr->Release();
|
||||
}
|
||||
if (jvmMochaPrefsEnabled == PR_FALSE)
|
||||
{
|
||||
*errp = strdup("Java preference is disabled");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ( cx == NULL )
|
||||
{
|
||||
*errp = strdup("Java thread could not be associated with a JSContext");
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
return cx;
|
||||
}
|
||||
|
||||
static void PR_CALLBACK detach_jsjava_thread_state(void* env)
|
||||
{
|
||||
JSJavaThreadState *jsj_env = (JSJavaThreadState*)env;
|
||||
JSJ_DetachCurrentThreadFromJava(jsj_env);
|
||||
}
|
||||
|
||||
/*
|
||||
** This callback is called to map a JSContext to a JSJavaThreadState which
|
||||
** is a wrapper around JNIEnv. Hence this callback essentially maps a JSContext
|
||||
** to a java thread. JSJ_AttachCurrentThreadToJava just calls AttachCurrentThread
|
||||
** on the java vm.
|
||||
*/
|
||||
static JSJavaThreadState* PR_CALLBACK
|
||||
map_js_context_to_jsj_thread_impl(JSContext *cx, char **errp)
|
||||
{
|
||||
*errp = NULL;
|
||||
|
||||
static ThreadLocalStorage<JSJavaThreadState*> localThreadState(&detach_jsjava_thread_state);
|
||||
JSJavaThreadState* jsj_env = localThreadState.get();
|
||||
if (jsj_env != NULL)
|
||||
return jsj_env;
|
||||
|
||||
if (ET_InitMoja(0) != LM_MOJA_OK) {
|
||||
*errp = strdup("LiveConnect initialization failed.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
JSJavaVM* js_jvm = NULL;
|
||||
nsJVMMgr* pJVMMgr = JVM_GetJVMMgr();
|
||||
if (pJVMMgr != NULL) {
|
||||
js_jvm = pJVMMgr->GetJSJavaVM();
|
||||
pJVMMgr->Release();
|
||||
if (js_jvm == NULL) {
|
||||
*errp = strdup("Failed to attach to a Java VM.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
jsj_env = JSJ_AttachCurrentThreadToJava(js_jvm, NULL, NULL);
|
||||
localThreadState.set(jsj_env);
|
||||
|
||||
return jsj_env;
|
||||
}
|
||||
|
||||
/*
|
||||
** This callback is called to map a applet,bean to its corresponding JSObject
|
||||
** created on javascript side and then map that to a java wrapper JSObject class.
|
||||
** This callback is called in JSObject.getWindow implementation to get
|
||||
** a java wrapper JSObject class for a applet only once.
|
||||
** Note that once a mapping between applet -> javascript JSObject -> Java wrapper JSObject
|
||||
** is made, all subsequent method calls via JSObject use the internal field
|
||||
** to get to the javascript JSObject.
|
||||
*/
|
||||
static JSObject* PR_CALLBACK
|
||||
map_java_object_to_js_object_impl(JNIEnv *env, void *pNSIPluginInstanceIn, char **errp)
|
||||
{
|
||||
MWContext *cx;
|
||||
JSObject *window;
|
||||
MochaDecoder *decoder;
|
||||
PRBool mayscript = PR_FALSE;
|
||||
PRBool jvmMochaPrefsEnabled = PR_FALSE;
|
||||
nsresult err = NS_OK;
|
||||
|
||||
*errp = NULL;
|
||||
/* XXX assert JS is locked */
|
||||
|
||||
if (!pNSIPluginInstanceIn) {
|
||||
env->ThrowNew(env->FindClass("java/lang/NullPointerException"),0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
nsJVMMgr* pJVMMgr = JVM_GetJVMMgr();
|
||||
if (pJVMMgr != NULL) {
|
||||
nsIJVMPlugin* pJVMPI = pJVMMgr->GetJVMPlugin();
|
||||
jvmMochaPrefsEnabled = LM_GetMochaEnabled();
|
||||
if (pJVMPI != NULL) {
|
||||
//jobject javaObject = applet;
|
||||
nsIPluginInstance* pPIT;
|
||||
//nsresult err = pJVMPI->GetPluginInstance(javaObject, &pPIT);
|
||||
pPIT = (nsIPluginInstance*)pNSIPluginInstanceIn;
|
||||
if ( (err == NS_OK) && (pPIT != NULL) ) {
|
||||
nsIJVMPluginInstance* pJVMPIT;
|
||||
if (pPIT->QueryInterface(kIJVMPluginInstanceIID,
|
||||
(void**)&pJVMPIT) == NS_OK) {
|
||||
nsPluginInstancePeer* pPITP;
|
||||
err = pJVMPIT->GetPeer((nsIPluginInstancePeer**)&pPITP);
|
||||
if ( (err == NS_OK) &&(pPITP != NULL) ) {
|
||||
nsIJVMPluginTagInfo* pJVMTagInfo;
|
||||
if (pPITP->QueryInterface(kIJVMPluginTagInfoIID,
|
||||
(void**)&pJVMTagInfo) == NS_OK) {
|
||||
err = pJVMTagInfo->GetMayScript(&mayscript);
|
||||
PR_ASSERT(err != NS_OK ? mayscript == PR_FALSE : PR_TRUE);
|
||||
pJVMTagInfo->Release();
|
||||
}
|
||||
cx = pPITP->GetMWContext();
|
||||
pPITP->Release();
|
||||
}
|
||||
pJVMPIT->Release();
|
||||
}
|
||||
pPIT->Release();
|
||||
}
|
||||
// pJVMPI->Release(); // GetJVMPlugin no longer calls AddRef
|
||||
}
|
||||
pJVMMgr->Release();
|
||||
}
|
||||
|
||||
if ( (mayscript == PR_FALSE)
|
||||
||(jvmMochaPrefsEnabled == PR_FALSE)
|
||||
)
|
||||
{
|
||||
*errp = strdup("JSObject.getWindow() requires mayscript attribute on this Applet or java preference is disabled");
|
||||
goto except;
|
||||
}
|
||||
|
||||
|
||||
if (!cx || (cx->type != MWContextBrowser && cx->type != MWContextPane))
|
||||
{
|
||||
*errp = strdup("JSObject.getWindow() can only be called in MWContextBrowser or MWContextPane");
|
||||
return 0;
|
||||
}
|
||||
|
||||
decoder = LM_GetMochaDecoder(cx);
|
||||
|
||||
/* if there is a decoder now, reflect the window */
|
||||
if (decoder && (jvmMochaPrefsEnabled == PR_TRUE)) {
|
||||
window = decoder->window_object;
|
||||
}
|
||||
|
||||
LM_PutMochaDecoder(decoder);
|
||||
|
||||
return window;
|
||||
except:
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static JavaVM* PR_CALLBACK
|
||||
get_java_vm_impl(char **errp)
|
||||
{
|
||||
*errp = NULL;
|
||||
JavaVM *pJavaVM = NULL;
|
||||
|
||||
nsJVMMgr* pJVMMgr = JVM_GetJVMMgr();
|
||||
if (pJVMMgr != NULL) {
|
||||
nsIJVMPlugin* pJVMPI = pJVMMgr->GetJVMPlugin();
|
||||
if (pJVMPI != NULL) {
|
||||
nsresult err = pJVMPI->GetJavaVM(&pJavaVM);
|
||||
PR_ASSERT(err != NS_OK ? pJavaVM == NULL : PR_TRUE);
|
||||
// pJVMPI->Release(); // GetJVMPlugin no longer calls AddRef
|
||||
}
|
||||
pJVMMgr->Release();
|
||||
}
|
||||
if ( pJavaVM == NULL )
|
||||
{
|
||||
*errp = strdup("Could not find a JavaVM to attach to.");
|
||||
}
|
||||
return pJavaVM;
|
||||
}
|
||||
#endif
|
||||
|
||||
static JSPrincipals* PR_CALLBACK
|
||||
get_JSPrincipals_from_java_caller_impl(JNIEnv *pJNIEnv, JSContext *pJSContext)
|
||||
{
|
||||
nsIPrincipal **ppNSIPrincipalArray = NULL;
|
||||
PRInt32 length = 0;
|
||||
nsresult err = NS_OK;
|
||||
void *pNSPrincipalArray = NULL;
|
||||
#if 0 // TODO: =-= sudu: fix it.
|
||||
nsJVMMgr* pJVMMgr = JVM_GetJVMMgr();
|
||||
if (pJVMMgr != NULL) {
|
||||
nsIJVMPlugin* pJVMPI = pJVMMgr->GetJVMPlugin();
|
||||
if (pJVMPI != NULL) {
|
||||
err = pJVMPI->GetPrincipalArray(pJNIEnv, 0, &ppNSIPrincipalArray, &length);
|
||||
if ((err == NS_OK) && (ppNSIPrincipalArray != NULL)) {
|
||||
nsIPluginManager *pNSIPluginManager = NULL;
|
||||
NS_DEFINE_IID(kIPluginManagerIID, NS_IPLUGINMANAGER_IID);
|
||||
err = pJVMMgr->QueryInterface(kIPluginManagerIID,
|
||||
(void**)&pNSIPluginManager);
|
||||
|
||||
if( (err == NS_OK)
|
||||
&& (pNSIPluginManager != NULL )
|
||||
)
|
||||
{
|
||||
nsCCapsManager *pNSCCapsManager = NULL;
|
||||
NS_DEFINE_IID(kICapsManagerIID, NS_ICAPSMANAGER_IID);
|
||||
err = pNSIPluginManager->QueryInterface(kICapsManagerIID, (void**)&pNSCCapsManager);
|
||||
if( (err == NS_OK)
|
||||
&& (pNSCCapsManager != NULL)
|
||||
)
|
||||
{
|
||||
PRInt32 i=0;
|
||||
nsPrincipal *pNSPrincipal = NULL;
|
||||
pNSPrincipalArray = nsCapsNewPrincipalArray(length);
|
||||
if (pNSPrincipalArray != NULL)
|
||||
{
|
||||
while( i<length )
|
||||
{
|
||||
err = pNSCCapsManager->GetNSPrincipal(ppNSIPrincipalArray[i], &pNSPrincipal);
|
||||
nsCapsSetPrincipalArrayElement(pNSPrincipalArray, i, pNSPrincipal);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
pNSCCapsManager->Release();
|
||||
}
|
||||
pNSIPluginManager->Release();
|
||||
}
|
||||
}
|
||||
//pJVMPI->Release();
|
||||
}
|
||||
pJVMMgr->Release();
|
||||
}
|
||||
#endif
|
||||
if ( (pNSPrincipalArray != NULL)
|
||||
&&(length != 0)
|
||||
)
|
||||
{
|
||||
return LM_GetJSPrincipalsFromJavaCaller(pJSContext, pNSPrincipalArray);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static jobject PR_CALLBACK
|
||||
get_java_wrapper_impl(JNIEnv *pJNIEnv, jint jsobject)
|
||||
{
|
||||
nsresult err = NS_OK;
|
||||
jobject pJSObjectWrapper = NULL;
|
||||
nsJVMMgr* pJVMMgr = JVM_GetJVMMgr();
|
||||
if (pJVMMgr != NULL) {
|
||||
nsIJVMPlugin* pJVMPI = pJVMMgr->GetJVMPlugin();
|
||||
if (pJVMPI != NULL) {
|
||||
err = pJVMPI->GetJavaWrapper(pJNIEnv, jsobject, &pJSObjectWrapper);
|
||||
//pJVMPI->Release();
|
||||
}
|
||||
pJVMMgr->Release();
|
||||
}
|
||||
if ( err != NS_OK )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
return pJSObjectWrapper;
|
||||
}
|
||||
|
||||
static JSBool PR_CALLBACK
|
||||
enter_js_from_java_impl(JNIEnv *jEnv, char **errp)
|
||||
{
|
||||
#ifdef OJI
|
||||
ThreadLocalStorageAtIndex0 *priv = NULL;
|
||||
if ( PR_GetCurrentThread() == NULL )
|
||||
{
|
||||
PR_AttachThread(PR_USER_THREAD, PR_PRIORITY_NORMAL, NULL);
|
||||
priv = (ThreadLocalStorageAtIndex0 *)malloc(sizeof(ThreadLocalStorageAtIndex0));
|
||||
priv->refcount=1;
|
||||
PR_SetThreadPrivate(tlsIndex_g, (void *)priv);
|
||||
}
|
||||
else
|
||||
{
|
||||
priv = (ThreadLocalStorageAtIndex0 *)PR_GetThreadPrivate(tlsIndex_g);
|
||||
if(priv != NULL)
|
||||
{
|
||||
priv->refcount++;
|
||||
}
|
||||
}
|
||||
|
||||
return LM_LockJS(errp);
|
||||
#else
|
||||
return JS_TRUE;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void PR_CALLBACK
|
||||
exit_js_impl(JNIEnv *jEnv)
|
||||
{
|
||||
ThreadLocalStorageAtIndex0 *priv = NULL;
|
||||
|
||||
LM_UnlockJS();
|
||||
|
||||
if ( (PR_GetCurrentThread() != NULL )
|
||||
&& ((priv = (ThreadLocalStorageAtIndex0 *)PR_GetThreadPrivate(tlsIndex_g)) != NULL)
|
||||
)
|
||||
{
|
||||
priv->refcount--;
|
||||
if(priv->refcount == 0)
|
||||
{
|
||||
PR_SetThreadPrivate(tlsIndex_g, NULL);
|
||||
PR_DetachThread();
|
||||
free(priv);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
static PRBool PR_CALLBACK
|
||||
create_java_vm_impl(SystemJavaVM* *jvm, JNIEnv* *initialEnv, void* initargs)
|
||||
{
|
||||
const char* classpath = (const char*)initargs; // unused (should it be?)
|
||||
*jvm = (SystemJavaVM*)JVM_GetJVMMgr(); // unused in the browser
|
||||
*initialEnv = JVM_GetJNIEnv();
|
||||
return (*jvm != NULL && *initialEnv != NULL);
|
||||
}
|
||||
|
||||
static PRBool PR_CALLBACK
|
||||
destroy_java_vm_impl(SystemJavaVM* jvm, JNIEnv* initialEnv)
|
||||
{
|
||||
JVM_ReleaseJNIEnv(initialEnv);
|
||||
// need to release jvm
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
static JNIEnv* PR_CALLBACK
|
||||
attach_current_thread_impl(SystemJavaVM* jvm)
|
||||
{
|
||||
return JVM_GetJNIEnv();
|
||||
}
|
||||
|
||||
static PRBool PR_CALLBACK
|
||||
detach_current_thread_impl(SystemJavaVM* jvm, JNIEnv* env)
|
||||
{
|
||||
JVM_ReleaseJNIEnv(env);
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
static SystemJavaVM* PR_CALLBACK
|
||||
get_java_vm_impl(JNIEnv* env)
|
||||
{
|
||||
// only one SystemJavaVM for the whole browser, so it doesn't depend on env
|
||||
return (SystemJavaVM*)JVM_GetJVMMgr();
|
||||
}
|
||||
|
||||
#endif /* MOCHA */
|
||||
|
||||
PR_END_EXTERN_C
|
||||
|
||||
|
||||
/*
|
||||
* Callbacks for client-specific jsjava glue
|
||||
*/
|
||||
JSJCallbacks jsj_callbacks = {
|
||||
map_jsj_thread_to_js_context_impl,
|
||||
map_js_context_to_jsj_thread_impl,
|
||||
map_java_object_to_js_object_impl,
|
||||
get_JSPrincipals_from_java_caller_impl,
|
||||
enter_js_from_java_impl,
|
||||
exit_js_impl,
|
||||
NULL, // error_print
|
||||
get_java_wrapper_impl,
|
||||
create_java_vm_impl,
|
||||
destroy_java_vm_impl,
|
||||
attach_current_thread_impl,
|
||||
detach_current_thread_impl,
|
||||
get_java_vm_impl
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
119
mozilla/modules/oji/src/makefile.win
Normal file
119
mozilla/modules/oji/src/makefile.win
Normal file
@@ -0,0 +1,119 @@
|
||||
IGNORE_MANIFEST=1
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Makefile to build
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the depth of the current directory relative to the
|
||||
#// root of NS
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DEPTH= ..\..\..
|
||||
|
||||
include <$(DEPTH)/config/config.mak>
|
||||
|
||||
!ifdef MOZ_OJI
|
||||
|
||||
!ifndef MAKE_OBJ_TYPE
|
||||
MAKE_OBJ_TYPE=EXE
|
||||
!endif
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any Public Make Variables here: (ie. PDFFILE, MAPFILE, ...)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
LIBNAME=oji$(MOZ_BITS)
|
||||
PDBFILE=$(LIBNAME).pdb
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define the files necessary to build the target (ie. OBJS)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
OBJS = .\$(OBJDIR)\jvmmgr.obj \
|
||||
.\$(OBJDIR)\lcglue.obj \
|
||||
.\$(OBJDIR)\scd.obj
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any Public Targets here (ie. PROGRAM, LIBRARY, DLL, ...)
|
||||
#// (these must be defined before the common makefiles are included)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
LIBRARY= .\$(OBJDIR)\$(LIBNAME).lib
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any local options for the make tools
|
||||
#// (ie. LCFLAGS, LLFLAGS, LLIBS, LINCS)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
LINCS= $(LINCS) -I_jri \
|
||||
#
|
||||
# For Win16 the following include directories are copied into
|
||||
# ns/dist/public/win16
|
||||
#
|
||||
!if "$(MOZ_BITS)" == "32"
|
||||
-I$(PUBLIC)/caps \
|
||||
-I$(PUBLIC)/js \
|
||||
-I$(PUBLIC)/java \
|
||||
-I$(PUBLIC)/libimg \
|
||||
-I$(PUBLIC)/nspr \
|
||||
-I$(PUBLIC)/dbm \
|
||||
-I$(PUBLIC)/security \
|
||||
-I$(PUBLIC)/pref \
|
||||
-I$(PUBLIC)/xpcom \
|
||||
-I$(PUBLIC)/raptor \
|
||||
-I$(PUBLIC)/plugin \
|
||||
-I$(PUBLIC)/oji \
|
||||
-I$(PUBLIC)/plugimpl \
|
||||
!endif
|
||||
-I$(DIST)/include/private \
|
||||
-I$(DEPTH)/lib/layout \
|
||||
-I$(DEPTH)/lib/libstyle \
|
||||
-I$(DEPTH)/lib/libjar \
|
||||
$(NULL)
|
||||
|
||||
CSRCS = jvmmgr.cpp \
|
||||
scd.cpp
|
||||
|
||||
!endif # MOZ_OJI
|
||||
|
||||
MODULE = ojiimpl
|
||||
|
||||
EXPORTS = jvmmgr.h
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Include the common makefile rules
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
include <$(DEPTH)/config/rules.mak>
|
||||
|
||||
LCFLAGS=$(LCFLAGS) ^
|
||||
$(JAVA_DEFINES)
|
||||
|
||||
!if "$(MOZ_BITS)" == "32"
|
||||
PUBLIC_HEADER_DIR=$(PUBLIC)\ojiimpl
|
||||
!else
|
||||
PUBLIC_HEADER_DIR=$(PUBLIC)\win16
|
||||
!endif
|
||||
|
||||
export::
|
||||
$(MAKE_INSTALL) jvmmgr.h $(PUBLIC_HEADER_DIR)
|
||||
|
||||
!ifdef MOZ_OJI
|
||||
install:: $(LIBRARY)
|
||||
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
|
||||
|
||||
clobber::
|
||||
$(RM_R) _jri
|
||||
!endif # MOZ_OJI
|
||||
82
mozilla/modules/oji/src/nsscd.h
Normal file
82
mozilla/modules/oji/src/nsscd.h
Normal file
@@ -0,0 +1,82 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// NETSCAPE JAVA VM PLUGIN EXTENSIONS FOR SYMANTEC DEBUGGER
|
||||
//
|
||||
// This interface allows the browser to initialize a JVM that supports a
|
||||
// debugger. It's called the "Symantec Debugger Interface" because it currently
|
||||
// provides access to the Symantec Cafe or Visual Cafe debugger in the Netscape
|
||||
// JVM. It is not meant to be the be-all-to-end-all of debugger interfaces.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsscd_h___
|
||||
#define nsscd_h___
|
||||
|
||||
#include "nsjvm.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Symantec Debug Manager Interface
|
||||
//
|
||||
// Implemented by the browser that supports the Symantec debugger.
|
||||
|
||||
class NPISymantecDebugManager : public nsISupports {
|
||||
public:
|
||||
|
||||
NS_IMETHOD_(PRBool)
|
||||
SetDebugAgentPassword(PRInt32 pwd) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NP_ISYMANTECDEBUGMANAGER_IID \
|
||||
{ /* 131362e0-d985-11d1-8155-006008119d7a */ \
|
||||
0x131362e0, \
|
||||
0xd985, \
|
||||
0x11d1, \
|
||||
{0x81, 0x55, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Symantec Debugger Interface
|
||||
//
|
||||
// Implemented by the JVM plugin that supports the Symantec debugger.
|
||||
|
||||
enum NPSymantecDebugPort {
|
||||
NPSymantecDebugPort_None = 0,
|
||||
NPSymantecDebugPort_SharedMemory = -1
|
||||
// anything else is a port number
|
||||
};
|
||||
|
||||
class NPISymantecDebugger : public nsISupports {
|
||||
public:
|
||||
|
||||
NS_IMETHOD_(JVMError)
|
||||
StartDebugger(NPSymantecDebugPort port) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NP_ISYMANTECDEBUGGER_IID \
|
||||
{ /* 954399f0-d980-11d1-8155-006008119d7a */ \
|
||||
0x954399f0, \
|
||||
0xd980, \
|
||||
0x11d1, \
|
||||
{0x81, 0x55, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#endif /* nsscd_h___ */
|
||||
95
mozilla/modules/oji/src/scd.cpp
Normal file
95
mozilla/modules/oji/src/scd.cpp
Normal file
@@ -0,0 +1,95 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Plugin Manager Methods to support the JVM Plugin API
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "jvmmgr.h"
|
||||
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kISymantecDebugManagerIID, NS_ISYMANTECDEBUGMANAGER_IID);
|
||||
|
||||
NS_IMPL_AGGREGATED(nsSymantecDebugManager);
|
||||
|
||||
nsSymantecDebugManager::nsSymantecDebugManager(nsISupports* outer, nsJVMMgr* jvmMgr)
|
||||
: fJVMMgr(jvmMgr)
|
||||
{
|
||||
NS_INIT_AGGREGATED(outer);
|
||||
}
|
||||
|
||||
nsSymantecDebugManager::~nsSymantecDebugManager()
|
||||
{
|
||||
}
|
||||
|
||||
NS_METHOD
|
||||
nsSymantecDebugManager::AggregatedQueryInterface(const nsIID& aIID, void** aInstancePtr)
|
||||
{
|
||||
if (aIID.Equals(kISymantecDebugManagerIID)) {
|
||||
*aInstancePtr = this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
NS_METHOD
|
||||
nsSymantecDebugManager::Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr,
|
||||
nsJVMMgr* jvmMgr)
|
||||
{
|
||||
if (outer && !aIID.Equals(kISupportsIID))
|
||||
return NS_NOINTERFACE; // XXX right error?
|
||||
nsSymantecDebugManager* dbgr = new nsSymantecDebugManager(outer, jvmMgr);
|
||||
if (dbgr == NULL)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
dbgr->AddRef();
|
||||
*aInstancePtr = dbgr->GetInner();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#if defined(XP_PC) && defined(_WIN32)
|
||||
extern "C" HWND FindNavigatorHiddenWindow(void);
|
||||
#endif
|
||||
|
||||
NS_METHOD
|
||||
nsSymantecDebugManager::SetDebugAgentPassword(PRInt32 pwd)
|
||||
{
|
||||
#if defined(XP_PC) && defined(_WIN32)
|
||||
HWND win = FindNavigatorHiddenWindow();
|
||||
HANDLE sem;
|
||||
long err;
|
||||
|
||||
/* set up by aHiddenFrameClass in CNetscapeApp::InitInstance */
|
||||
err = SetWindowLong(win, 0, pwd);
|
||||
if (err == 0) {
|
||||
// PR_LOG(NSJAVA, PR_LOG_ALWAYS,
|
||||
// ("SetWindowLong returned %ld (err=%d)\n", err, GetLastError()));
|
||||
/* continue so that we try to wake up the DebugManager */
|
||||
}
|
||||
sem = OpenSemaphore(SEMAPHORE_MODIFY_STATE, FALSE, "Netscape-Symantec Debugger");
|
||||
if (sem) {
|
||||
ReleaseSemaphore(sem, 1, NULL);
|
||||
CloseHandle(sem);
|
||||
}
|
||||
return NS_OK;
|
||||
#else
|
||||
return NS_ERROR_FAILURE;
|
||||
#endif
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
35
mozilla/modules/plugin/Makefile
Normal file
35
mozilla/modules/plugin/Makefile
Normal file
@@ -0,0 +1,35 @@
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Makefile to build the MODULES/OJI tree
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the depth of the current directory relative to the
|
||||
#// root of NS
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DEPTH=../..
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify any "command" targets. (ie. DIRS, INSTALL_FILES, ...)
|
||||
#// (these must come before the common makefiles are included)
|
||||
#//
|
||||
#// DIRS - There are subdirectories to process
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
ifndef NGLAYOUT_PLUGINS
|
||||
DIRS= public src
|
||||
else
|
||||
DIRS= public nglsrc
|
||||
endif
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Include the common makefile rules
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
include $(DEPTH)/config/rules.mk
|
||||
|
||||
40
mozilla/modules/plugin/Makefile.in
Normal file
40
mozilla/modules/plugin/Makefile.in
Normal file
@@ -0,0 +1,40 @@
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Makefile to build the MODULES/OJI tree
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the depth of the current directory relative to the
|
||||
#// root of NS
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DEPTH=../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify any "command" targets. (ie. DIRS, INSTALL_FILES, ...)
|
||||
#// (these must come before the common makefiles are included)
|
||||
#//
|
||||
#// DIRS - There are subdirectories to process
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
ifndef NGLAYOUT_PLUGINS
|
||||
DIRS= public src
|
||||
else
|
||||
DIRS= public nglsrc
|
||||
endif
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Include the common makefile rules
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
1948
mozilla/modules/plugin/bad/badapter.cpp
Normal file
1948
mozilla/modules/plugin/bad/badapter.cpp
Normal file
File diff suppressed because it is too large
Load Diff
42
mozilla/modules/plugin/base/public/MANIFEST
Normal file
42
mozilla/modules/plugin/base/public/MANIFEST
Normal file
@@ -0,0 +1,42 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist directory
|
||||
#
|
||||
|
||||
nsIEventHandler.h
|
||||
nsIFileUtilities.h
|
||||
nsIJRILiveConnectPlugin.h
|
||||
nsIJRILiveConnectPlugInstPeer.h
|
||||
nsILiveConnectPlugin.h
|
||||
nsILiveConnectPlugInstPeer.h
|
||||
nsIMalloc.h
|
||||
nsIPlugin.h
|
||||
nsIPluginInstance.h
|
||||
nsIPluginInstancePeer.h
|
||||
nsIPluginManager.h
|
||||
nsIPluginManager2.h
|
||||
nsIPluginStream.h
|
||||
nsIPluginStreamPeer.h
|
||||
nsIPluginStreamPeer2.h
|
||||
nsIPluginTagInfo.h
|
||||
nsIPluginTagInfo2.h
|
||||
nsISeekablePluginStreamPeer.h
|
||||
nsIWindowlessPlugInstPeer.h
|
||||
nsplugin.h
|
||||
nsplugindefs.h
|
||||
52
mozilla/modules/plugin/base/public/Makefile
Normal file
52
mozilla/modules/plugin/base/public/Makefile
Normal file
@@ -0,0 +1,52 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DEPTH = ../../..
|
||||
|
||||
MODULE = plugin
|
||||
|
||||
EXPORTS = \
|
||||
nsIEventHandler.h \
|
||||
nsIFileUtilities.h \
|
||||
nsIJRILiveConnectPlugin.h \
|
||||
nsIJRILiveConnectPlugInstPeer.h \
|
||||
nsILiveConnectPlugin.h \
|
||||
nsILiveConnectPlugInstPeer.h \
|
||||
nsIMalloc.h \
|
||||
nsIPlugin.h \
|
||||
nsIPluginInstance.h \
|
||||
nsIPluginInstancePeer.h \
|
||||
nsIPluginManager.h \
|
||||
nsIPluginManager2.h \
|
||||
nsIPluginStream.h \
|
||||
nsIPluginTagInfo.h \
|
||||
nsIPluginTagInfo2.h \
|
||||
nsIWindowlessPlugInstPeer.h \
|
||||
nsIPluginInputStream.h \
|
||||
nsIPluginInputStream2.h \
|
||||
nsIPluginStreamListener.h \
|
||||
nsplugin.h \
|
||||
nsplugindefs.h
|
||||
|
||||
# DEPRECATED -- remove before we ship 5.0
|
||||
EXPORTS += \
|
||||
nsIPluginStream.h \
|
||||
nsIPluginStreamPeer.h \
|
||||
nsIPluginStreamPeer2.h \
|
||||
nsISeekablePluginStreamPeer.h \
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
||||
59
mozilla/modules/plugin/base/public/Makefile.in
Normal file
59
mozilla/modules/plugin/base/public/Makefile.in
Normal file
@@ -0,0 +1,59 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DEPTH = ../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = plugin
|
||||
|
||||
EXPORTS = \
|
||||
nsIEventHandler.h \
|
||||
nsIFileUtilities.h \
|
||||
nsIJRILiveConnectPlugin.h \
|
||||
nsIJRILiveConnectPlugInstPeer.h \
|
||||
nsILiveConnectPlugin.h \
|
||||
nsILiveConnectPlugInstPeer.h \
|
||||
nsIMalloc.h \
|
||||
nsIPlugin.h \
|
||||
nsIPluginInstance.h \
|
||||
nsIPluginInstancePeer.h \
|
||||
nsIPluginManager.h \
|
||||
nsIPluginManager2.h \
|
||||
nsIPluginStream.h \
|
||||
nsIPluginTagInfo.h \
|
||||
nsIPluginTagInfo2.h \
|
||||
nsIWindowlessPlugInstPeer.h \
|
||||
nsIPluginInputStream.h \
|
||||
nsIPluginInputStream2.h \
|
||||
nsIPluginStreamListener.h \
|
||||
nsplugin.h \
|
||||
nsplugindefs.h
|
||||
|
||||
# DEPRECATED -- remove before we ship 5.0
|
||||
EXPORTS += \
|
||||
nsIPluginStream.h \
|
||||
nsIPluginStreamPeer.h \
|
||||
nsIPluginStreamPeer2.h \
|
||||
nsISeekablePluginStreamPeer.h \
|
||||
|
||||
EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
54
mozilla/modules/plugin/base/public/makefile.win
Normal file
54
mozilla/modules/plugin/base/public/makefile.win
Normal file
@@ -0,0 +1,54 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
IGNORE_MANIFEST=1
|
||||
|
||||
DEPTH = ..\..\..
|
||||
|
||||
MODULE = plugin
|
||||
|
||||
EXPORTS = \
|
||||
nsIEventHandler.h \
|
||||
nsIFileUtilities.h \
|
||||
nsIJRILiveConnectPlugin.h \
|
||||
nsIJRILiveConnectPlugInstPeer.h \
|
||||
nsILiveConnectPlugin.h \
|
||||
nsILiveConnectPlugInstPeer.h \
|
||||
nsIMalloc.h \
|
||||
nsIPlugin.h \
|
||||
nsIPluginInstance.h \
|
||||
nsIPluginInstancePeer.h \
|
||||
nsIPluginManager.h \
|
||||
nsIPluginManager2.h \
|
||||
nsIPluginTagInfo.h \
|
||||
nsIPluginTagInfo2.h \
|
||||
nsIWindowlessPlugInstPeer.h \
|
||||
nsIPluginInputStream.h \
|
||||
nsIPluginInputStream2.h \
|
||||
nsIPluginStreamListener.h \
|
||||
nsplugin.h \
|
||||
nsplugindefs.h
|
||||
|
||||
# DEPRECATED -- remove before we ship 5.0
|
||||
EXPORTS = $(EXPORTS) \
|
||||
nsIPluginStream.h \
|
||||
nsIPluginStreamPeer.h \
|
||||
nsIPluginStreamPeer2.h \
|
||||
nsISeekablePluginStreamPeer.h \
|
||||
|
||||
include <$(DEPTH)/config/rules.mak>
|
||||
|
||||
81
mozilla/modules/plugin/base/public/nsIEventHandler.h
Normal file
81
mozilla/modules/plugin/base/public/nsIEventHandler.h
Normal file
@@ -0,0 +1,81 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIEventHandler_h___
|
||||
#define nsIEventHandler_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Plugin Instance Interface
|
||||
|
||||
/**
|
||||
* The nsIEventHandler interface provides the callback to handle events.
|
||||
* It is implemented by the plugin, and is the superclass for nsIPluginInstance.
|
||||
*/
|
||||
class nsIEventHandler : public nsISupports {
|
||||
public:
|
||||
|
||||
/**
|
||||
* Handles an event. An nsIEventHandler can also get registered with with
|
||||
* nsIPluginManager2::RegisterWindow and will be called whenever an event
|
||||
* comes in for that window.
|
||||
*
|
||||
* Note that for Unix and Mac the nsPluginEvent structure is different
|
||||
* from the old NPEvent structure -- it's no longer the native event
|
||||
* record, but is instead a struct. This was done for future extensibility,
|
||||
* and so that the Mac could receive the window argument too. For Windows
|
||||
* and OS2, it's always been a struct, so there's no change for them.
|
||||
*
|
||||
* (Corresponds to NPP_HandleEvent.)
|
||||
*
|
||||
* @param event - the event to be handled
|
||||
* @param handled - set to PR_TRUE if event was handled
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
HandleEvent(nsPluginEvent* event, PRBool* handled) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IEVENTHANDLER_IID \
|
||||
{ /* a447ddf0-1a99-11d2-815f-006008119d7a */ \
|
||||
0xa447ddf0, \
|
||||
0x1a99, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5f, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIEventHandler_h___ */
|
||||
92
mozilla/modules/plugin/base/public/nsIFileUtilities.h
Normal file
92
mozilla/modules/plugin/base/public/nsIFileUtilities.h
Normal file
@@ -0,0 +1,92 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIFileUtilities_h___
|
||||
#define nsIFileUtilities_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
#include "nsISupports.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File Utilities Interface
|
||||
// This interface reflects operations only available in Communicator 5.0.
|
||||
|
||||
/**
|
||||
* The nsIFileUtilities interface provides access to random file operations.
|
||||
* To obtain: QueryInterface on nsIPluginManager.
|
||||
*/
|
||||
class nsIFileUtilities : public nsISupports {
|
||||
public:
|
||||
|
||||
/**
|
||||
* Returns the name of the browser executable program.
|
||||
*
|
||||
* @param result - the returned path to the program
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetProgramPath(const char* *result) = 0;
|
||||
|
||||
/**
|
||||
* Returns the name of the temporary directory.
|
||||
*
|
||||
* @param result - the returned path to the temp directory
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetTempDirPath(const char* *result) = 0;
|
||||
|
||||
/**
|
||||
* Returns a unique temporary file name.
|
||||
*
|
||||
* @param prefix - a string to prefix to the temporary file name
|
||||
* @param bufLen - the length of the resultBuf to receive the data
|
||||
* @param resultBuf - the returned temp file name
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
NewTempFileName(const char* prefix, PRUint32 bufLen, char* resultBuf) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IFILEUTILITIES_IID \
|
||||
{ /* 89a31ce0-019a-11d2-815b-006008119d7a */ \
|
||||
0x89a31ce0, \
|
||||
0x019a, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIFileUtilities_h___ */
|
||||
@@ -0,0 +1,98 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIJRILiveConnectPluginInstancePeer_h__
|
||||
#define nsIJRILiveConnectPluginInstancePeer_h__
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
#include "nsISupports.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// JRI-Based LiveConnect Classes
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This stuff is here so that the browser can support older JRI-based
|
||||
// LiveConnected plugins (when using old plugin to new C++-style plugin
|
||||
// adapter code).
|
||||
//
|
||||
// Warning: Don't use this anymore, unless you're sure that you have to!
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "jri.h"
|
||||
|
||||
/**
|
||||
* The nsIJRILiveConnectPluginInstancePeer interface is implemented by browsers
|
||||
* that support JRI-based LiveConnect. Note that for 5.0, LiveConnect support
|
||||
* has become JNI-based, so this interface is effectively deprecated.
|
||||
*
|
||||
* To obtain: QueryInterface on nsIPluginInstancePeer
|
||||
*/
|
||||
class nsIJRILiveConnectPluginInstancePeer : public nsISupports {
|
||||
public:
|
||||
|
||||
/**
|
||||
* Returns a JRI reference to the Java peer object associated with the
|
||||
* plugin instance. This object is an instance of the class specified
|
||||
* by nsIJRILiveConnectPlugin::GetJavaClass.
|
||||
*
|
||||
* (Corresponds to NPN_GetJavaPeer.)
|
||||
*
|
||||
* @param resultingJavaPeer - a resulting reference to the Java instance
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetJavaPeer(jref *resultingJavaPeer) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IJRILIVECONNECTPLUGININSTANCEPEER_IID \
|
||||
{ /* 25b63f40-f773-11d1-815b-006008119d7a */ \
|
||||
0x25b63f40, \
|
||||
0xf773, \
|
||||
0x11d1, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
// QueryInterface for this IID on nsIPluginManager to get a JRIEnv
|
||||
// XXX change this
|
||||
#define NS_IJRIENV_IID \
|
||||
{ /* f9d4ea00-a1bc-11d1-85b1-00805f0e4dfe */ \
|
||||
0xf9d4ea00, \
|
||||
0xa1bc, \
|
||||
0x11d1, \
|
||||
{0x85, 0xb1, 0x00, 0x80, 0x5f, 0x0e, 0x4d, 0xfe} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIJRILiveConnectPluginInstancePeer_h__ */
|
||||
88
mozilla/modules/plugin/base/public/nsIJRILiveConnectPlugin.h
Normal file
88
mozilla/modules/plugin/base/public/nsIJRILiveConnectPlugin.h
Normal file
@@ -0,0 +1,88 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIJRILiveConnectPlugin_h__
|
||||
#define nsIJRILiveConnectPlugin_h__
|
||||
|
||||
#include "nsIPlugin.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// JRI-Based LiveConnect Classes
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This stuff is here so that the browser can support older JRI-based
|
||||
// LiveConnected plugins (when using old plugin to new C++-style plugin
|
||||
// adapter code).
|
||||
//
|
||||
// Warning: Don't use this anymore, unless you're sure that you have to!
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "jri.h"
|
||||
|
||||
/**
|
||||
* The nsIJRILiveConnectPlugin interface defines additional entry points that a
|
||||
* plugin developer needs to implement in order for the plugin to support
|
||||
* JRI-based LiveConnect, as opposed to the standard JNI-based LiveConnect
|
||||
* (which new in 5.0).
|
||||
*
|
||||
* Plugin developers requiring this capability should implement this interface
|
||||
* in addition to the basic nsIPlugin interface.
|
||||
*/
|
||||
class nsIJRILiveConnectPlugin : public nsIPlugin {
|
||||
public:
|
||||
|
||||
/**
|
||||
* Returns the class of the Java instance to be associated with the
|
||||
* plugin.
|
||||
*
|
||||
* (Corresponds to NPP_GetJavaClass.)
|
||||
*
|
||||
* @param resultingClass - a resulting reference to the Java class
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetJavaClass(jref *resultingClass) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IJRILIVECONNECTPLUGIN_IID \
|
||||
{ /* c94058e0-f772-11d1-815b-006008119d7a */ \
|
||||
0xc94058e0, \
|
||||
0xf772, \
|
||||
0x11d1, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIJRILiveConnectPlugin_h__ */
|
||||
@@ -0,0 +1,86 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIJRILiveConnectPluginInstancePeer_h__
|
||||
#define nsIJRILiveConnectPluginInstancePeer_h__
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// JRI-Based LiveConnect Classes
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This stuff is here so that the browser can support older JRI-based
|
||||
// LiveConnected plugins (when using old plugin to new C++-style plugin
|
||||
// adapter code).
|
||||
//
|
||||
// Warning: Don't use this anymore, unless you're sure that you have to!
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "jri.h" // ancient
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// JRILiveConnect Plugin Instance Peer Interface
|
||||
// Browsers that support JRI-based LiveConnect implement this subclass of
|
||||
// plugin instance peer.
|
||||
|
||||
class nsIJRILiveConnectPluginInstancePeer : public nsISupports {
|
||||
public:
|
||||
|
||||
// (Corresponds to NPN_GetJavaPeer.)
|
||||
NS_IMETHOD_(jref)
|
||||
GetJavaPeer(void) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IJRILIVECONNECTPLUGININSTANCEPEER_IID \
|
||||
{ /* 25b63f40-f773-11d1-815b-006008119d7a */ \
|
||||
0x25b63f40, \
|
||||
0xf773, \
|
||||
0x11d1, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
// QueryInterface for this IID on nsIPluginManager to get a JRIEnv
|
||||
// XXX change this
|
||||
#define NS_IJRIENV_IID \
|
||||
{ /* f9d4ea00-a1bc-11d1-85b1-00805f0e4dfe */ \
|
||||
0xf9d4ea00, \
|
||||
0xa1bc, \
|
||||
0x11d1, \
|
||||
{0x85, 0xb1, 0x00, 0x80, 0x5f, 0x0e, 0x4d, 0xfe} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIJRILiveConnectPluginInstancePeer_h__ */
|
||||
@@ -0,0 +1,86 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsILiveConnectPluginInstancePeer_h___
|
||||
#define nsILiveConnectPluginInstancePeer_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
#include "nsISupports.h"
|
||||
#include "jni.h" // standard JVM API
|
||||
|
||||
/**
|
||||
* The nsILiveConnectPluginInstancePeer interface is implemented by browsers
|
||||
* that support LiveConnect, i.e. scriptability via JavaScript. Note that this
|
||||
* LiveConnect interface is now JNI-based (since 5.0).
|
||||
*
|
||||
* To obtain: QueryInterface on nsIPluginInstancePeer
|
||||
*/
|
||||
class nsILiveConnectPluginInstancePeer : public nsISupports {
|
||||
public:
|
||||
|
||||
/**
|
||||
* Returns a JNI reference to the Java peer object associated with the
|
||||
* plugin instance. This object is an instance of the class specified
|
||||
* by nsIJRILiveConnectPlugin::GetJavaClass.
|
||||
*
|
||||
* (New JNI-based entry point, roughly corresponds to NPN_GetJavaPeer.)
|
||||
*
|
||||
* @param resultingJavaPeer - a resulting reference to the Java instance
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetJavaPeer(jobject *resultingJavaPeer) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_ILIVECONNECTPLUGININSTANCEPEER_IID \
|
||||
{ /* 1e3502a0-a1bd-11d1-85b1-00805f0e4dfe */ \
|
||||
0x1e3502a0, \
|
||||
0xa1bd, \
|
||||
0x11d1, \
|
||||
{0x85, 0xb1, 0x00, 0x80, 0x5f, 0x0e, 0x4d, 0xfe} \
|
||||
}
|
||||
|
||||
// QueryInterface for this IID on nsIPluginManager to get a JNIEnv
|
||||
// XXX change this
|
||||
#define NS_IJNIENV_IID \
|
||||
{ /* 04610650-a1bd-11d1-85b1-00805f0e4dfe */ \
|
||||
0x04610650, \
|
||||
0xa1bd, \
|
||||
0x11d1, \
|
||||
{0x85, 0xb1, 0x00, 0x80, 0x5f, 0x0e, 0x4d, 0xfe} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsILiveConnectPluginInstancePeer_h___ */
|
||||
75
mozilla/modules/plugin/base/public/nsILiveConnectPlugin.h
Normal file
75
mozilla/modules/plugin/base/public/nsILiveConnectPlugin.h
Normal file
@@ -0,0 +1,75 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsILiveConnectPlugin_h__
|
||||
#define nsILiveConnectPlugin_h__
|
||||
|
||||
#include "nsIPlugin.h"
|
||||
#include "jni.h" // standard JVM API
|
||||
|
||||
/**
|
||||
* The nsILiveConnectPlugin interface defines additional entry points that a
|
||||
* plugin developer needs to implement in order for the plugin to support
|
||||
* JNI-based LiveConnect (new in 5.0).
|
||||
*
|
||||
* Plugin developers requiring this capability should implement this interface
|
||||
* in addition to the basic nsIPlugin interface.
|
||||
*/
|
||||
class nsILiveConnectPlugin : public nsIPlugin {
|
||||
public:
|
||||
|
||||
/**
|
||||
* Returns the class of the Java instance to be associated with the
|
||||
* plugin.
|
||||
*
|
||||
* (New JNI-based entry point, roughly corresponds to NPP_GetJavaClass.)
|
||||
*
|
||||
* @param resultingClass - a resulting reference to the Java class
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetJavaClass(jclass *resultingClass) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_ILIVECONNECTPLUGIN_IID \
|
||||
{ /* cf134df0-a1bc-11d1-85b1-00805f0e4dfe */ \
|
||||
0xcf134df0, \
|
||||
0xa1bc, \
|
||||
0x11d1, \
|
||||
{0x85, 0xb1, 0x00, 0x80, 0x5f, 0x0e, 0x4d, 0xfe} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsILiveConnectPlugin_h__ */
|
||||
@@ -0,0 +1,74 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsILiveConnectPluginInstancePeer_h___
|
||||
#define nsILiveConnectPluginInstancePeer_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
#include "jni.h" // standard JVM API
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// LiveConnect Plugin Instance Peer Interface
|
||||
// Browsers that support JNI-based LiveConnect implement this subclass of
|
||||
// plugin instance peer.
|
||||
|
||||
class nsILiveConnectPluginInstancePeer : public nsISupports {
|
||||
public:
|
||||
|
||||
// (New JNI-based entry point, roughly corresponds to NPN_GetJavaPeer.)
|
||||
NS_IMETHOD_(jobject)
|
||||
GetJavaPeer(void) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_ILIVECONNECTPLUGININSTANCEPEER_IID \
|
||||
{ /* 1e3502a0-a1bd-11d1-85b1-00805f0e4dfe */ \
|
||||
0x1e3502a0, \
|
||||
0xa1bd, \
|
||||
0x11d1, \
|
||||
{0x85, 0xb1, 0x00, 0x80, 0x5f, 0x0e, 0x4d, 0xfe} \
|
||||
}
|
||||
|
||||
// QueryInterface for this IID on nsIPluginManager to get a JNIEnv
|
||||
// XXX change this
|
||||
#define NS_IJNIENV_IID \
|
||||
{ /* 04610650-a1bd-11d1-85b1-00805f0e4dfe */ \
|
||||
0x04610650, \
|
||||
0xa1bd, \
|
||||
0x11d1, \
|
||||
{0x85, 0xb1, 0x00, 0x80, 0x5f, 0x0e, 0x4d, 0xfe} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsILiveConnectPluginInstancePeer_h___ */
|
||||
94
mozilla/modules/plugin/base/public/nsIMalloc.h
Normal file
94
mozilla/modules/plugin/base/public/nsIMalloc.h
Normal file
@@ -0,0 +1,94 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef nsIMalloc_h___
|
||||
#define nsIMalloc_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
|
||||
class nsIMalloc : public nsISupports {
|
||||
public:
|
||||
|
||||
/**
|
||||
* Allocates a block of memory of a particular size.
|
||||
*
|
||||
* @param size - the size of the block to allocate
|
||||
* @result the block of memory
|
||||
*/
|
||||
NS_IMETHOD_(void*)
|
||||
Alloc(PRUint32 size) = 0;
|
||||
|
||||
/**
|
||||
* Reallocates a block of memory to a new size.
|
||||
*
|
||||
* @param ptr - the block of memory to reallocate
|
||||
* @param size - the new size
|
||||
* @result the rellocated block of memory
|
||||
*/
|
||||
NS_IMETHOD_(void*)
|
||||
Realloc(void* ptr, PRUint32 size) = 0;
|
||||
|
||||
/**
|
||||
* Frees a block of memory.
|
||||
*
|
||||
* @param ptr - the block of memory to free
|
||||
*/
|
||||
NS_IMETHOD_(void)
|
||||
Free(void* ptr) = 0;
|
||||
|
||||
/**
|
||||
* Returns the size of a block of memory. Returns -1
|
||||
* if the size is not available.
|
||||
*
|
||||
* @param ptr - the block of memory
|
||||
* @result the size or -1 if not available
|
||||
*/
|
||||
NS_IMETHOD_(PRInt32)
|
||||
GetSize(void* ptr) = 0;
|
||||
|
||||
/**
|
||||
* Returns whether the block of memory was allocated by this
|
||||
* memory allocator. Returns PR_FALSE if this information is
|
||||
* not available.
|
||||
*
|
||||
* @param ptr - the block of memory
|
||||
* @result true if allocated by this nsIMalloc, false if not or
|
||||
* if it can't be determined
|
||||
*/
|
||||
NS_IMETHOD_(PRBool)
|
||||
DidAlloc(void* ptr) = 0;
|
||||
|
||||
/**
|
||||
* Attempts to shrink the heap.
|
||||
*/
|
||||
NS_IMETHOD_(void)
|
||||
HeapMinimize(void) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IMALLOC_IID \
|
||||
{ /* c4744e60-1875-11d2-815f-006008119d7a */ \
|
||||
0xc4744e60, \
|
||||
0x1875, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5f, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIMalloc_h___ */
|
||||
121
mozilla/modules/plugin/base/public/nsIPlugin.h
Normal file
121
mozilla/modules/plugin/base/public/nsIPlugin.h
Normal file
@@ -0,0 +1,121 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPlugin_h___
|
||||
#define nsIPlugin_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
#include "nsIFactory.h"
|
||||
|
||||
/**
|
||||
* The nsIPlugin interface is the minimum interface plugin developers need to
|
||||
* support in order to implement a plugin. The plugin manager may QueryInterface
|
||||
* for more specific plugin types, e.g. nsILiveConnectPlugin.
|
||||
*
|
||||
* The old NPP_New plugin operation is now subsumed by two operations:
|
||||
*
|
||||
* CreateInstance -- called once, after the plugin instance is created. This
|
||||
* method is used to initialize the new plugin instance (although the actual
|
||||
* plugin instance object will be created by the plugin manager).
|
||||
*
|
||||
* nsIPluginInstance::Start -- called when the plugin instance is to be
|
||||
* started. This happens in two circumstances: (1) after the plugin instance
|
||||
* is first initialized, and (2) after a plugin instance is returned to
|
||||
* (e.g. by going back in the window history) after previously being stopped
|
||||
* by the Stop method.
|
||||
*/
|
||||
struct nsIPlugin : public nsIFactory {
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initializes the plugin and will be called before any new instances are
|
||||
* created. It is passed browserInterfaces on which QueryInterface
|
||||
* may be used to obtain an nsIPluginManager, and other interfaces.
|
||||
*
|
||||
* @param browserInterfaces - an object that allows access to other browser
|
||||
* interfaces via QueryInterface
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
Initialize(nsISupports* browserInterfaces) = 0;
|
||||
|
||||
/**
|
||||
* Called when the browser is done with the plugin factory, or when
|
||||
* the plugin is disabled by the user.
|
||||
*
|
||||
* (Corresponds to NPP_Shutdown.)
|
||||
*
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
Shutdown(void) = 0;
|
||||
|
||||
/**
|
||||
* Returns the MIME description for the plugin. The MIME description
|
||||
* is a colon-separated string containg the plugin MIME type, plugin
|
||||
* data file extension, and plugin name, e.g.:
|
||||
*
|
||||
* "application/x-simple-plugin:smp:Simple LiveConnect Sample Plug-in"
|
||||
*
|
||||
* (Corresponds to NPP_GetMIMEDescription.)
|
||||
*
|
||||
* @param resultingDesc - the resulting MIME description
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetMIMEDescription(const char* *resultingDesc) = 0;
|
||||
|
||||
/**
|
||||
* Returns the value of a variable associated with the plugin.
|
||||
*
|
||||
* (Corresponds to NPP_GetValue.)
|
||||
*
|
||||
* @param variable - the plugin variable to get
|
||||
* @param value - the address of where to store the resulting value
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetValue(nsPluginVariable variable, void *value) = 0;
|
||||
};
|
||||
|
||||
#define NS_IPLUGIN_IID \
|
||||
{ /* df773070-0199-11d2-815b-006008119d7a */ \
|
||||
0xdf773070, \
|
||||
0x0199, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPlugin_h___ */
|
||||
65
mozilla/modules/plugin/base/public/nsIPluginInputStream.h
Normal file
65
mozilla/modules/plugin/base/public/nsIPluginInputStream.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPluginInputStream_h___
|
||||
#define nsIPluginInputStream_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
#include "nsIInputStream.h"
|
||||
|
||||
/**
|
||||
* The nsIPluginInputStream interface ...
|
||||
*/
|
||||
class nsIPluginInputStream : public nsIInputStream {
|
||||
public:
|
||||
|
||||
// (Corresponds to NPStream's lastmodified field.)
|
||||
NS_IMETHOD
|
||||
GetLastModified(PRUint32 *result) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
RequestRead(nsByteRange* rangeList) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IPLUGININPUTSTREAM_IID \
|
||||
{ /* af160530-542a-11d2-8164-006008119d7a */ \
|
||||
0xaf160530, \
|
||||
0x542a, \
|
||||
0x11d2, \
|
||||
{0x81, 0x64, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPluginInputStream_h___ */
|
||||
66
mozilla/modules/plugin/base/public/nsIPluginInputStream2.h
Normal file
66
mozilla/modules/plugin/base/public/nsIPluginInputStream2.h
Normal file
@@ -0,0 +1,66 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPluginInputStream2_h___
|
||||
#define nsIPluginInputStream2_h___
|
||||
|
||||
#include "nsIPluginInputStream.h"
|
||||
|
||||
/**
|
||||
* The nsIPluginInputStream2 interface ...
|
||||
*/
|
||||
class nsIPluginInputStream2 : public nsIPluginInputStream {
|
||||
public:
|
||||
|
||||
NS_IMETHOD
|
||||
GetContentLength(PRUint32 *result) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
GetHeaderFields(PRUint16& n, const char*const*& names, const char*const*& values) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
GetHeaderField(const char* name, const char* *result) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IPLUGININPUTSTREAM2_IID \
|
||||
{ /* cfb36db0-542a-11d2-8164-006008119d7a */ \
|
||||
0xcfb36db0, \
|
||||
0x542a, \
|
||||
0x11d2, \
|
||||
{0x81, 0x64, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPluginInputStream2_h___ */
|
||||
196
mozilla/modules/plugin/base/public/nsIPluginInstance.h
Normal file
196
mozilla/modules/plugin/base/public/nsIPluginInstance.h
Normal file
@@ -0,0 +1,196 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPluginInstance_h___
|
||||
#define nsIPluginInstance_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
#include "nsIEventHandler.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Plugin Instance Interface
|
||||
|
||||
/**
|
||||
* The nsIPluginInstance interface is the minimum interface plugin developers
|
||||
* need to support in order to implement a plugin instance. The plugin manager
|
||||
* may QueryInterface for more specific types, e.g. nsILiveConnectPluginInstance.
|
||||
*
|
||||
* (Corresponds to NPP object.)
|
||||
*
|
||||
* The old NPP_Destroy call has been factored into two plugin instance
|
||||
* methods:
|
||||
*
|
||||
* Stop -- called when the plugin instance is to be stopped (e.g. by
|
||||
* displaying another plugin manager window, causing the page containing
|
||||
* the plugin to become removed from the display).
|
||||
*
|
||||
* Destroy -- called once, before the plugin instance peer is to be
|
||||
* destroyed. This method is used to destroy the plugin instance.
|
||||
*/
|
||||
class nsIPluginInstance : public nsIEventHandler {
|
||||
public:
|
||||
|
||||
/**
|
||||
* Initializes a newly created plugin instance, passing to it the plugin
|
||||
* instance peer which it should use for all communication back to the browser.
|
||||
*
|
||||
* @param peer - the corresponding plugin instance peer
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
Initialize(nsIPluginInstancePeer* peer) = 0;
|
||||
|
||||
/**
|
||||
* Returns a reference back to the plugin instance peer. This method is
|
||||
* used whenever the browser needs to obtain the peer back from a plugin
|
||||
* instance. The implementation of this method should be sure to increment
|
||||
* the reference count on the peer by calling AddRef.
|
||||
*
|
||||
* @param resultingPeer - the resulting plugin instance peer
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetPeer(nsIPluginInstancePeer* *resultingPeer) = 0;
|
||||
|
||||
/**
|
||||
* Called to instruct the plugin instance to start. This will be called after
|
||||
* the plugin is first created and initialized, and may be called after the
|
||||
* plugin is stopped (via the Stop method) if the plugin instance is returned
|
||||
* to in the browser window's history.
|
||||
*
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
Start(void) = 0;
|
||||
|
||||
/**
|
||||
* Called to instruct the plugin instance to stop, thereby suspending its state.
|
||||
* This method will be called whenever the browser window goes on to display
|
||||
* another page and the page containing the plugin goes into the window's history
|
||||
* list.
|
||||
*
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
Stop(void) = 0;
|
||||
|
||||
/**
|
||||
* Called to instruct the plugin instance to destroy itself. This is called when
|
||||
* it become no longer possible to return to the plugin instance, either because
|
||||
* the browser window's history list of pages is being trimmed, or because the
|
||||
* window containing this page in the history is being closed.
|
||||
*
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
Destroy(void) = 0;
|
||||
|
||||
/**
|
||||
* Called when the window containing the plugin instance changes.
|
||||
*
|
||||
* (Corresponds to NPP_SetWindow.)
|
||||
*
|
||||
* @param window - the plugin window structure
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
SetWindow(nsPluginWindow* window) = 0;
|
||||
|
||||
#ifndef NEW_PLUGIN_STREAM_API
|
||||
/**
|
||||
* Called when a new plugin stream must be constructed in order for the plugin
|
||||
* instance to receive a stream of data from the browser.
|
||||
*
|
||||
* (Corresponds to NPP_NewStream.)
|
||||
*
|
||||
* @param peer - the plugin stream peer, representing information about the
|
||||
* incoming stream, and stream-specific callbacks into the browser
|
||||
* @param result - the resulting plugin stream
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
NewStream(nsIPluginStreamPeer* peer, nsIPluginStream* *result) = 0;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Called to instruct the plugin instance to print itself to a printer.
|
||||
*
|
||||
* (Corresponds to NPP_Print.)
|
||||
*
|
||||
* @param platformPrint - platform-specific printing information
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
Print(nsPluginPrint* platformPrint) = 0;
|
||||
|
||||
#ifndef NEW_PLUGIN_STREAM_API
|
||||
/**
|
||||
* Called to notify the plugin instance that a URL request has been
|
||||
* completed. (See nsIPluginManager::GetURL and nsIPluginManager::PostURL).
|
||||
*
|
||||
* (Corresponds to NPP_URLNotify.)
|
||||
*
|
||||
* @param url - the requested URL
|
||||
* @param target - the target window name
|
||||
* @param reason - the reason for completion
|
||||
* @param notifyData - the notify data supplied to GetURL or PostURL
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
URLNotify(const char* url, const char* target,
|
||||
nsPluginReason reason, void* notifyData) = 0;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Returns the value of a variable associated with the plugin instance.
|
||||
*
|
||||
* @param variable - the plugin instance variable to get
|
||||
* @param value - the address of where to store the resulting value
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetValue(nsPluginInstanceVariable variable, void *value) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IPLUGININSTANCE_IID \
|
||||
{ /* ebe00f40-0199-11d2-815b-006008119d7a */ \
|
||||
0xebe00f40, \
|
||||
0x0199, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPluginInstance_h___ */
|
||||
142
mozilla/modules/plugin/base/public/nsIPluginInstancePeer.h
Normal file
142
mozilla/modules/plugin/base/public/nsIPluginInstancePeer.h
Normal file
@@ -0,0 +1,142 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPluginInstancePeer_h___
|
||||
#define nsIPluginInstancePeer_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
#include "nsISupports.h"
|
||||
|
||||
class nsIOutputStream;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Plugin Instance Peer Interface
|
||||
|
||||
/**
|
||||
* The nsIPluginInstancePeer interface is the set of operations implemented
|
||||
* by the browser to support a plugin instance. When a plugin instance is
|
||||
* constructed, a nsIPluginInstancePeer is passed to its initializer
|
||||
* representing the instantiation of the plugin on the page.
|
||||
*
|
||||
* Other interfaces may be obtained from nsIPluginInstancePeer by calling
|
||||
* QueryInterface, e.g. nsIPluginTagInfo.
|
||||
*/
|
||||
class nsIPluginInstancePeer : public nsISupports {
|
||||
public:
|
||||
|
||||
/**
|
||||
* Returns the value of a variable associated with the plugin manager.
|
||||
*
|
||||
* (Corresponds to NPN_GetValue.)
|
||||
*
|
||||
* @param variable - the plugin manager variable to get
|
||||
* @param value - the address of where to store the resulting value
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetValue(nsPluginInstancePeerVariable variable, void *value) = 0;
|
||||
|
||||
/**
|
||||
* Returns the MIME type of the plugin instance.
|
||||
*
|
||||
* (Corresponds to NPP_New's MIMEType argument.)
|
||||
*
|
||||
* @param result - resulting MIME type
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetMIMEType(nsMIMEType *result) = 0;
|
||||
|
||||
/**
|
||||
* Returns the mode of the plugin instance, i.e. whether the plugin is
|
||||
* embedded in the html, or full page.
|
||||
*
|
||||
* (Corresponds to NPP_New's mode argument.)
|
||||
*
|
||||
* @param result - the resulting mode
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetMode(nsPluginMode *result) = 0;
|
||||
|
||||
/**
|
||||
* This operation is called by the plugin instance when it wishes to send
|
||||
* a stream of data to the browser. It constructs a new output stream to which
|
||||
* the plugin may send the data. When complete, the Close and Release methods
|
||||
* should be called on the output stream.
|
||||
*
|
||||
* (Corresponds to NPN_NewStream.)
|
||||
*
|
||||
* @param type - type MIME type of the stream to create
|
||||
* @param target - the target window name to receive the data
|
||||
* @param result - the resulting output stream
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
NewStream(nsMIMEType type, const char* target, nsIOutputStream* *result) = 0;
|
||||
|
||||
/**
|
||||
* This operation causes status information to be displayed on the window
|
||||
* associated with the plugin instance.
|
||||
*
|
||||
* (Corresponds to NPN_Status.)
|
||||
*
|
||||
* @param message - the status message to display
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
ShowStatus(const char* message) = 0;
|
||||
|
||||
/**
|
||||
* Set the desired size of the window in which the plugin instance lives.
|
||||
*
|
||||
* @param width - new window width
|
||||
* @param height - new window height
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
SetWindowSize(PRUint32 width, PRUint32 height) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IPLUGININSTANCEPEER_IID \
|
||||
{ /* 4b7cea20-019b-11d2-815b-006008119d7a */ \
|
||||
0x4b7cea20, \
|
||||
0x019b, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPluginInstancePeer_h___ */
|
||||
191
mozilla/modules/plugin/base/public/nsIPluginManager.h
Normal file
191
mozilla/modules/plugin/base/public/nsIPluginManager.h
Normal file
@@ -0,0 +1,191 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPluginManager_h___
|
||||
#define nsIPluginManager_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
#include "nsISupports.h"
|
||||
|
||||
class nsIPluginStreamListener;
|
||||
|
||||
/**
|
||||
* The nsIPluginManager interface defines the minimum set of functionality that
|
||||
* the browser will support if it allows plugins. Plugins can call QueryInterface
|
||||
* to determine if a plugin manager implements more specific APIs or other
|
||||
* browser interfaces for the plugin to use (e.g. nsINetworkManager).
|
||||
*/
|
||||
class nsIPluginManager : public nsISupports {
|
||||
public:
|
||||
|
||||
/**
|
||||
* Returns the value of a variable associated with the plugin manager.
|
||||
*
|
||||
* (Corresponds to NPN_GetValue.)
|
||||
*
|
||||
* @param variable - the plugin manager variable to get
|
||||
* @param value - the address of where to store the resulting value
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetValue(nsPluginManagerVariable variable, void *value) = 0;
|
||||
|
||||
/**
|
||||
* Causes the plugins directory to be searched again for new plugin
|
||||
* libraries.
|
||||
*
|
||||
* (Corresponds to NPN_ReloadPlugins.)
|
||||
*
|
||||
* @param reloadPages - indicates whether currently visible pages should
|
||||
* also be reloaded
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
ReloadPlugins(PRBool reloadPages) = 0;
|
||||
|
||||
/**
|
||||
* Returns the user agent string for the browser.
|
||||
*
|
||||
* (Corresponds to NPN_UserAgent.)
|
||||
*
|
||||
* @param resultingAgentString - the resulting user agent string
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
UserAgent(const char* *resultingAgentString) = 0;
|
||||
|
||||
#ifdef NEW_PLUGIN_STREAM_API
|
||||
|
||||
NS_IMETHOD
|
||||
GetURL(nsISupports* pluginInst,
|
||||
const char* url,
|
||||
const char* target = NULL,
|
||||
nsIPluginStreamListener* streamListener = NULL,
|
||||
nsPluginStreamType streamType = nsPluginStreamType_Normal,
|
||||
const char* altHost = NULL,
|
||||
const char* referrer = NULL,
|
||||
PRBool forceJSEnabled = PR_FALSE) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
PostURL(nsISupports* pluginInst,
|
||||
const char* url,
|
||||
PRUint32 postDataLen,
|
||||
const char* postData,
|
||||
PRBool isFile = PR_FALSE,
|
||||
const char* target = NULL,
|
||||
nsIPluginStreamListener* streamListener = NULL,
|
||||
nsPluginStreamType streamType = nsPluginStreamType_Normal,
|
||||
const char* altHost = NULL,
|
||||
const char* referrer = NULL,
|
||||
PRBool forceJSEnabled = PR_FALSE,
|
||||
PRUint32 postHeadersLength = 0,
|
||||
const char* postHeaders = NULL) = 0;
|
||||
|
||||
#else // !NEW_PLUGIN_STREAM_API
|
||||
/**
|
||||
* Fetches a URL.
|
||||
*
|
||||
* (Corresponds to NPN_GetURL and NPN_GetURLNotify.)
|
||||
*
|
||||
* @param pluginInst - the plugin making the request. If NULL, the URL
|
||||
* is fetched in the background.
|
||||
* @param url - the URL to fetch
|
||||
* @param target - the target window into which to load the URL
|
||||
* @param notifyData - when present, URLNotify is called passing the
|
||||
* notifyData back to the client. When NULL, this call behaves like
|
||||
* NPN_GetURL.
|
||||
* @param altHost - an IP-address string that will be used instead of the
|
||||
* host specified in the URL. This is used to prevent DNS-spoofing
|
||||
* attacks. Can be defaulted to NULL meaning use the host in the URL.
|
||||
* @param referrer - the referring URL (may be NULL)
|
||||
* @param forceJSEnabled - forces JavaScript to be enabled for 'javascript:'
|
||||
* URLs, even if the user currently has JavaScript disabled (usually
|
||||
* specify PR_FALSE)
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetURL(nsISupports* pluginInst, const char* url, const char* target,
|
||||
void* notifyData = NULL, const char* altHost = NULL,
|
||||
const char* referrer = NULL, PRBool forceJSEnabled = PR_FALSE) = 0;
|
||||
|
||||
/**
|
||||
* Posts to a URL with post data and/or post headers.
|
||||
*
|
||||
* (Corresponds to NPN_PostURL and NPN_PostURLNotify.)
|
||||
*
|
||||
* @param pluginInst - the plugin making the request. If NULL, the URL
|
||||
* is fetched in the background.
|
||||
* @param url - the URL to fetch
|
||||
* @param target - the target window into which to load the URL
|
||||
* @param postDataLength - the length of postData (if non-NULL)
|
||||
* @param postData - the data to POST. NULL specifies that there is not post
|
||||
* data
|
||||
* @param isFile - whether the postData specifies the name of a file to
|
||||
* post instead of data. The file will be deleted afterwards.
|
||||
* @param notifyData - when present, URLNotify is called passing the
|
||||
* notifyData back to the client. When NULL, this call behaves like
|
||||
* NPN_GetURL.
|
||||
* @param altHost - an IP-address string that will be used instead of the
|
||||
* host specified in the URL. This is used to prevent DNS-spoofing
|
||||
* attacks. Can be defaulted to NULL meaning use the host in the URL.
|
||||
* @param referrer - the referring URL (may be NULL)
|
||||
* @param forceJSEnabled - forces JavaScript to be enabled for 'javascript:'
|
||||
* URLs, even if the user currently has JavaScript disabled (usually
|
||||
* specify PR_FALSE)
|
||||
* @param postHeadersLength - the length of postHeaders (if non-NULL)
|
||||
* @param postHeaders - the headers to POST. NULL specifies that there
|
||||
* are no post headers
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
PostURL(nsISupports* pluginInst, const char* url, const char* target,
|
||||
PRUint32 postDataLen, const char* postData,
|
||||
PRBool isFile = PR_FALSE, void* notifyData = NULL,
|
||||
const char* altHost = NULL, const char* referrer = NULL,
|
||||
PRBool forceJSEnabled = PR_FALSE,
|
||||
PRUint32 postHeadersLength = 0, const char* postHeaders = NULL) = 0;
|
||||
#endif // !NEW_PLUGIN_STREAM_API
|
||||
|
||||
};
|
||||
|
||||
#define NS_IPLUGINMANAGER_IID \
|
||||
{ /* da58ad80-4eb6-11d2-8164-006008119d7a */ \
|
||||
0xda58ad80, \
|
||||
0x4eb6, \
|
||||
0x11d2, \
|
||||
{0x81, 0x64, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPluginManager_h___ */
|
||||
188
mozilla/modules/plugin/base/public/nsIPluginManager2.h
Normal file
188
mozilla/modules/plugin/base/public/nsIPluginManager2.h
Normal file
@@ -0,0 +1,188 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPluginManager2_h___
|
||||
#define nsIPluginManager2_h___
|
||||
|
||||
#include "nsIPluginManager.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Plugin Manager 2 Interface
|
||||
// These extensions to nsIPluginManager are only available in Communicator 5.0.
|
||||
|
||||
class nsIPluginManager2 : public nsIPluginManager {
|
||||
public:
|
||||
|
||||
/**
|
||||
* Puts up a wait cursor.
|
||||
*
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
BeginWaitCursor(void) = 0;
|
||||
|
||||
/**
|
||||
* Restores the previous (non-wait) cursor.
|
||||
*
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
EndWaitCursor(void) = 0;
|
||||
|
||||
/**
|
||||
* Returns true if a URL protocol (e.g. "http") is supported.
|
||||
*
|
||||
* @param protocol - the protocol name
|
||||
* @param result - true if the protocol is supported
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
SupportsURLProtocol(const char* protocol, PRBool *result) = 0;
|
||||
|
||||
/**
|
||||
* This method may be called by the plugin to indicate that an error
|
||||
* has occurred, e.g. that the plugin has failed or is shutting down
|
||||
* spontaneously. This allows the browser to clean up any plugin-specific
|
||||
* state.
|
||||
*
|
||||
* @param plugin - the plugin whose status is changing
|
||||
* @param errorStatus - the the error status value
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
NotifyStatusChange(nsIPlugin* plugin, nsresult errorStatus) = 0;
|
||||
|
||||
/**
|
||||
* Returns the proxy info for a given URL. The caller is required to
|
||||
* free the resulting memory with nsIMalloc::Free. The result will be in the
|
||||
* following format
|
||||
*
|
||||
* i) "DIRECT" -- no proxy
|
||||
* ii) "PROXY xxx.xxx.xxx.xxx" -- use proxy
|
||||
* iii) "SOCKS xxx.xxx.xxx.xxx" -- use SOCKS
|
||||
* iv) Mixed. e.g. "PROXY 111.111.111.111;PROXY 112.112.112.112",
|
||||
* "PROXY 111.111.111.111;SOCKS 112.112.112.112"....
|
||||
*
|
||||
* Which proxy/SOCKS to use is determined by the plugin.
|
||||
*/
|
||||
NS_IMETHOD
|
||||
FindProxyForURL(const char* url, char* *result) = 0;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// New top-level window handling calls for Mac:
|
||||
|
||||
/**
|
||||
* Registers a top-level window with the browser. Events received by that
|
||||
* window will be dispatched to the event handler specified.
|
||||
*
|
||||
* @param handler - the event handler for the window
|
||||
* @param window - the platform window reference
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
RegisterWindow(nsIEventHandler* handler, nsPluginPlatformWindowRef window) = 0;
|
||||
|
||||
/**
|
||||
* Unregisters a top-level window with the browser. The handler and window pair
|
||||
* should be the same as that specified to RegisterWindow.
|
||||
*
|
||||
* @param handler - the event handler for the window
|
||||
* @param window - the platform window reference
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
UnregisterWindow(nsIEventHandler* handler, nsPluginPlatformWindowRef window) = 0;
|
||||
|
||||
/**
|
||||
* Allocates a new menu ID (for the Mac).
|
||||
*
|
||||
* @param handler - the event handler for the window
|
||||
* @param isSubmenu - whether this is a sub-menu ID or not
|
||||
* @param result - the resulting menu ID
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
AllocateMenuID(nsIEventHandler* handler, PRBool isSubmenu, PRInt16 *result) = 0;
|
||||
|
||||
/**
|
||||
* Deallocates a menu ID (for the Mac).
|
||||
*
|
||||
* @param handler - the event handler for the window
|
||||
* @param menuID - the menu ID
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
DeallocateMenuID(nsIEventHandler* handler, PRInt16 menuID) = 0;
|
||||
|
||||
/**
|
||||
* Indicates whether this event handler has allocated the given menu ID.
|
||||
*
|
||||
* @param handler - the event handler for the window
|
||||
* @param menuID - the menu ID
|
||||
* @param result - returns PR_TRUE if the menu ID is allocated
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
HasAllocatedMenuID(nsIEventHandler* handler, PRInt16 menuID, PRBool *result) = 0;
|
||||
|
||||
#if 0 // problematic
|
||||
/**
|
||||
* This operation causes the next browser event to be processed. This is
|
||||
* handy for implement nested event loops where some other activity must
|
||||
* be performed each time around the loop.
|
||||
*
|
||||
* On the Mac (and most likely on Win16), network activity can only occur on
|
||||
* the main thread. Therefore, we provide a hook here for the case that the
|
||||
* main thread needs to process events while waiting for network activity to
|
||||
* complete.
|
||||
*
|
||||
* @param bEventHandled - a boolean indicating whether an event was processed on the
|
||||
* main thread. If not on the main browser thread, PR_FALSE is returned.
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
ProcessNextEvent(PRBool *bEventHandled) = 0;
|
||||
#endif
|
||||
};
|
||||
|
||||
#define NS_IPLUGINMANAGER2_IID \
|
||||
{ /* d2962dc0-4eb6-11d2-8164-006008119d7a */ \
|
||||
0xd2962dc0, \
|
||||
0x4eb6, \
|
||||
0x11d2, \
|
||||
{0x81, 0x64, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPluginManager2_h___ */
|
||||
89
mozilla/modules/plugin/base/public/nsIPluginStream.h
Normal file
89
mozilla/modules/plugin/base/public/nsIPluginStream.h
Normal file
@@ -0,0 +1,89 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPluginStream_h___
|
||||
#define nsIPluginStream_h___
|
||||
|
||||
#ifndef NEW_PLUGIN_STREAM_API
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
#include "nsIOutputStream.h"
|
||||
|
||||
/**
|
||||
* The nsIPluginStream interface specifies the minimal set of operations that
|
||||
* must be implemented by a plugin stream in order to receive data from the
|
||||
* browser. When a nsIPluginManager::GetURL request is made, a subsequent
|
||||
* nsIPluginInstance::NewStream request will be made to instruct the plugin
|
||||
* instance to construct a new stream to receive the data.
|
||||
*/
|
||||
class nsIPluginStream : public nsIOutputStream {
|
||||
public:
|
||||
|
||||
/**
|
||||
* Returns the stream type of a stream.
|
||||
*
|
||||
* (Corresponds to NPP_NewStream's stype return parameter.)
|
||||
*
|
||||
* @param result - the resulting stream type
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetStreamType(nsPluginStreamType *result) = 0;
|
||||
|
||||
/**
|
||||
* This operation passes to the plugin the name of the file which
|
||||
* contains the stream data.
|
||||
*
|
||||
* (Corresponds to NPP_StreamAsFile.)
|
||||
*
|
||||
* @param fname - the file name
|
||||
* @result - NS_OK if this operation was successful
|
||||
*/
|
||||
NS_IMETHOD
|
||||
AsFile(const char* fname) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IPLUGINSTREAM_IID \
|
||||
{ /* f287dd50-0199-11d2-815b-006008119d7a */ \
|
||||
0xf287dd50, \
|
||||
0x0199, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
#endif // !NEW_PLUGIN_STREAM_API
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPluginStream_h___ */
|
||||
110
mozilla/modules/plugin/base/public/nsIPluginStreamListener.h
Normal file
110
mozilla/modules/plugin/base/public/nsIPluginStreamListener.h
Normal file
@@ -0,0 +1,110 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPluginStreamListener_h___
|
||||
#define nsIPluginStreamListener_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
#include "nsISupports.h"
|
||||
|
||||
class nsIPluginInputStream;
|
||||
|
||||
struct nsPluginStreamInfo {
|
||||
nsMIMEType contentType;
|
||||
PRBool seekable;
|
||||
// more...
|
||||
};
|
||||
|
||||
/**
|
||||
* The nsIPluginStreamListener interface defines the minimum set of functionality that
|
||||
* the browser will support if it allows plugins. Plugins can call QueryInterface
|
||||
* to determine if a plugin manager implements more specific APIs or other
|
||||
* browser interfaces for the plugin to use (e.g. nsINetworkManager).
|
||||
*/
|
||||
class nsIPluginStreamListener : public nsISupports {
|
||||
public:
|
||||
|
||||
/**
|
||||
* Notify the observer that the URL has started to load. This method is
|
||||
* called only once, at the beginning of a URL load.<BR><BR>
|
||||
*
|
||||
* @return The return value is currently ignored. In the future it may be
|
||||
* used to cancel the URL load..
|
||||
*/
|
||||
NS_IMETHOD
|
||||
OnStartBinding(const char* url, const nsPluginStreamInfo* info) = 0;
|
||||
|
||||
/**
|
||||
* Notify the client that data is available in the input stream. This
|
||||
* method is called whenver data is written into the input stream by the
|
||||
* networking library...<BR><BR>
|
||||
*
|
||||
* @param aIStream The input stream containing the data. This stream can
|
||||
* be either a blocking or non-blocking stream.
|
||||
* @param length The amount of data that was just pushed into the stream.
|
||||
* @return The return value is currently ignored.
|
||||
*/
|
||||
NS_IMETHOD
|
||||
OnDataAvailable(const char* url, nsIPluginInputStream* input,
|
||||
PRUint32 offset, PRUint32 length) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
OnFileAvailable(const char* url, const char* fileName) = 0;
|
||||
|
||||
/**
|
||||
* Notify the observer that the URL has finished loading. This method is
|
||||
* called once when the networking library has finished processing the
|
||||
* URL transaction initiatied via the nsINetService::Open(...) call.<BR><BR>
|
||||
*
|
||||
* This method is called regardless of whether the URL loaded successfully.<BR><BR>
|
||||
*
|
||||
* @param status Status code for the URL load.
|
||||
* @param msg A text string describing the error.
|
||||
* @return The return value is currently ignored.
|
||||
*/
|
||||
NS_IMETHOD
|
||||
OnStopBinding(const char* url, nsresult status) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IPLUGINSTREAMLISTENER_IID \
|
||||
{ /* df055770-5448-11d2-8164-006008119d7a */ \
|
||||
0xdf055770, \
|
||||
0x5448, \
|
||||
0x11d2, \
|
||||
{0x81, 0x64, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPluginStreamListener_h___ */
|
||||
89
mozilla/modules/plugin/base/public/nsIPluginStreamPeer.h
Normal file
89
mozilla/modules/plugin/base/public/nsIPluginStreamPeer.h
Normal file
@@ -0,0 +1,89 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPluginStreamPeer_h___
|
||||
#define nsIPluginStreamPeer_h___
|
||||
|
||||
#ifndef NEW_PLUGIN_STREAM_API
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
#include "nsISupports.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Plugin Stream Peer Interface
|
||||
// A plugin stream peer is passed to a plugin instance's NewStream call in
|
||||
// order to indicate that a new stream is to be created and be read by the
|
||||
// plugin instance.
|
||||
|
||||
class nsIPluginStreamPeer : public nsISupports {
|
||||
public:
|
||||
|
||||
// (Corresponds to NPStream's url field.)
|
||||
NS_IMETHOD
|
||||
GetURL(const char* *result) = 0;
|
||||
|
||||
// (Corresponds to NPStream's end field.)
|
||||
NS_IMETHOD
|
||||
GetEnd(PRUint32 *result) = 0;
|
||||
|
||||
// (Corresponds to NPStream's lastmodified field.)
|
||||
NS_IMETHOD
|
||||
GetLastModified(PRUint32 *result) = 0;
|
||||
|
||||
// (Corresponds to NPStream's notifyData field.)
|
||||
NS_IMETHOD
|
||||
GetNotifyData(void* *result) = 0;
|
||||
|
||||
// (Corresponds to NPP_DestroyStream's reason argument.)
|
||||
NS_IMETHOD
|
||||
GetReason(nsPluginReason *result) = 0;
|
||||
|
||||
// (Corresponds to NPP_NewStream's MIMEType argument.)
|
||||
NS_IMETHOD
|
||||
GetMIMEType(nsMIMEType *result) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IPLUGINSTREAMPEER_IID \
|
||||
{ /* 717b1e90-019b-11d2-815b-006008119d7a */ \
|
||||
0x717b1e90, \
|
||||
0x019b, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
#endif // !NEW_PLUGIN_STREAM_API
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPluginStreamPeer_h___ */
|
||||
74
mozilla/modules/plugin/base/public/nsIPluginStreamPeer2.h
Normal file
74
mozilla/modules/plugin/base/public/nsIPluginStreamPeer2.h
Normal file
@@ -0,0 +1,74 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPluginStreamPeer2_h___
|
||||
#define nsIPluginStreamPeer2_h___
|
||||
|
||||
#ifndef NEW_PLUGIN_STREAM_API
|
||||
|
||||
#include "nsIPluginStreamPeer.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Plugin Stream Peer Interface
|
||||
// These extensions to nsIPluginStreamPeer are only available in Communicator 5.0.
|
||||
|
||||
class nsIPluginStreamPeer2 : public nsIPluginStreamPeer {
|
||||
public:
|
||||
|
||||
NS_IMETHOD
|
||||
GetContentLength(PRUint32 *result) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
GetHeaderFieldCount(PRUint32 *result) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
GetHeaderFieldKey(PRUint32 index, const char* *result) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
GetHeaderField(PRUint32 index, const char* *result) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IPLUGINSTREAMPEER2_IID \
|
||||
{ /* 77083af0-019b-11d2-815b-006008119d7a */ \
|
||||
0x77083af0, \
|
||||
0x019b, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
#endif // !NEW_PLUGIN_STREAM_API
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPluginStreamPeer2_h___ */
|
||||
82
mozilla/modules/plugin/base/public/nsIPluginTagInfo.h
Normal file
82
mozilla/modules/plugin/base/public/nsIPluginTagInfo.h
Normal file
@@ -0,0 +1,82 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPluginTagInfo_h___
|
||||
#define nsIPluginTagInfo_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
#include "nsISupports.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Plugin Tag Info Interface
|
||||
// This interface provides information about the HTML tag on the page.
|
||||
// Some day this might get superseded by a DOM API.
|
||||
|
||||
class nsIPluginTagInfo : public nsISupports {
|
||||
public:
|
||||
|
||||
// QueryInterface on nsIPluginInstancePeer to get this.
|
||||
|
||||
// (Corresponds to NPP_New's argc, argn, and argv arguments.)
|
||||
// Get a ptr to the paired list of attribute names and values,
|
||||
// returns the length of the array.
|
||||
//
|
||||
// Each name or value is a null-terminated string.
|
||||
NS_IMETHOD
|
||||
GetAttributes(PRUint16& n, const char*const*& names, const char*const*& values) = 0;
|
||||
|
||||
/**
|
||||
* Gets the value for the named attribute.
|
||||
*
|
||||
* @param name - the name of the attribute to find
|
||||
* @param result - the resulting attribute
|
||||
* @result - NS_OK if this operation was successful, NS_ERROR_FAILURE if
|
||||
* this operation failed. result is set to NULL if the attribute is not found
|
||||
* else to the found value.
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetAttribute(const char* name, const char* *result) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IPLUGINTAGINFO_IID \
|
||||
{ /* 5f1ec1d0-019b-11d2-815b-006008119d7a */ \
|
||||
0x5f1ec1d0, \
|
||||
0x019b, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPluginTagInfo_h___ */
|
||||
120
mozilla/modules/plugin/base/public/nsIPluginTagInfo2.h
Normal file
120
mozilla/modules/plugin/base/public/nsIPluginTagInfo2.h
Normal file
@@ -0,0 +1,120 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPluginTagInfo2_h___
|
||||
#define nsIPluginTagInfo2_h___
|
||||
|
||||
#include "nsIPluginTagInfo.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Plugin Tag Info Interface
|
||||
// These extensions to nsIPluginTagInfo are only available in Communicator 5.0.
|
||||
|
||||
enum nsPluginTagType {
|
||||
nsPluginTagType_Unknown,
|
||||
nsPluginTagType_Embed,
|
||||
nsPluginTagType_Object,
|
||||
nsPluginTagType_Applet
|
||||
};
|
||||
|
||||
class nsIPluginTagInfo2 : public nsIPluginTagInfo {
|
||||
public:
|
||||
|
||||
// QueryInterface on nsIPluginInstancePeer to get this.
|
||||
|
||||
// Get the type of the HTML tag that was used ot instantiate this
|
||||
// plugin. Currently supported tags are EMBED, OBJECT and APPLET.
|
||||
NS_IMETHOD
|
||||
GetTagType(nsPluginTagType *result) = 0;
|
||||
|
||||
// Get the complete text of the HTML tag that was
|
||||
// used to instantiate this plugin
|
||||
NS_IMETHOD
|
||||
GetTagText(const char* *result) = 0;
|
||||
|
||||
// Get a ptr to the paired list of parameter names and values,
|
||||
// returns the length of the array.
|
||||
//
|
||||
// Each name or value is a null-terminated string.
|
||||
NS_IMETHOD
|
||||
GetParameters(PRUint16& n, const char*const*& names, const char*const*& values) = 0;
|
||||
|
||||
// Get the value for the named parameter. Returns null
|
||||
// if the parameter was not set.
|
||||
// @result - NS_OK if this operation was successful, NS_ERROR_FAILURE if
|
||||
// this operation failed. result is set to NULL if the attribute is not found
|
||||
// else to the found value.
|
||||
NS_IMETHOD
|
||||
GetParameter(const char* name, const char* *result) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
GetDocumentBase(const char* *result) = 0;
|
||||
|
||||
// Return an encoding whose name is specified in:
|
||||
// http://java.sun.com/products/jdk/1.1/docs/guide/intl/intl.doc.html#25303
|
||||
NS_IMETHOD
|
||||
GetDocumentEncoding(const char* *result) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
GetAlignment(const char* *result) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
GetWidth(PRUint32 *result) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
GetHeight(PRUint32 *result) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
GetBorderVertSpace(PRUint32 *result) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
GetBorderHorizSpace(PRUint32 *result) = 0;
|
||||
|
||||
// Returns a unique id for the current document on which the
|
||||
// plugin is displayed.
|
||||
NS_IMETHOD
|
||||
GetUniqueID(PRUint32 *result) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IPLUGINTAGINFO2_IID \
|
||||
{ /* 6a49c9a0-019b-11d2-815b-006008119d7a */ \
|
||||
0x6a49c9a0, \
|
||||
0x019b, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPluginTagInfo2_h___ */
|
||||
@@ -0,0 +1,72 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsISeekablePluginStreamPeer_h___
|
||||
#define nsISeekablePluginStreamPeer_h___
|
||||
|
||||
#ifndef NEW_PLUGIN_STREAM_API
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
#include "nsISupports.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Seekable Plugin Stream Peer Interface
|
||||
// The browser implements this subclass of plugin stream peer if a stream
|
||||
// is seekable. Plugins can query interface for this type, and call the
|
||||
// RequestRead method to seek to a particular position in the stream.
|
||||
|
||||
class nsISeekablePluginStreamPeer : public nsISupports {
|
||||
public:
|
||||
|
||||
// QueryInterface for this class corresponds to NPP_NewStream's
|
||||
// seekable argument.
|
||||
|
||||
// (Corresponds to NPN_RequestRead.)
|
||||
NS_IMETHOD
|
||||
RequestRead(nsByteRange* rangeList) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_ISEEKABLEPLUGINSTREAMPEER_IID \
|
||||
{ /* 7e028d20-019b-11d2-815b-006008119d7a */ \
|
||||
0x7e028d20, \
|
||||
0x019b, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
#endif // !NEW_PLUGIN_STREAM_API
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsISeekablePluginStreamPeer_h___ */
|
||||
@@ -0,0 +1,70 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIWindowlessPluginInstancePeer_h___
|
||||
#define nsIWindowlessPluginInstancePeer_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
#include "nsISupports.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Windowless Plugin Instance Peer Interface
|
||||
|
||||
class nsIWindowlessPluginInstancePeer : public nsISupports {
|
||||
public:
|
||||
|
||||
// (Corresponds to NPN_InvalidateRect.)
|
||||
NS_IMETHOD
|
||||
InvalidateRect(nsPluginRect *invalidRect) = 0;
|
||||
|
||||
// (Corresponds to NPN_InvalidateRegion.)
|
||||
NS_IMETHOD
|
||||
InvalidateRegion(nsPluginRegion invalidRegion) = 0;
|
||||
|
||||
// (Corresponds to NPN_ForceRedraw.)
|
||||
NS_IMETHOD
|
||||
ForceRedraw(void) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IWINDOWLESSPLUGININSTANCEPEER_IID \
|
||||
{ /* 57b4e2f0-019b-11d2-815b-006008119d7a */ \
|
||||
0x57b4e2f0, \
|
||||
0x019b, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIWindowlessPluginInstancePeer_h___ */
|
||||
264
mozilla/modules/plugin/base/public/nsplugin.h
Normal file
264
mozilla/modules/plugin/base/public/nsplugin.h
Normal file
@@ -0,0 +1,264 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>This is the master header file that includes most of the other headers
|
||||
* you'll need to write a plugin.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* The following diagram depicts the relationships between various objects
|
||||
* implementing the new plugin interfaces. QueryInterface can be used to switch
|
||||
* between interfaces in the same box:
|
||||
*
|
||||
*
|
||||
* the plugin (only 1)
|
||||
* +----------------------+
|
||||
* | nsIPlugin or |<- - - - - -NSGetFactory()
|
||||
* | nsILiveConnectPlugin |
|
||||
* +----------------------+
|
||||
* |
|
||||
* |
|
||||
* | instances (many) streams to receive URL data (many)
|
||||
* | +-------------------+ +-----------------+
|
||||
* | | nsIPluginInstance |+ | nsIPluginStream |+
|
||||
* | | || | ||
|
||||
* | +-------------------+| +-----------------+|
|
||||
* | +------|-----------+ +------|---------+
|
||||
* | | |
|
||||
* | PLUGIN SIDE |peer |peer
|
||||
*~~~~|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~
|
||||
* | BROWSER SIDE | |
|
||||
* | v v
|
||||
* | +---------------------------------+ +----------------------------+
|
||||
* | | nsIPluginInstancePeer |+ | nsIPluginStreamPeer |+
|
||||
* | | nsIWindowlessPluginInstancePeer || | nsISeekablePluginStreamPeer||
|
||||
* | | nsILiveConnectPluginInstancePeer|| | nsIPluginstreamPeer2 ||
|
||||
* | | nsIPluginTagInfo || +----------------------------+|
|
||||
* | | nsIPluginTagInfo2 || +---------------------------+
|
||||
* | +---------------------------------+|
|
||||
* | +--------------------------------+
|
||||
* |
|
||||
* |
|
||||
* v the browser (only 1)
|
||||
* +---------------------+
|
||||
* | nsIPluginManager |
|
||||
* | nsIPluginManager2 |
|
||||
* | nsIFileUtilities |
|
||||
* | nsIPref |
|
||||
* | nsICacheManager ... |
|
||||
* +---------------------+
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef nsplugins_h___
|
||||
#define nsplugins_h___
|
||||
|
||||
#include "nsRepository.h" // for NSGetFactory
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>Interfaces which must be implemented by a plugin</B>
|
||||
* These interfaces have NPP equivalents in pre-5.0 browsers (see npapi.h).
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* NSGetFactory is the main entry point to the plugin's DLL. The plugin manager
|
||||
* finds this symbol and calls it to create the plugin class. Once the plugin
|
||||
* object is returned to the plugin manager, instances on the page are created
|
||||
* by calling nsIPlugin::CreateInstance.
|
||||
*/
|
||||
// (Declared in nsRepository.h)
|
||||
//extern "C" NS_EXPORT nsresult NSGetFactory(const nsCID &aClass,
|
||||
// nsIFactory **aFactory);
|
||||
|
||||
/**
|
||||
* A plugin object is used to create new plugin instances. It manages the
|
||||
* global state of all plugins with the same implementation.
|
||||
*/
|
||||
#include "nsIPlugin.h"
|
||||
|
||||
/**
|
||||
* A plugin instance represents a particular activation of a plugin on a page.
|
||||
*/
|
||||
#include "nsIPluginInstance.h"
|
||||
|
||||
#ifdef NEW_PLUGIN_STREAM_API
|
||||
|
||||
/**
|
||||
* A plugin stream listener ...
|
||||
*/
|
||||
#include "nsIPluginStreamListener.h"
|
||||
|
||||
#else // !NEW_PLUGIN_STREAM_API
|
||||
|
||||
/**
|
||||
* A plugin stream gets instantiated when a plugin instance receives data from
|
||||
* the browser.
|
||||
*/
|
||||
#include "nsIPluginStream.h"
|
||||
|
||||
#endif // !NEW_PLUGIN_STREAM_API
|
||||
|
||||
/**
|
||||
* The nsILiveConnectPlugin interface provides additional operations that a
|
||||
* plugin must implement if it is to be controlled by JavaScript through
|
||||
* LiveConnect.
|
||||
*
|
||||
* Note that this interface is part of a new JNI-based LiveConnect
|
||||
* implementation and superceeds that provided prior to Communicator 5.0.
|
||||
*/
|
||||
#include "nsILiveConnectPlugin.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>Interfaces implemented by the browser:
|
||||
* These interfaces have NPN equivalents in pre-5.0 browsers (see npapi.h).
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* The plugin manager which is the main point of interaction with the browser
|
||||
* and provides general operations needed by a plugin.
|
||||
*/
|
||||
#include "nsIPluginManager.h"
|
||||
|
||||
/**
|
||||
* A plugin instance peer gets created by the browser and associated with each
|
||||
* plugin instance to represent tag information and other callbacks needed by
|
||||
* the plugin instance.
|
||||
*/
|
||||
#include "nsIPluginInstancePeer.h"
|
||||
|
||||
/**
|
||||
* The nsIPluginTagInfo interface provides information about the html tag
|
||||
* that was used to instantiate the plugin instance.
|
||||
*
|
||||
* To obtain: QueryInterface on nsIPluginInstancePeer
|
||||
*/
|
||||
#include "nsIPluginTagInfo.h"
|
||||
|
||||
/**
|
||||
* The nsIWindowlessPluginInstancePeer provides additional operations for
|
||||
* windowless plugins.
|
||||
*
|
||||
* To obtain: QueryInterface on nsIPluginInstancePeer
|
||||
*/
|
||||
#include "nsIWindowlessPlugInstPeer.h"
|
||||
|
||||
#ifdef NEW_PLUGIN_STREAM_API
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
#include "nsIPluginInputStream.h"
|
||||
|
||||
#else // !NEW_PLUGIN_STREAM_API
|
||||
|
||||
/**
|
||||
* A plugin stream peer gets create by the browser and associated with each
|
||||
* plugin stream to represent stream and URL information, and provides
|
||||
* other callbacks needed by the plugin stream.
|
||||
*/
|
||||
#include "nsIPluginStreamPeer.h"
|
||||
|
||||
/**
|
||||
* The nsISeekablePluginStreamPeer provides additional operations for seekable
|
||||
* plugin streams.
|
||||
*
|
||||
* To obtain: QueryInterface on nsIPluginStreamPeer
|
||||
*/
|
||||
#include "nsISeekablePluginStreamPeer.h"
|
||||
|
||||
#endif // !NEW_PLUGIN_STREAM_API
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>Interfaces implemented by the browser (new for 5.0):
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* The nsIPluginManager2 interface provides additional plugin manager features
|
||||
* only available in Communicator 5.0.
|
||||
*
|
||||
* To obtain: QueryInterface on nsIPluginManager
|
||||
*/
|
||||
#include "nsIPluginManager2.h"
|
||||
|
||||
/**
|
||||
* The nsIFileUtilities interface provides operations to manage temporary
|
||||
* files and directories.
|
||||
*
|
||||
* To obtain: QueryInterface on nsIPluginManager
|
||||
*/
|
||||
#include "nsIFileUtilities.h"
|
||||
|
||||
/**
|
||||
* The nsILiveConnectPluginInstancePeer allows plugins to be manipulated
|
||||
* by JavaScript, providing basic scriptability.
|
||||
*
|
||||
* Note that this interface is part of a new JNI-based LiveConnect
|
||||
* implementation and superceeds that provided prior to Communicator 5.0.
|
||||
*
|
||||
* To obtain: QueryInterface on nsIPluginInstancePeer
|
||||
*/
|
||||
#include "nsILiveConnectPlugInstPeer.h"
|
||||
|
||||
#ifdef NEW_PLUGIN_STREAM_API
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
#include "nsIPluginInputStream2.h"
|
||||
|
||||
#else // !NEW_PLUGIN_STREAM_API
|
||||
|
||||
/**
|
||||
* The nsIPluginStreamPeer2 interface provides additional plugin stream
|
||||
* peer features only available in Communicator 5.0.
|
||||
*
|
||||
* To obtain: QueryInterface on nsIPluginStreamPeer
|
||||
*/
|
||||
#include "nsIPluginStreamPeer2.h"
|
||||
|
||||
#endif // !NEW_PLUGIN_STREAM_API
|
||||
|
||||
/**
|
||||
* The nsIPluginTagInfo2 interface provides additional html tag information
|
||||
* only available in Communicator 5.0.
|
||||
*
|
||||
* To obtain: QueryInterface on nsIPluginTagInfo
|
||||
*/
|
||||
#include "nsIPluginTagInfo2.h"
|
||||
|
||||
#include "nsIOutputStream.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#endif // nsplugins_h___
|
||||
383
mozilla/modules/plugin/base/public/nsplugindefs.h
Normal file
383
mozilla/modules/plugin/base/public/nsplugindefs.h
Normal file
@@ -0,0 +1,383 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsplugindefs_h___
|
||||
#define nsplugindefs_h___
|
||||
|
||||
#ifndef prtypes_h___
|
||||
#include "prtypes.h"
|
||||
#endif
|
||||
|
||||
#ifdef __OS2__
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
#ifdef XP_MAC
|
||||
# include <Quickdraw.h>
|
||||
# include <Events.h>
|
||||
# include <MacWindows.h>
|
||||
#endif
|
||||
|
||||
#if defined(XP_UNIX) && !defined(NO_X11)
|
||||
# include <X11/Xlib.h>
|
||||
# include <X11/Xutil.h>
|
||||
#endif
|
||||
|
||||
#ifdef XP_PC
|
||||
# include <windef.h>
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/* The OS/2 version of Netscape uses RC_DATA to define the
|
||||
mime types, file extentions, etc that are required.
|
||||
Use a vertical bar to seperate types, end types with \0.
|
||||
FileVersion and ProductVersion are 32bit ints, all other
|
||||
entries are strings the MUST be terminated wwith a \0.
|
||||
|
||||
AN EXAMPLE:
|
||||
|
||||
RCDATA NS_INFO_ProductVersion { 1,0,0,1,}
|
||||
|
||||
RCDATA NS_INFO_MIMEType { "video/x-video|",
|
||||
"video/x-flick\0" }
|
||||
RCDATA NS_INFO_FileExtents { "avi|",
|
||||
"flc\0" }
|
||||
RCDATA NS_INFO_FileOpenName{ "MMOS2 video player(*.avi)|",
|
||||
"MMOS2 Flc/Fli player(*.flc)\0" }
|
||||
|
||||
RCDATA NS_INFO_FileVersion { 1,0,0,1 }
|
||||
RCDATA NS_INFO_CompanyName { "Netscape Communications\0" }
|
||||
RCDATA NS_INFO_FileDescription { "NPAVI32 Extension DLL\0"
|
||||
RCDATA NS_INFO_InternalName { "NPAVI32\0" )
|
||||
RCDATA NS_INFO_LegalCopyright { "Copyright Netscape Communications \251 1996\0"
|
||||
RCDATA NS_INFO_OriginalFilename { "NVAPI32.DLL" }
|
||||
RCDATA NS_INFO_ProductName { "NPAVI32 Dynamic Link Library\0" }
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/* RC_DATA types for version info - required */
|
||||
#define NS_INFO_ProductVersion 1
|
||||
#define NS_INFO_MIMEType 2
|
||||
#define NS_INFO_FileOpenName 3
|
||||
#define NS_INFO_FileExtents 4
|
||||
|
||||
/* RC_DATA types for version info - used if found */
|
||||
#define NS_INFO_FileDescription 5
|
||||
#define NS_INFO_ProductName 6
|
||||
|
||||
/* RC_DATA types for version info - optional */
|
||||
#define NS_INFO_CompanyName 7
|
||||
#define NS_INFO_FileVersion 8
|
||||
#define NS_INFO_InternalName 9
|
||||
#define NS_INFO_LegalCopyright 10
|
||||
#define NS_INFO_OriginalFilename 11
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Structures and definitions
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
|
||||
typedef const char* nsMIMEType;
|
||||
|
||||
struct nsByteRange {
|
||||
PRInt32 offset; /* negative offset means from the end */
|
||||
PRUint32 length;
|
||||
struct nsByteRange* next;
|
||||
};
|
||||
|
||||
struct nsPluginRect {
|
||||
PRUint16 top;
|
||||
PRUint16 left;
|
||||
PRUint16 bottom;
|
||||
PRUint16 right;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Unix specific structures and definitions
|
||||
|
||||
#ifdef XP_UNIX
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
* Callback Structures.
|
||||
*
|
||||
* These are used to pass additional platform specific information.
|
||||
*/
|
||||
enum nsPluginCallbackType {
|
||||
nsPluginCallbackType_SetWindow = 1,
|
||||
nsPluginCallbackType_Print
|
||||
};
|
||||
|
||||
struct nsPluginAnyCallbackStruct {
|
||||
PRInt32 type;
|
||||
};
|
||||
|
||||
#ifndef NO_X11
|
||||
struct nsPluginSetWindowCallbackStruct {
|
||||
PRInt32 type;
|
||||
Display* display;
|
||||
Visual* visual;
|
||||
Colormap colormap;
|
||||
PRUint32 depth;
|
||||
};
|
||||
#else
|
||||
struct nsPluginSetWindowCallbackStruct {
|
||||
PRInt32 type;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
struct nsPluginPrintCallbackStruct {
|
||||
PRInt32 type;
|
||||
FILE* fp;
|
||||
};
|
||||
|
||||
#endif /* XP_UNIX */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// List of variables which should be implmented by the plugin
|
||||
enum nsPluginVariable {
|
||||
nsPluginVariable_NameString = 1,
|
||||
nsPluginVariable_DescriptionString = 2
|
||||
};
|
||||
|
||||
enum nsPluginManagerVariable {
|
||||
nsPluginManagerVariable_XDisplay = 1,
|
||||
nsPluginManagerVariable_XtAppContext = 2
|
||||
};
|
||||
|
||||
enum nsPluginInstancePeerVariable {
|
||||
nsPluginInstancePeerVariable_NetscapeWindow = 3
|
||||
// nsPluginInstancePeerVariable_JavaClass = 5,
|
||||
// nsPluginInstancePeerVariable_TimerInterval = 7
|
||||
};
|
||||
|
||||
enum nsPluginInstanceVariable {
|
||||
nsPluginInstanceVariable_WindowlessBool = 3,
|
||||
nsPluginInstanceVariable_TransparentBool = 4
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
enum nsPluginMode {
|
||||
nsPluginMode_Embedded = 1,
|
||||
nsPluginMode_Full
|
||||
};
|
||||
|
||||
// XXX this can go away now
|
||||
enum nsPluginStreamType {
|
||||
nsPluginStreamType_Normal = 1,
|
||||
nsPluginStreamType_Seek,
|
||||
nsPluginStreamType_AsFile,
|
||||
nsPluginStreamType_AsFileOnly
|
||||
};
|
||||
|
||||
/*
|
||||
* The type of a nsPluginWindow - it specifies the type of the data structure
|
||||
* returned in the window field.
|
||||
*/
|
||||
enum nsPluginWindowType {
|
||||
nsPluginWindowType_Window = 1,
|
||||
nsPluginWindowType_Drawable
|
||||
};
|
||||
|
||||
#ifdef XP_MAC
|
||||
|
||||
struct nsPluginPort {
|
||||
CGrafPtr port; /* Grafport */
|
||||
PRInt32 portx; /* position inside the topmost window */
|
||||
PRInt32 porty;
|
||||
};
|
||||
typedef RgnHandle nsPluginRegion;
|
||||
typedef WindowRef nsPluginPlatformWindowRef;
|
||||
|
||||
#elif defined(XP_PC)
|
||||
|
||||
struct nsPluginPort;
|
||||
typedef HRGN nsPluginRegion;
|
||||
typedef HWND nsPluginPlatformWindowRef;
|
||||
|
||||
#elif defined(XP_UNIX) && !defined(NO_X11)
|
||||
|
||||
struct nsPluginPort;
|
||||
typedef Region nsPluginRegion;
|
||||
typedef Drawable nsPluginPlatformWindowRef;
|
||||
|
||||
#else
|
||||
|
||||
struct nsPluginPort;
|
||||
typedef void* nsPluginRegion;
|
||||
typedef void* nsPluginPlatformWindowRef;
|
||||
|
||||
#endif
|
||||
|
||||
struct nsPluginWindow {
|
||||
nsPluginPort* window; /* Platform specific window handle */
|
||||
/* OS/2: x - Position of bottom left corner */
|
||||
/* OS/2: y - relative to visible netscape window */
|
||||
PRUint32 x; /* Position of top left corner relative */
|
||||
PRUint32 y; /* to a netscape page. */
|
||||
PRUint32 width; /* Maximum window size */
|
||||
PRUint32 height;
|
||||
nsPluginRect clipRect; /* Clipping rectangle in port coordinates */
|
||||
/* Used by MAC only. */
|
||||
#ifdef XP_UNIX
|
||||
void* ws_info; /* Platform-dependent additonal data */
|
||||
#endif /* XP_UNIX */
|
||||
nsPluginWindowType type; /* Is this a window or a drawable? */
|
||||
};
|
||||
|
||||
struct nsPluginFullPrint {
|
||||
PRBool pluginPrinted; /* Set TRUE if plugin handled fullscreen */
|
||||
/* printing */
|
||||
PRBool printOne; /* TRUE if plugin should print one copy */
|
||||
/* to default printer */
|
||||
void* platformPrint; /* Platform-specific printing info */
|
||||
};
|
||||
|
||||
struct nsPluginEmbedPrint {
|
||||
nsPluginWindow window;
|
||||
void* platformPrint; /* Platform-specific printing info */
|
||||
};
|
||||
|
||||
struct nsPluginPrint {
|
||||
nsPluginMode mode; /* nsPluginMode_Full or nsPluginMode_Embedded */
|
||||
union
|
||||
{
|
||||
nsPluginFullPrint fullPrint; /* if mode is nsPluginMode_Full */
|
||||
nsPluginEmbedPrint embedPrint; /* if mode is nsPluginMode_Embedded */
|
||||
} print;
|
||||
};
|
||||
|
||||
struct nsPluginEvent {
|
||||
|
||||
#if defined(XP_MAC)
|
||||
EventRecord* event;
|
||||
nsPluginPlatformWindowRef window;
|
||||
|
||||
#elif defined(XP_PC)
|
||||
uint16 event;
|
||||
uint32 wParam;
|
||||
uint32 lParam;
|
||||
|
||||
#elif defined(XP_OS2)
|
||||
uint32 event;
|
||||
uint32 wParam;
|
||||
uint32 lParam;
|
||||
|
||||
#elif defined(XP_UNIX) && !defined(NO_X11)
|
||||
XEvent event;
|
||||
#else
|
||||
void *event;
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
* Non-standard event types that can be passed to HandleEvent
|
||||
*/
|
||||
enum nsPluginEventType {
|
||||
#ifdef XP_MAC
|
||||
nsPluginEventType_GetFocusEvent = (osEvt + 16),
|
||||
nsPluginEventType_LoseFocusEvent = (osEvt + 17),
|
||||
nsPluginEventType_AdjustCursorEvent = (osEvt + 18),
|
||||
nsPluginEventType_MenuCommandEvent = (osEvt + 19),
|
||||
#endif /* XP_MAC */
|
||||
nsPluginEventType_Idle = 0
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
enum nsPluginReason {
|
||||
nsPluginReason_Base = 0,
|
||||
nsPluginReason_Done = 0,
|
||||
nsPluginReason_NetworkErr,
|
||||
nsPluginReason_UserBreak,
|
||||
nsPluginReason_NoReason
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Version Numbers for Structs
|
||||
|
||||
// These version number are for structures whose fields may evolve over time.
|
||||
// When fields are added to the end of the struct, the minor version will be
|
||||
// incremented. When the struct changes in an incompatible way the major version
|
||||
// will be incremented.
|
||||
|
||||
#define nsMajorVersion(v) (((PRInt32)(v) >> 16) & 0xffff)
|
||||
#define nsMinorVersion(v) ((PRInt32)(v) & 0xffff)
|
||||
|
||||
#define nsVersionOK(suppliedV, requiredV) \
|
||||
(nsMajorVersion(suppliedV) == nsMajorVersion(requiredV) \
|
||||
&& nsMinorVersion(suppliedV) >= nsMinorVersion(requiredV))
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Classes
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Classes that must be implemented by the plugin DLL:
|
||||
struct nsIPlugin; // plugin class (MIME-type handler)
|
||||
class nsILiveConnectPlugin; // subclass of nsIPlugin
|
||||
class nsIEventHandler; // event handler interface
|
||||
class nsIPluginInstance; // plugin instance
|
||||
class nsIPluginStream; // stream to receive data from the browser
|
||||
|
||||
// Classes that are implemented by the browser:
|
||||
class nsIPluginManager; // minimum browser requirements
|
||||
class nsIFileUtilities; // file utilities (accessible from nsIPluginManager)
|
||||
class nsIPluginInstancePeer; // parts of nsIPluginInstance implemented by the browser
|
||||
class nsIWindowlessPluginInstancePeer; // subclass of nsIPluginInstancePeer for windowless plugins
|
||||
class nsIPluginTagInfo; // describes html tag (accessible from nsIPluginInstancePeer)
|
||||
class nsILiveConnectPluginInstancePeer; // subclass of nsIPluginInstancePeer
|
||||
class nsIPluginStreamPeer; // parts of nsIPluginStream implemented by the browser
|
||||
class nsISeekablePluginStreamPeer; // seekable subclass of nsIPluginStreamPeer
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
#endif /* RC_INVOKED */
|
||||
#ifdef __OS2__
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
||||
#endif // nsplugindefs_h___
|
||||
24
mozilla/modules/plugin/base/src/MANIFEST
Normal file
24
mozilla/modules/plugin/base/src/MANIFEST
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist directory
|
||||
#
|
||||
|
||||
nsPluginsCID.h
|
||||
nsIPluginHost.h
|
||||
nsIPluginInstanceOwner.h
|
||||
50
mozilla/modules/plugin/base/src/Makefile
Normal file
50
mozilla/modules/plugin/base/src/Makefile
Normal file
@@ -0,0 +1,50 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH=../../..
|
||||
|
||||
include $(DEPTH)/config/config.mk
|
||||
|
||||
MODULE=raptor
|
||||
|
||||
LIBRARY_NAME=raptorplugin
|
||||
|
||||
EXPORTS = \
|
||||
nsPluginsCID.h \
|
||||
nsIPluginHost.h \
|
||||
nsIPluginInstanceOwner.h
|
||||
|
||||
CPPSRCS = \
|
||||
nsPluginHostImpl.cpp \
|
||||
nsPluginFactory.cpp \
|
||||
ns4xPlugin.cpp \
|
||||
ns4xPluginInstance.cpp \
|
||||
ns4xPluginStream.cpp \
|
||||
nsPluginInstancePeer.cpp \
|
||||
nsPluginStreamPeer.cpp \
|
||||
nsMalloc.cpp \
|
||||
$(NULL)
|
||||
|
||||
REQUIRES = raptor plugin java xpcom netlib libplc21
|
||||
|
||||
LCFLAGS =-D_IMPL_NS_PLUGIN
|
||||
|
||||
TARGETS = $(LIBRARY)
|
||||
|
||||
INCLUDES += -I.
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
||||
57
mozilla/modules/plugin/base/src/Makefile.in
Normal file
57
mozilla/modules/plugin/base/src/Makefile.in
Normal file
@@ -0,0 +1,57 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH=../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
MODULE=raptor
|
||||
|
||||
LIBRARY_NAME=raptorplugin
|
||||
|
||||
EXPORTS = \
|
||||
nsPluginsCID.h \
|
||||
nsIPluginHost.h \
|
||||
nsIPluginInstanceOwner.h
|
||||
|
||||
EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))
|
||||
|
||||
CPPSRCS = \
|
||||
nsPluginHostImpl.cpp \
|
||||
nsPluginFactory.cpp \
|
||||
ns4xPlugin.cpp \
|
||||
ns4xPluginInstance.cpp \
|
||||
ns4xPluginStream.cpp \
|
||||
nsPluginInstancePeer.cpp \
|
||||
nsPluginStreamPeer.cpp \
|
||||
nsMalloc.cpp \
|
||||
$(NULL)
|
||||
|
||||
REQUIRES = raptor plugin java xpcom netlib libplc21
|
||||
|
||||
LCFLAGS =-D_IMPL_NS_PLUGIN
|
||||
|
||||
TARGETS = $(LIBRARY)
|
||||
|
||||
INCLUDES += -I$(srcdir)/
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
80
mozilla/modules/plugin/base/src/makefile.win
Normal file
80
mozilla/modules/plugin/base/src/makefile.win
Normal file
@@ -0,0 +1,80 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH=..\..\..
|
||||
IGNORE_MANIFEST=1
|
||||
|
||||
EXPORTS = \
|
||||
nsPluginsCID.h \
|
||||
nsIPluginHost.h \
|
||||
nsIPluginInstanceOwner.h
|
||||
|
||||
MAKE_OBJ_TYPE = DLL
|
||||
DLLNAME = raptorplugin
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
MISCDEP = $(OURLIBS)
|
||||
|
||||
MODULE=raptor
|
||||
|
||||
DEFINES =-D_IMPL_NS_PLUGIN -DWIN32_LEAN_AND_MEAN
|
||||
|
||||
OBJS = \
|
||||
.\$(OBJDIR)\nsPluginHostImpl.obj \
|
||||
.\$(OBJDIR)\nsPluginFactory.obj \
|
||||
.\$(OBJDIR)\ns4xPlugin.obj \
|
||||
.\$(OBJDIR)\ns4xPluginInstance.obj \
|
||||
.\$(OBJDIR)\ns4xPluginStream.obj \
|
||||
.\$(OBJDIR)\nsPluginInstancePeer.obj \
|
||||
.\$(OBJDIR)\nsPluginStreamPeer.obj \
|
||||
.\$(OBJDIR)\nsMalloc.obj \
|
||||
$(NULL)
|
||||
|
||||
LINCS= \
|
||||
-I$(PUBLIC)\raptor \
|
||||
-I$(PUBLIC)\xpcom \
|
||||
-I$(PUBLIC)\plugin \
|
||||
-I$(PUBLIC)\java \
|
||||
-I$(PUBLIC)\netlib \
|
||||
$(NULL)
|
||||
|
||||
|
||||
LCFLAGS = \
|
||||
$(LCFLAGS) \
|
||||
-D_IMPL_NS_PLUGIN \
|
||||
$(NULL)
|
||||
|
||||
OURLIBS= \
|
||||
$(DIST)\lib\xpcom32.lib \
|
||||
$(DIST)\lib\raptorbase.lib \
|
||||
$(DIST)\lib\libplc21.lib \
|
||||
$(DIST)\lib\netlib.lib \
|
||||
$(LIBNSPR)
|
||||
|
||||
LLIBS= \
|
||||
$(OURLIBS) \
|
||||
version.lib
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
it:
|
||||
echo $(LLIBS)
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\bin\$(DLLNAME).dll
|
||||
780
mozilla/modules/plugin/base/src/ns4xPlugin.cpp
Normal file
780
mozilla/modules/plugin/base/src/ns4xPlugin.cpp
Normal file
@@ -0,0 +1,780 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
// TODO: Implement Java callbacks
|
||||
|
||||
#include "xp_core.h"
|
||||
#include "nsplugin.h"
|
||||
#include "ns4xPlugin.h"
|
||||
#include "nsIPluginStream.h"
|
||||
#include "ns4xPluginInstance.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
NPNetscapeFuncs ns4xPlugin::CALLBACKS;
|
||||
nsIPluginManager * ns4xPlugin::mPluginManager;
|
||||
nsIMalloc * ns4xPlugin::mMalloc;
|
||||
|
||||
void
|
||||
ns4xPlugin::CheckClassInitialized(void)
|
||||
{
|
||||
static PRBool initialized = FALSE;
|
||||
|
||||
if (initialized)
|
||||
return;
|
||||
|
||||
mPluginManager = nsnull;
|
||||
mMalloc = nsnull;
|
||||
|
||||
// XXX It'd be nice to make this const and initialize it
|
||||
// statically...
|
||||
CALLBACKS.size = sizeof(CALLBACKS);
|
||||
CALLBACKS.version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
|
||||
|
||||
CALLBACKS.geturl = NewNPN_GetURLProc(_geturl);
|
||||
CALLBACKS.posturl = NewNPN_PostURLProc(_posturl);
|
||||
CALLBACKS.requestread = NewNPN_RequestReadProc(_requestread);
|
||||
CALLBACKS.newstream = NewNPN_NewStreamProc(_newstream);
|
||||
CALLBACKS.write = NewNPN_WriteProc(_write);
|
||||
CALLBACKS.destroystream = NewNPN_DestroyStreamProc(_destroystream);
|
||||
CALLBACKS.status = NewNPN_StatusProc(_status);
|
||||
CALLBACKS.uagent = NewNPN_UserAgentProc(_useragent);
|
||||
CALLBACKS.memalloc = NewNPN_MemAllocProc(_memalloc);
|
||||
CALLBACKS.memfree = NewNPN_MemFreeProc(_memfree);
|
||||
CALLBACKS.memflush = NewNPN_MemFlushProc(_memflush);
|
||||
CALLBACKS.reloadplugins = NewNPN_ReloadPluginsProc(_reloadplugins);
|
||||
CALLBACKS.getJavaEnv = NewNPN_GetJavaEnvProc(_getJavaEnv);
|
||||
// CALLBACKS.getJavaPeer = NewNPN_GetJavaPeerProc(_getJavaPeer);
|
||||
CALLBACKS.geturlnotify = NewNPN_GetURLNotifyProc(_geturlnotify);
|
||||
CALLBACKS.posturlnotify = NewNPN_PostURLNotifyProc(_posturlnotify);
|
||||
CALLBACKS.getvalue = NewNPN_GetValueProc(_getvalue);
|
||||
CALLBACKS.setvalue = NewNPN_SetValueProc(_setvalue);
|
||||
CALLBACKS.invalidaterect = NewNPN_InvalidateRectProc(_invalidaterect);
|
||||
CALLBACKS.invalidateregion = NewNPN_InvalidateRegionProc(_invalidateregion);
|
||||
CALLBACKS.forceredraw = NewNPN_ForceRedrawProc(_forceredraw);
|
||||
|
||||
initialized = TRUE;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
ns4xPlugin::ns4xPlugin(NPPluginFuncs* callbacks, NP_PLUGINSHUTDOWN aShutdown)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
|
||||
memcpy((void*) &fCallbacks, (void*) callbacks, sizeof(fCallbacks));
|
||||
fShutdownEntry = aShutdown;
|
||||
}
|
||||
|
||||
|
||||
ns4xPlugin::~ns4xPlugin(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// nsISupports stuff
|
||||
|
||||
NS_IMPL_ADDREF(ns4xPlugin);
|
||||
NS_IMPL_RELEASE(ns4xPlugin);
|
||||
|
||||
static NS_DEFINE_IID(kILiveConnectPluginIID, NS_ILIVECONNECTPLUGIN_IID);
|
||||
static NS_DEFINE_IID(kIPluginIID, NS_IPLUGIN_IID);
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kIWindowlessPluginInstancePeerIID, NS_IWINDOWLESSPLUGININSTANCEPEER_IID);
|
||||
static NS_DEFINE_IID(kISeekablePluginStreamPeerIID, NS_ISEEKABLEPLUGINSTREAMPEER_IID);
|
||||
|
||||
nsresult
|
||||
ns4xPlugin::QueryInterface(const nsIID& iid, void** instance)
|
||||
{
|
||||
if (instance == NULL)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
if (iid.Equals(kIPluginIID))
|
||||
{
|
||||
*instance = (void *)(nsIPlugin *)this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (iid.Equals(kILiveConnectPluginIID))
|
||||
{
|
||||
// Check the 4.x plugin callbacks to see if it supports
|
||||
// LiveConnect...
|
||||
if (fCallbacks.javaClass == NULL)
|
||||
return NS_NOINTERFACE;
|
||||
|
||||
*instance = (void *)(nsILiveConnectPlugin *)this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (iid.Equals(kISupportsIID))
|
||||
{
|
||||
*instance = (void *)(nsISupports *)this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Static factory method.
|
||||
//
|
||||
|
||||
nsresult
|
||||
ns4xPlugin::CreatePlugin(PRLibrary *library,
|
||||
nsIPlugin **result)
|
||||
{
|
||||
CheckClassInitialized();
|
||||
|
||||
NP_GETENTRYPOINTS pfnGetEntryPoints =
|
||||
(NP_GETENTRYPOINTS)PR_FindSymbol(library, "NP_GetEntryPoints");
|
||||
|
||||
if (pfnGetEntryPoints == NULL)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
NPPluginFuncs callbacks;
|
||||
memset((void*) &callbacks, 0, sizeof(callbacks));
|
||||
|
||||
callbacks.size = sizeof(callbacks);
|
||||
|
||||
if (pfnGetEntryPoints(&callbacks) != NS_OK)
|
||||
return NS_ERROR_FAILURE; // XXX
|
||||
|
||||
#ifdef XP_WIN // XXX This is really XP, but we need to figure out how to do HIBYTE()
|
||||
if (HIBYTE(callbacks.version) < NP_VERSION_MAJOR)
|
||||
return NS_ERROR_FAILURE;
|
||||
#endif
|
||||
|
||||
NP_PLUGINSHUTDOWN pfnShutdown =
|
||||
(NP_PLUGINSHUTDOWN)PR_FindSymbol(library, "NP_Shutdown");
|
||||
|
||||
// the NP_Initialize entry point was misnamed as NP_PluginInit,
|
||||
// early in plugin project development. Its correct name is
|
||||
// documented now, and new developers expect it to work. However,
|
||||
// I don't want to break the plugins already in the field, so
|
||||
// we'll accept either name
|
||||
NP_PLUGININIT pfnInitialize =
|
||||
(NP_PLUGININIT)PR_FindSymbol(library, "NP_Initialize");
|
||||
|
||||
if (!pfnInitialize) {
|
||||
pfnInitialize =
|
||||
(NP_PLUGININIT)PR_FindSymbol(library, "NP_PluginInit");
|
||||
}
|
||||
|
||||
if (pfnInitialize == NULL)
|
||||
return NS_ERROR_UNEXPECTED; // XXX Right error?
|
||||
|
||||
if (pfnInitialize(&ns4xPlugin::CALLBACKS) != NS_OK)
|
||||
return NS_ERROR_UNEXPECTED; // XXX shoudl convert the 4.x error...
|
||||
|
||||
*result = new ns4xPlugin(&callbacks, pfnShutdown);
|
||||
|
||||
NS_ADDREF(*result);
|
||||
|
||||
if (*result == NULL)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult ns4xPlugin :: CreateInstance(nsISupports *aOuter,
|
||||
const nsIID &aIID,
|
||||
void **aResult)
|
||||
{
|
||||
if (aResult == NULL) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
*aResult = NULL;
|
||||
|
||||
nsISupports *inst;
|
||||
|
||||
inst = nsnull;
|
||||
inst = (nsISupports *)(nsIPluginInstance *)new ns4xPluginInstance(&fCallbacks);
|
||||
|
||||
if (inst == NULL) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
nsresult res = inst->QueryInterface(aIID, aResult);
|
||||
|
||||
if (res != NS_OK) {
|
||||
// We didn't get the right interface, so clean up
|
||||
delete inst;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
nsresult ns4xPlugin :: LockFactory(PRBool aLock)
|
||||
{
|
||||
// Not implemented in simplest case.
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static NS_DEFINE_IID(kIPluginManagerIID, NS_IPLUGINMANAGER_IID);
|
||||
static NS_DEFINE_IID(kIMallocIID, NS_IMALLOC_IID);
|
||||
|
||||
nsresult
|
||||
ns4xPlugin::Initialize(nsISupports* browserInterfaces)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
if (nsnull == mPluginManager)
|
||||
rv = browserInterfaces->QueryInterface(kIPluginManagerIID, (void **)&mPluginManager);
|
||||
|
||||
if (nsnull == mMalloc)
|
||||
rv = browserInterfaces->QueryInterface(kIMallocIID, (void **)&mMalloc);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
ns4xPlugin::Shutdown(void)
|
||||
{
|
||||
if (nsnull != fShutdownEntry)
|
||||
{
|
||||
#ifdef NS_DEBUG
|
||||
printf("shutting down plugin %08x\n", this);
|
||||
#endif
|
||||
fShutdownEntry();
|
||||
fShutdownEntry = nsnull;
|
||||
}
|
||||
|
||||
NS_IF_RELEASE(mPluginManager);
|
||||
NS_IF_RELEASE(mMalloc);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
ns4xPlugin::GetMIMEDescription(const char* *resultingDesc)
|
||||
{
|
||||
printf("plugin getmimedescription called\n");
|
||||
*resultingDesc = "";
|
||||
return NS_OK; // XXX make a callback, etc.
|
||||
}
|
||||
|
||||
nsresult
|
||||
ns4xPlugin::GetValue(nsPluginVariable variable, void *value)
|
||||
{
|
||||
printf("plugin getvalue %d called\n", variable);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
ns4xPlugin::GetJavaClass(jclass *resultingClass)
|
||||
{
|
||||
*resultingClass = (jclass)fCallbacks.javaClass;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Static callbacks that get routed back through the new C++ API
|
||||
//
|
||||
|
||||
nsresult NP_EXPORT
|
||||
ns4xPlugin::_geturl(NPP npp, const char* relativeURL, const char* target)
|
||||
{
|
||||
nsIPluginInstance *inst = (nsIPluginInstance *) npp->ndata;
|
||||
|
||||
NS_ASSERTION(inst != NULL, "null instance");
|
||||
NS_ASSERTION(mPluginManager != NULL, "null manager");
|
||||
|
||||
if (inst == NULL)
|
||||
return NS_ERROR_UNEXPECTED; // XXX
|
||||
|
||||
return mPluginManager->GetURL(inst, relativeURL, target);
|
||||
}
|
||||
|
||||
nsresult NP_EXPORT
|
||||
ns4xPlugin::_geturlnotify(NPP npp, const char* relativeURL, const char* target,
|
||||
void* notifyData)
|
||||
{
|
||||
nsIPluginInstance *inst = (nsIPluginInstance *) npp->ndata;
|
||||
|
||||
NS_ASSERTION(inst != NULL, "null instance");
|
||||
NS_ASSERTION(mPluginManager != NULL, "null manager");
|
||||
|
||||
if (inst == NULL)
|
||||
return NS_ERROR_UNEXPECTED; // XXX
|
||||
|
||||
return mPluginManager->GetURL(inst, relativeURL, target,
|
||||
notifyData);
|
||||
}
|
||||
|
||||
|
||||
nsresult NP_EXPORT
|
||||
ns4xPlugin::_posturlnotify(NPP npp, const char* relativeURL, const char *target,
|
||||
uint32 len, const char *buf, NPBool file,
|
||||
void* notifyData)
|
||||
{
|
||||
nsIPluginInstance *inst = (nsIPluginInstance *) npp->ndata;
|
||||
|
||||
NS_ASSERTION(inst != NULL, "null instance");
|
||||
NS_ASSERTION(mPluginManager != NULL, "null manager");
|
||||
|
||||
if (inst == NULL)
|
||||
return NS_ERROR_UNEXPECTED; // XXX
|
||||
|
||||
return mPluginManager->PostURL(inst, relativeURL, target,
|
||||
len, buf, file, notifyData);
|
||||
}
|
||||
|
||||
|
||||
nsresult NP_EXPORT
|
||||
ns4xPlugin::_posturl(NPP npp, const char* relativeURL, const char *target, uint32 len,
|
||||
const char *buf, NPBool file)
|
||||
{
|
||||
nsIPluginInstance *inst = (nsIPluginInstance *) npp->ndata;
|
||||
|
||||
NS_ASSERTION(inst != NULL, "null instance");
|
||||
NS_ASSERTION(mPluginManager != NULL, "null manager");
|
||||
|
||||
if (inst == NULL)
|
||||
return NS_ERROR_UNEXPECTED; // XXX
|
||||
|
||||
return mPluginManager->PostURL(inst, relativeURL, target,
|
||||
len, buf, file);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* A little helper class used to wrap up plugin manager streams (that is,
|
||||
* streams from the plugin to the browser).
|
||||
*/
|
||||
class ns4xStreamWrapper
|
||||
{
|
||||
protected:
|
||||
nsIOutputStream *fStream;
|
||||
NPStream fNPStream;
|
||||
|
||||
public:
|
||||
ns4xStreamWrapper(nsIOutputStream* stream);
|
||||
~ns4xStreamWrapper();
|
||||
|
||||
nsIOutputStream*
|
||||
GetStream(void);
|
||||
|
||||
NPStream*
|
||||
GetNPStream(void) {
|
||||
return &fNPStream;
|
||||
};
|
||||
};
|
||||
|
||||
ns4xStreamWrapper::ns4xStreamWrapper(nsIOutputStream* stream)
|
||||
: fStream(stream)
|
||||
{
|
||||
NS_ASSERTION(stream != NULL, "bad stream");
|
||||
|
||||
NS_ADDREF(fStream);
|
||||
|
||||
memset(&fNPStream, 0, sizeof(fNPStream));
|
||||
fNPStream.ndata = (void*) this;
|
||||
}
|
||||
|
||||
ns4xStreamWrapper::~ns4xStreamWrapper(void)
|
||||
{
|
||||
NS_IF_RELEASE(fStream);
|
||||
}
|
||||
|
||||
nsIOutputStream*
|
||||
ns4xStreamWrapper::GetStream(void)
|
||||
{
|
||||
NS_IF_ADDREF(fStream);
|
||||
|
||||
return fStream;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
nsresult NP_EXPORT
|
||||
ns4xPlugin::_newstream(NPP npp, NPMIMEType type, const char* window, NPStream* *result)
|
||||
{
|
||||
nsIPluginInstance *inst = (nsIPluginInstance *) npp->ndata;
|
||||
|
||||
NS_ASSERTION(inst != NULL, "null instance");
|
||||
|
||||
if (inst == NULL)
|
||||
return NS_ERROR_UNEXPECTED; // XXX
|
||||
|
||||
nsresult error;
|
||||
nsIOutputStream* stream;
|
||||
nsIPluginInstancePeer *peer;
|
||||
|
||||
if (NS_OK == inst->GetPeer(&peer))
|
||||
{
|
||||
if ((error = peer->NewStream((const char*) type, window, &stream)) != NS_OK)
|
||||
{
|
||||
NS_RELEASE(peer);
|
||||
return error;
|
||||
}
|
||||
|
||||
ns4xStreamWrapper* wrapper = new ns4xStreamWrapper(stream);
|
||||
|
||||
if (wrapper == NULL)
|
||||
{
|
||||
NS_RELEASE(peer);
|
||||
NS_RELEASE(stream);
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
(*result) = wrapper->GetNPStream();
|
||||
|
||||
NS_RELEASE(peer);
|
||||
|
||||
return error;
|
||||
}
|
||||
else
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
int32 NP_EXPORT
|
||||
ns4xPlugin::_write(NPP npp, NPStream *pstream, int32 len, void *buffer)
|
||||
{
|
||||
ns4xStreamWrapper* wrapper = (ns4xStreamWrapper*) npp->ndata;
|
||||
|
||||
NS_ASSERTION(wrapper != NULL, "null wrapper");
|
||||
|
||||
if (wrapper == NULL)
|
||||
return 0;
|
||||
|
||||
nsIOutputStream* stream = wrapper->GetStream();
|
||||
|
||||
PRInt32 count = 0;
|
||||
nsresult rv = stream->Write((char *)buffer, 0, len, &count);
|
||||
|
||||
NS_RELEASE(stream);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
nsresult NP_EXPORT
|
||||
ns4xPlugin::_destroystream(NPP npp, NPStream *pstream, NPError reason)
|
||||
{
|
||||
ns4xStreamWrapper* wrapper = (ns4xStreamWrapper*) npp->ndata;
|
||||
|
||||
NS_ASSERTION(wrapper != NULL, "null wrapper");
|
||||
|
||||
if (wrapper == NULL)
|
||||
return 0;
|
||||
|
||||
// This will release the wrapped nsIOutputStream.
|
||||
delete wrapper;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void NP_EXPORT
|
||||
ns4xPlugin::_status(NPP npp, const char *message)
|
||||
{
|
||||
nsIPluginInstance *inst = (nsIPluginInstance *) npp->ndata;
|
||||
|
||||
NS_ASSERTION(inst != NULL, "null instance");
|
||||
|
||||
if (inst == NULL)
|
||||
return;
|
||||
|
||||
nsIPluginInstancePeer *peer;
|
||||
|
||||
if (NS_OK == inst->GetPeer(&peer))
|
||||
{
|
||||
peer->ShowStatus(message);
|
||||
NS_RELEASE(peer);
|
||||
}
|
||||
}
|
||||
|
||||
void NP_EXPORT
|
||||
ns4xPlugin::_memfree (void *ptr)
|
||||
{
|
||||
mMalloc->Free(ptr);
|
||||
}
|
||||
|
||||
uint32 NP_EXPORT
|
||||
ns4xPlugin::_memflush(uint32 size)
|
||||
{
|
||||
mMalloc->HeapMinimize();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void NP_EXPORT
|
||||
ns4xPlugin::_reloadplugins(NPBool reloadPages)
|
||||
{
|
||||
mPluginManager->ReloadPlugins(reloadPages);
|
||||
}
|
||||
|
||||
void NP_EXPORT
|
||||
ns4xPlugin::_invalidaterect(NPP npp, NPRect *invalidRect)
|
||||
{
|
||||
nsIPluginInstance *inst = (nsIPluginInstance *) npp->ndata;
|
||||
|
||||
NS_ASSERTION(inst != NULL, "null instance");
|
||||
|
||||
if (inst == NULL)
|
||||
return;
|
||||
|
||||
nsIPluginInstancePeer *peer;
|
||||
nsIWindowlessPluginInstancePeer *wpeer;
|
||||
|
||||
if (NS_OK == inst->GetPeer(&peer))
|
||||
{
|
||||
if (NS_OK == peer->QueryInterface(kIWindowlessPluginInstancePeerIID, (void **)&wpeer))
|
||||
{
|
||||
// XXX nsRect & NPRect are structurally equivalent
|
||||
wpeer->InvalidateRect((nsPluginRect *)invalidRect);
|
||||
NS_RELEASE(wpeer);
|
||||
}
|
||||
|
||||
NS_RELEASE(peer);
|
||||
}
|
||||
}
|
||||
|
||||
void NP_EXPORT
|
||||
ns4xPlugin::_invalidateregion(NPP npp, NPRegion invalidRegion)
|
||||
{
|
||||
nsIPluginInstance *inst = (nsIPluginInstance *) npp->ndata;
|
||||
|
||||
NS_ASSERTION(inst != NULL, "null instance");
|
||||
|
||||
if (inst == NULL)
|
||||
return;
|
||||
|
||||
nsIPluginInstancePeer *peer;
|
||||
nsIWindowlessPluginInstancePeer *wpeer;
|
||||
|
||||
if (NS_OK == inst->GetPeer(&peer))
|
||||
{
|
||||
if (NS_OK == peer->QueryInterface(kIWindowlessPluginInstancePeerIID, (void **)&wpeer))
|
||||
{
|
||||
// XXX nsRegion & NPRegion are typedef'd to the same thing
|
||||
wpeer->InvalidateRegion((nsPluginRegion)invalidRegion);
|
||||
NS_RELEASE(wpeer);
|
||||
}
|
||||
|
||||
NS_RELEASE(peer);
|
||||
}
|
||||
}
|
||||
|
||||
void NP_EXPORT
|
||||
ns4xPlugin::_forceredraw(NPP npp)
|
||||
{
|
||||
nsIPluginInstance *inst = (nsIPluginInstance *) npp->ndata;
|
||||
|
||||
NS_ASSERTION(inst != NULL, "null instance");
|
||||
|
||||
if (inst == NULL)
|
||||
return;
|
||||
|
||||
nsIPluginInstancePeer *peer;
|
||||
nsIWindowlessPluginInstancePeer *wpeer;
|
||||
|
||||
if (NS_OK == inst->GetPeer(&peer))
|
||||
{
|
||||
if (NS_OK == peer->QueryInterface(kIWindowlessPluginInstancePeerIID, (void **)&wpeer))
|
||||
{
|
||||
wpeer->ForceRedraw();
|
||||
NS_RELEASE(wpeer);
|
||||
}
|
||||
|
||||
NS_RELEASE(peer);
|
||||
}
|
||||
}
|
||||
|
||||
nsresult NP_EXPORT
|
||||
ns4xPlugin::_getvalue(NPP npp, NPNVariable variable, void *result)
|
||||
{
|
||||
nsIPluginInstance *inst = (nsIPluginInstance *) npp->ndata;
|
||||
|
||||
NS_ASSERTION(inst != NULL, "null instance");
|
||||
|
||||
if (inst == NULL)
|
||||
return NS_ERROR_FAILURE; // XXX
|
||||
|
||||
nsIPluginInstancePeer *peer;
|
||||
|
||||
if (NS_OK == inst->GetPeer(&peer))
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
// XXX Note that for backwards compatibility, the old NPNVariables
|
||||
// map correctly to NPPluginManagerVariables.
|
||||
rv = peer->GetValue((nsPluginInstancePeerVariable)variable, result);
|
||||
NS_RELEASE(peer);
|
||||
return rv;
|
||||
}
|
||||
else
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
nsresult NP_EXPORT
|
||||
ns4xPlugin::_setvalue(NPP npp, NPPVariable variable, void *result)
|
||||
{
|
||||
ns4xPluginInstance *inst = (ns4xPluginInstance *) npp->ndata;
|
||||
|
||||
NS_ASSERTION(inst != NULL, "null instance");
|
||||
|
||||
if (inst == NULL)
|
||||
return NS_ERROR_FAILURE; // XXX
|
||||
|
||||
switch (variable)
|
||||
{
|
||||
case NPPVpluginWindowBool:
|
||||
return inst->SetWindowless(*((NPBool *)result));
|
||||
|
||||
case NPPVpluginTransparentBool:
|
||||
return inst->SetTransparent(*((NPBool *)result));
|
||||
|
||||
default:
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#if 0
|
||||
nsIPluginInstancePeer *peer;
|
||||
|
||||
if (NS_OK == inst->GetPeer(&peer))
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
// XXX Note that for backwards compatibility, the old NPPVariables
|
||||
// map correctly to NPPluginVariables.
|
||||
rv = peer->SetValue((nsPluginInstancePeerVariable)variable, result);
|
||||
NS_RELEASE(peer);
|
||||
return rv;
|
||||
}
|
||||
else
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
#endif
|
||||
}
|
||||
|
||||
nsresult NP_EXPORT
|
||||
ns4xPlugin::_requestread(NPStream *pstream, NPByteRange *rangeList)
|
||||
{
|
||||
nsIPluginStreamPeer* streamPeer = (nsIPluginStreamPeer*) pstream->ndata;
|
||||
|
||||
NS_ASSERTION(streamPeer != NULL, "null streampeer");
|
||||
|
||||
if (streamPeer == NULL)
|
||||
return NS_ERROR_FAILURE; // XXX
|
||||
|
||||
nsISeekablePluginStreamPeer* seekablePeer = NULL;
|
||||
|
||||
if (streamPeer->QueryInterface(kISeekablePluginStreamPeerIID,
|
||||
(void**)seekablePeer) == NS_OK)
|
||||
{
|
||||
nsresult error;
|
||||
|
||||
// XXX nsByteRange & NPByteRange are structurally equivalent.
|
||||
error = seekablePeer->RequestRead((nsByteRange *)rangeList);
|
||||
NS_RELEASE(seekablePeer);
|
||||
return error;
|
||||
}
|
||||
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// On 68K Mac (XXX still supported?), we need to make sure that the
|
||||
// pointers are in D0 for the following functions that return pointers.
|
||||
//
|
||||
|
||||
#if defined(XP_MAC) && !defined(powerc)
|
||||
#pragma pointers_in_D0
|
||||
#endif
|
||||
|
||||
|
||||
JRIEnv* NP_EXPORT
|
||||
ns4xPlugin::_getJavaEnv(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char * NP_EXPORT
|
||||
ns4xPlugin::_useragent(NPP npp)
|
||||
{
|
||||
NS_ASSERTION(mPluginManager != NULL, "null pluginmanager");
|
||||
|
||||
if (mPluginManager == NULL)
|
||||
return NULL;
|
||||
|
||||
char *retstr;
|
||||
|
||||
mPluginManager->UserAgent((const char **)&retstr);
|
||||
|
||||
return retstr;
|
||||
}
|
||||
|
||||
void * NP_EXPORT
|
||||
ns4xPlugin::_memalloc (uint32 size)
|
||||
{
|
||||
return mMalloc->Alloc(size);
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
#ifdef JAVA
|
||||
java_lang_Class* NP_EXPORT
|
||||
ns4xPlugin::_getJavaClass(void* handle)
|
||||
{
|
||||
// Is this just a generic call into the Java VM?
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
jref NP_EXPORT
|
||||
ns4xPlugin::_getJavaPeer(NPP npp)
|
||||
{
|
||||
NPIPluginInstancePeer* peer = (NPIPluginInstancePeer*) npp->ndata;
|
||||
PR_ASSERT(peer != NULL);
|
||||
if (peer == NULL)
|
||||
return NULL;
|
||||
|
||||
static NS_DEFINE_IID(kILiveConnectPluginInstancePeerIID,
|
||||
NP_ILIVECONNECTPLUGININSTANCEPEER_IID);
|
||||
|
||||
NPILiveConnectPluginInstancePeer* lcPeer = NULL;
|
||||
if (peer->QueryInterface(kILiveConnectPluginInstancePeerIID,
|
||||
(void**) &lcPeer) == NS_OK) {
|
||||
jobject result = lcPeer->GetJavaPeer();
|
||||
lcPeer->Release();
|
||||
return result;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(XP_MAC) && !defined(powerc)
|
||||
#pragma pointers_in_A0
|
||||
#endif
|
||||
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
233
mozilla/modules/plugin/base/src/ns4xPlugin.h
Normal file
233
mozilla/modules/plugin/base/src/ns4xPlugin.h
Normal file
@@ -0,0 +1,233 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef ns4xPlugin_h__
|
||||
#define ns4xPlugin_h__
|
||||
|
||||
#include "nsplugin.h"
|
||||
#include "prlink.h" // for PRLibrary
|
||||
#include "npupp.h"
|
||||
#include "nsIMalloc.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
* Use this macro before each exported function
|
||||
* (between the return address and the function
|
||||
* itself), to ensure that the function has the
|
||||
* right calling conventions on Win16.
|
||||
*/
|
||||
|
||||
#ifdef XP_WIN16
|
||||
#define NP_EXPORT __export
|
||||
#elif defined(XP_OS2)
|
||||
#define NP_EXPORT _System
|
||||
#else
|
||||
#define NP_EXPORT
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// XXX These are defined in platform specific FE directories right now :-/
|
||||
|
||||
//BTW: this sucks rocks.
|
||||
#ifdef XP_WIN
|
||||
#define PLUGIN_ENTRYPOINT_CALL_TYPE __stdcall
|
||||
#else
|
||||
#define PLUGIN_ENTRYPOINT_CALL_TYPE
|
||||
#endif
|
||||
|
||||
typedef NPError (PLUGIN_ENTRYPOINT_CALL_TYPE *NP_GETENTRYPOINTS)(NPPluginFuncs* pCallbacks);
|
||||
typedef NPError (PLUGIN_ENTRYPOINT_CALL_TYPE *NP_PLUGININIT)(const NPNetscapeFuncs* pCallbacks);
|
||||
typedef NPError (PLUGIN_ENTRYPOINT_CALL_TYPE *NP_PLUGINSHUTDOWN)();
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* A 5.0 wrapper for a 4.x style plugin.
|
||||
*/
|
||||
class ns4xPlugin : public nsILiveConnectPlugin
|
||||
{
|
||||
public:
|
||||
ns4xPlugin(NPPluginFuncs* callbacks, NP_PLUGINSHUTDOWN aShutdown);
|
||||
~ns4xPlugin(void);
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
//nsIFactory interface
|
||||
|
||||
NS_IMETHOD CreateInstance(nsISupports *aOuter,
|
||||
REFNSIID aIID,
|
||||
void **aResult);
|
||||
|
||||
NS_IMETHOD LockFactory(PRBool aLock);
|
||||
|
||||
//nsIPlugin interface
|
||||
|
||||
NS_IMETHOD
|
||||
Initialize(nsISupports* browserInterfaces);
|
||||
|
||||
NS_IMETHOD
|
||||
Shutdown(void);
|
||||
|
||||
NS_IMETHOD
|
||||
GetMIMEDescription(const char* *resultingDesc);
|
||||
|
||||
NS_IMETHOD
|
||||
GetValue(nsPluginVariable variable, void *value);
|
||||
|
||||
//nsILiveConnectPlugin interface
|
||||
|
||||
NS_IMETHOD
|
||||
GetJavaClass(jclass *resultingClass);
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// ns4xPlugin-specific methods
|
||||
|
||||
/**
|
||||
* A static factory method for constructing 4.x plugins. Constructs
|
||||
* and initializes an ns4xPlugin object, and returns it in
|
||||
* <b>result</b>.
|
||||
*/
|
||||
static nsresult
|
||||
CreatePlugin(PRLibrary *library,
|
||||
nsIPlugin **result);
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Ensures that the static CALLBACKS is properly initialized
|
||||
*/
|
||||
static void CheckClassInitialized(void);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Static stub functions that are exported to the 4.x plugin as entry
|
||||
// points via the CALLBACKS variable.
|
||||
//
|
||||
static nsresult NP_EXPORT
|
||||
_requestread(NPStream *pstream, NPByteRange *rangeList);
|
||||
|
||||
static nsresult NP_EXPORT
|
||||
_geturlnotify(NPP npp, const char* relativeURL, const char* target, void* notifyData);
|
||||
|
||||
static nsresult NP_EXPORT
|
||||
_getvalue(NPP npp, NPNVariable variable, void *r_value);
|
||||
|
||||
static nsresult NP_EXPORT
|
||||
_setvalue(NPP npp, NPPVariable variable, void *r_value);
|
||||
|
||||
static nsresult NP_EXPORT
|
||||
_geturl(NPP npp, const char* relativeURL, const char* target);
|
||||
|
||||
static nsresult NP_EXPORT
|
||||
_posturlnotify(NPP npp, const char* relativeURL, const char *target,
|
||||
uint32 len, const char *buf, NPBool file, void* notifyData);
|
||||
|
||||
static nsresult NP_EXPORT
|
||||
_posturl(NPP npp, const char* relativeURL, const char *target, uint32 len,
|
||||
const char *buf, NPBool file);
|
||||
|
||||
static nsresult NP_EXPORT
|
||||
_newstream(NPP npp, NPMIMEType type, const char* window, NPStream** pstream);
|
||||
|
||||
static int32 NP_EXPORT
|
||||
_write(NPP npp, NPStream *pstream, int32 len, void *buffer);
|
||||
|
||||
static nsresult NP_EXPORT
|
||||
_destroystream(NPP npp, NPStream *pstream, NPError reason);
|
||||
|
||||
static void NP_EXPORT
|
||||
_status(NPP npp, const char *message);
|
||||
|
||||
#if 0
|
||||
|
||||
static void NP_EXPORT
|
||||
_registerwindow(NPP npp, void* window);
|
||||
|
||||
static void NP_EXPORT
|
||||
_unregisterwindow(NPP npp, void* window);
|
||||
|
||||
static int16 NP_EXPORT
|
||||
_allocateMenuID(NPP npp, NPBool isSubmenu);
|
||||
|
||||
#endif
|
||||
|
||||
static void NP_EXPORT
|
||||
_memfree (void *ptr);
|
||||
|
||||
static uint32 NP_EXPORT
|
||||
_memflush(uint32 size);
|
||||
|
||||
static void NP_EXPORT
|
||||
_reloadplugins(NPBool reloadPages);
|
||||
|
||||
static void NP_EXPORT
|
||||
_invalidaterect(NPP npp, NPRect *invalidRect);
|
||||
|
||||
static void NP_EXPORT
|
||||
_invalidateregion(NPP npp, NPRegion invalidRegion);
|
||||
|
||||
static void NP_EXPORT
|
||||
_forceredraw(NPP npp);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Anything that returns a pointer needs to be _HERE_ for 68K Mac to
|
||||
// work.
|
||||
//
|
||||
|
||||
#if defined(XP_MAC) && !defined(powerc)
|
||||
#pragma pointers_in_D0
|
||||
#endif
|
||||
|
||||
static const char* NP_EXPORT
|
||||
_useragent(NPP npp);
|
||||
|
||||
static void* NP_EXPORT
|
||||
_memalloc (uint32 size);
|
||||
|
||||
static JRIEnv* NP_EXPORT
|
||||
_getJavaEnv(void);
|
||||
|
||||
#if 0
|
||||
|
||||
static jref NP_EXPORT
|
||||
_getJavaPeer(NPP npp);
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(XP_MAC) && !defined(powerc)
|
||||
#pragma pointers_in_A0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The plugin-side callbacks that the browser calls. One set of
|
||||
* plugin callbacks for each plugin.
|
||||
*/
|
||||
NPPluginFuncs fCallbacks;
|
||||
|
||||
NP_PLUGINSHUTDOWN fShutdownEntry;
|
||||
|
||||
/**
|
||||
* The browser-side callbacks that a 4.x-style plugin calls.
|
||||
*/
|
||||
static NPNetscapeFuncs CALLBACKS;
|
||||
|
||||
static nsIPluginManager *mPluginManager;
|
||||
static nsIMalloc *mMalloc;
|
||||
};
|
||||
|
||||
#endif // ns4xPlugin_h__
|
||||
296
mozilla/modules/plugin/base/src/ns4xPluginInstance.cpp
Normal file
296
mozilla/modules/plugin/base/src/ns4xPluginInstance.cpp
Normal file
@@ -0,0 +1,296 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "ns4xPluginInstance.h"
|
||||
#include "ns4xPluginStream.h"
|
||||
#include "prlog.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
ns4xPluginInstance :: ns4xPluginInstance(NPPluginFuncs* callbacks)
|
||||
: fCallbacks(callbacks)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
|
||||
NS_ASSERTION(fCallbacks != NULL, "null callbacks");
|
||||
|
||||
// Initialize the NPP structure.
|
||||
|
||||
fNPP.pdata = NULL;
|
||||
fNPP.ndata = this;
|
||||
|
||||
fPeer = nsnull;
|
||||
|
||||
mWindowless = PR_FALSE;
|
||||
mTransparent = PR_FALSE;
|
||||
}
|
||||
|
||||
|
||||
ns4xPluginInstance :: ~ns4xPluginInstance(void)
|
||||
{
|
||||
NS_RELEASE(fPeer);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
NS_IMPL_ADDREF(ns4xPluginInstance);
|
||||
NS_IMPL_RELEASE(ns4xPluginInstance);
|
||||
|
||||
static NS_DEFINE_IID(kIPluginInstanceIID, NS_IPLUGININSTANCE_IID);
|
||||
static NS_DEFINE_IID(kIEventHandlerIID, NS_IEVENTHANDLER_IID);
|
||||
static NS_DEFINE_IID(kIPluginTagInfoIID, NS_IPLUGINTAGINFO_IID);
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance :: QueryInterface(const nsIID& iid, void** instance)
|
||||
{
|
||||
if (instance == NULL)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
if (iid.Equals(kIPluginInstanceIID))
|
||||
{
|
||||
*instance = (void *)(nsIPluginInstance *)this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (iid.Equals(kIEventHandlerIID))
|
||||
{
|
||||
*instance = (void *)(nsIEventHandler *)this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (iid.Equals(kISupportsIID))
|
||||
{
|
||||
*instance = (void *)(nsISupports *)this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance :: Initialize(nsIPluginInstancePeer* peer)
|
||||
{
|
||||
PRUint16 count;
|
||||
const char* const* names;
|
||||
const char* const* values;
|
||||
|
||||
NS_ASSERTION(peer != NULL, "null peer");
|
||||
|
||||
fPeer = peer;
|
||||
|
||||
NS_ADDREF(fPeer);
|
||||
|
||||
nsresult error;
|
||||
nsIPluginTagInfo *taginfo;
|
||||
|
||||
error = fPeer->QueryInterface(kIPluginTagInfoIID, (void **)&taginfo);
|
||||
|
||||
if (NS_OK == error)
|
||||
{
|
||||
if ((error = taginfo->GetAttributes(count, names, values)) != NS_OK)
|
||||
return error;
|
||||
|
||||
if (fCallbacks->newp == NULL)
|
||||
return NS_ERROR_FAILURE; // XXX right error?
|
||||
|
||||
// XXX Note that the NPPluginType_* enums were crafted to be
|
||||
// backward compatible...
|
||||
|
||||
nsPluginMode mode;
|
||||
nsMIMEType mimetype;
|
||||
|
||||
fPeer->GetMode(&mode);
|
||||
fPeer->GetMIMEType(&mimetype);
|
||||
|
||||
error = (nsresult)
|
||||
CallNPP_NewProc(fCallbacks->newp,
|
||||
(char *)mimetype,
|
||||
&fNPP,
|
||||
(PRUint16)mode,
|
||||
count,
|
||||
(char**)names,
|
||||
(char**)values,
|
||||
NULL); // saved data
|
||||
|
||||
NS_RELEASE(taginfo);
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance :: GetPeer(nsIPluginInstancePeer* *resultingPeer)
|
||||
{
|
||||
NS_ADDREF(fPeer);
|
||||
*resultingPeer = fPeer;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance::Start(void)
|
||||
{
|
||||
// XXX At some point, we maybe should implement start and stop to
|
||||
// load/unload the 4.x plugin, just in case there are some plugins
|
||||
// that rely on that behavior...
|
||||
printf("instance start called\n");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance::Stop(void)
|
||||
{
|
||||
printf("instance stop called\n");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance::Destroy(void)
|
||||
{
|
||||
nsresult error;
|
||||
|
||||
printf("instance destroy called\n");
|
||||
if (fCallbacks->destroy == NULL)
|
||||
return NS_ERROR_FAILURE; // XXX right error?
|
||||
|
||||
NPSavedData *sdata;
|
||||
|
||||
error = (nsresult)CallNPP_DestroyProc(fCallbacks->destroy,
|
||||
&fNPP, &sdata); // saved data
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance::SetWindow(nsPluginWindow* window)
|
||||
{
|
||||
// XXX 4.x plugins don't want a SetWindow(NULL).
|
||||
|
||||
if (window == NULL)
|
||||
return NS_OK;
|
||||
|
||||
nsresult error = NS_OK;
|
||||
|
||||
if (fCallbacks->setwindow)
|
||||
{
|
||||
// XXX Turns out that NPPluginWindow and NPWindow are structurally
|
||||
// identical (on purpose!), so there's no need to make a copy.
|
||||
|
||||
error = (nsresult) CallNPP_SetWindowProc(fCallbacks->setwindow,
|
||||
&fNPP,
|
||||
(NPWindow*) window);
|
||||
|
||||
// XXX In the old code, we'd just ignore any errors coming
|
||||
// back from the plugin's SetWindow(). Is this the correct
|
||||
// behavior?!?
|
||||
|
||||
if (error != NS_OK)
|
||||
printf("error in setwindow %d\n", error);
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance::NewStream(nsIPluginStreamPeer* peer, nsIPluginStream* *result)
|
||||
{
|
||||
(*result) = NULL;
|
||||
|
||||
ns4xPluginStream* stream = new ns4xPluginStream();
|
||||
|
||||
if (stream == NULL)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
NS_ADDREF(stream);
|
||||
|
||||
nsresult error;
|
||||
|
||||
// does it need the peer?
|
||||
|
||||
if ((error = stream->Initialize(this, peer)) != NS_OK)
|
||||
{
|
||||
NS_RELEASE(stream);
|
||||
return error;
|
||||
}
|
||||
|
||||
(*result) = stream;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance::Print(nsPluginPrint* platformPrint)
|
||||
{
|
||||
printf("instance print called\n");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance::HandleEvent(nsPluginEvent* event, PRBool* handled)
|
||||
{
|
||||
printf("instance handleevent called\n");
|
||||
*handled = PR_FALSE;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance::URLNotify(const char* url, const char* target,
|
||||
nsPluginReason reason, void* notifyData)
|
||||
{
|
||||
if (fCallbacks->urlnotify != NULL)
|
||||
{
|
||||
CallNPP_URLNotifyProc(fCallbacks->urlnotify,
|
||||
&fNPP,
|
||||
url,
|
||||
reason,
|
||||
notifyData);
|
||||
}
|
||||
|
||||
return NS_OK; //XXX this seems bad...
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance :: GetValue(nsPluginInstanceVariable variable, void *value)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
switch (variable)
|
||||
{
|
||||
case nsPluginInstanceVariable_WindowlessBool:
|
||||
*(PRBool *)value = mWindowless;
|
||||
break;
|
||||
|
||||
case nsPluginInstanceVariable_TransparentBool:
|
||||
*(PRBool *)value = mTransparent;
|
||||
break;
|
||||
|
||||
default:
|
||||
rv = NS_ERROR_FAILURE; //XXX this is bad
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance :: SetWindowless(PRBool aWindowless)
|
||||
{
|
||||
mWindowless = aWindowless;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance :: SetTransparent(PRBool aTransparent)
|
||||
{
|
||||
mTransparent = aTransparent;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
145
mozilla/modules/plugin/base/src/ns4xPluginInstance.h
Normal file
145
mozilla/modules/plugin/base/src/ns4xPluginInstance.h
Normal file
@@ -0,0 +1,145 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef ns4xPluginInstance_h__
|
||||
#define ns4xPluginInstance_h__
|
||||
|
||||
#define _UINT32
|
||||
#define _INT32
|
||||
|
||||
#include "nsplugin.h"
|
||||
#include "npupp.h"
|
||||
#include "jri.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class ns4xPluginInstance : public nsIPluginInstance
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Construct a new 4.x plugin instance with the specified peer
|
||||
* and callbacks.
|
||||
*/
|
||||
ns4xPluginInstance(NPPluginFuncs* callbacks);
|
||||
|
||||
// Use Release() to destroy this
|
||||
~ns4xPluginInstance(void);
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// nsIPluginInstance methods
|
||||
|
||||
/**
|
||||
* Actually initialize the plugin instance. This calls the 4.x <b>newp</b>
|
||||
* callback, and may return an error (which is why it is distinct from the
|
||||
* constructor.) If an error is returned, the caller should <i>not</i>
|
||||
* continue to use the <b>ns4xPluginInstance</b> object.
|
||||
*/
|
||||
NS_METHOD
|
||||
Initialize(nsIPluginInstancePeer* peer);
|
||||
|
||||
NS_IMETHOD
|
||||
GetPeer(nsIPluginInstancePeer* *resultingPeer);
|
||||
|
||||
NS_IMETHOD
|
||||
Start(void);
|
||||
|
||||
NS_IMETHOD
|
||||
Stop(void);
|
||||
|
||||
NS_IMETHOD
|
||||
Destroy(void);
|
||||
|
||||
NS_IMETHOD
|
||||
SetWindow(nsPluginWindow* window);
|
||||
|
||||
NS_IMETHOD
|
||||
NewStream(nsIPluginStreamPeer* peer, nsIPluginStream* *result);
|
||||
|
||||
NS_IMETHOD
|
||||
Print(nsPluginPrint* platformPrint);
|
||||
|
||||
NS_IMETHOD
|
||||
HandleEvent(nsPluginEvent* event, PRBool* handled);
|
||||
|
||||
NS_IMETHOD
|
||||
URLNotify(const char* url, const char* target,
|
||||
nsPluginReason reason, void* notifyData);
|
||||
|
||||
NS_IMETHOD
|
||||
GetValue(nsPluginInstanceVariable variable, void *value);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// ns4xPluginInstance-specific methods
|
||||
|
||||
|
||||
/**
|
||||
* Return the 4.x-style interface object.
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetNPP(NPP * aNPP) {
|
||||
*aNPP = &fNPP;
|
||||
return NS_OK;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return the callbacks for the plugin instance.
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetCallbacks(const NPPluginFuncs ** aCallbacks) {
|
||||
*aCallbacks = fCallbacks;
|
||||
return NS_OK;
|
||||
};
|
||||
|
||||
NS_IMETHOD
|
||||
SetWindowless(PRBool aWindowless);
|
||||
|
||||
NS_IMETHOD
|
||||
SetTransparent(PRBool aTransparent);
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* The plugin instance peer for this instance.
|
||||
*/
|
||||
nsIPluginInstancePeer* fPeer;
|
||||
|
||||
/**
|
||||
* A pointer to the plugin's callback functions. This information
|
||||
* is actually stored in the plugin class (<b>nsPluginClass</b>),
|
||||
* and is common for all plugins of the class.
|
||||
*/
|
||||
NPPluginFuncs* fCallbacks;
|
||||
|
||||
/**
|
||||
* The 4.x-style structure used to communicate between the plugin
|
||||
* instance and the browser.
|
||||
*/
|
||||
NPP_t fNPP;
|
||||
|
||||
//these are used to store the windowless properties
|
||||
//which the browser will later query
|
||||
|
||||
PRBool mWindowless;
|
||||
PRBool mTransparent;
|
||||
};
|
||||
|
||||
|
||||
#endif // ns4xPluginInstance_h__
|
||||
262
mozilla/modules/plugin/base/src/ns4xPluginStream.cpp
Normal file
262
mozilla/modules/plugin/base/src/ns4xPluginStream.cpp
Normal file
@@ -0,0 +1,262 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
|
||||
#include "ns4xPluginStream.h"
|
||||
#include "prlog.h" // for PR_ASSERT
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
ns4xPluginStream::ns4xPluginStream(void)
|
||||
: fStreamType(nsPluginStreamType_Normal), fSeekable(PR_FALSE), fPosition(0)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
|
||||
fPeer = nsnull;
|
||||
fInstance = nsnull;
|
||||
|
||||
// Initialize the 4.x interface structure
|
||||
memset(&fNPStream, 0, sizeof(fNPStream));
|
||||
}
|
||||
|
||||
|
||||
ns4xPluginStream::~ns4xPluginStream(void)
|
||||
{
|
||||
const NPPluginFuncs *callbacks;
|
||||
NPP npp;
|
||||
nsPluginReason reason;
|
||||
|
||||
fInstance->GetCallbacks(&callbacks);
|
||||
fInstance->GetNPP(&npp);
|
||||
fPeer->GetReason(&reason);
|
||||
|
||||
if (callbacks->destroystream != NULL)
|
||||
{
|
||||
CallNPP_DestroyStreamProc(callbacks->destroystream,
|
||||
npp,
|
||||
&fNPStream,
|
||||
reason);
|
||||
}
|
||||
|
||||
NS_IF_RELEASE(fPeer);
|
||||
NS_IF_RELEASE(fInstance);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
NS_IMPL_ADDREF(ns4xPluginStream);
|
||||
NS_IMPL_RELEASE(ns4xPluginStream);
|
||||
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kIPluginStreamIID, NS_IPLUGINSTREAM_IID);
|
||||
static NS_DEFINE_IID(kISeekablePluginStreamPeerIID, NS_ISEEKABLEPLUGINSTREAMPEER_IID);
|
||||
|
||||
NS_IMETHODIMP ns4xPluginStream::QueryInterface(const nsIID& iid, void** instance)
|
||||
{
|
||||
if (instance == NULL)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
if (iid.Equals(kIPluginStreamIID))
|
||||
{
|
||||
*instance = (void *)(nsIPluginStream *)this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
else if (iid.Equals(kISupportsIID))
|
||||
{
|
||||
*instance = (void *)(nsISupports *)this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
NS_IMETHODIMP ns4xPluginStream::Initialize(ns4xPluginInstance* instance,
|
||||
nsIPluginStreamPeer* peer)
|
||||
{
|
||||
fInstance = instance;
|
||||
fPeer = peer;
|
||||
|
||||
NS_ASSERTION(fInstance != NULL, "null instance");
|
||||
|
||||
NS_ADDREF(fInstance);
|
||||
|
||||
NS_ASSERTION(fPeer != NULL, "null peer");
|
||||
|
||||
NS_ADDREF(fPeer);
|
||||
|
||||
const char *url;
|
||||
PRUint32 length, modified;
|
||||
|
||||
fPeer->GetURL(&url);
|
||||
fPeer->GetEnd(&length);
|
||||
fPeer->GetLastModified(&modified);
|
||||
|
||||
fNPStream.ndata = (void*) fPeer;
|
||||
fNPStream.url = url;
|
||||
fNPStream.end = length;
|
||||
fNPStream.lastmodified = modified;
|
||||
|
||||
// Are we seekable?
|
||||
|
||||
nsISupports* seekablePeer;
|
||||
|
||||
if (fPeer->QueryInterface(kISeekablePluginStreamPeerIID,
|
||||
(void**) &seekablePeer) == NS_OK)
|
||||
{
|
||||
fSeekable = TRUE;
|
||||
NS_RELEASE(seekablePeer);
|
||||
}
|
||||
|
||||
const NPPluginFuncs *callbacks;
|
||||
NPP npp;
|
||||
nsMIMEType mimetype;
|
||||
|
||||
fInstance->GetCallbacks(&callbacks);
|
||||
fInstance->GetNPP(&npp);
|
||||
fPeer->GetMIMEType(&mimetype);
|
||||
|
||||
if (callbacks->newstream == NULL)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
PRUint16 streamType = (PRUint16) fStreamType;
|
||||
|
||||
nsresult error
|
||||
= (nsresult)CallNPP_NewStreamProc(callbacks->newstream,
|
||||
npp,
|
||||
(char *)mimetype,
|
||||
&fNPStream,
|
||||
fSeekable,
|
||||
&streamType);
|
||||
|
||||
fStreamType = (nsPluginStreamType) streamType;
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginStream::Write(const char* buffer, PRInt32 offset, PRInt32 len, PRInt32 *aWriteCount)
|
||||
{
|
||||
const NPPluginFuncs *callbacks;
|
||||
NPP npp;
|
||||
PRInt32 remaining = len;
|
||||
|
||||
fInstance->GetCallbacks(&callbacks);
|
||||
fInstance->GetNPP(&npp);
|
||||
|
||||
if (callbacks->write == NULL)
|
||||
return NS_OK;
|
||||
|
||||
while (remaining > 0)
|
||||
{
|
||||
PRInt32 numtowrite;
|
||||
|
||||
if (callbacks->writeready != NULL)
|
||||
{
|
||||
numtowrite = CallNPP_WriteReadyProc(callbacks->writeready,
|
||||
npp,
|
||||
&fNPStream);
|
||||
|
||||
if (numtowrite > remaining)
|
||||
numtowrite = remaining;
|
||||
}
|
||||
else
|
||||
numtowrite = len;
|
||||
|
||||
*aWriteCount = CallNPP_WriteProc(callbacks->write,
|
||||
npp,
|
||||
&fNPStream,
|
||||
fPosition,
|
||||
numtowrite,
|
||||
(void *)buffer);
|
||||
|
||||
remaining -= numtowrite;
|
||||
}
|
||||
|
||||
fPosition += len;
|
||||
|
||||
return NS_OK; //XXX this seems bad...
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginStream::GetStreamType(nsPluginStreamType *result)
|
||||
{
|
||||
*result = fStreamType;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginStream::AsFile(const char* filename)
|
||||
{
|
||||
const NPPluginFuncs *callbacks;
|
||||
NPP npp;
|
||||
|
||||
fInstance->GetCallbacks(&callbacks);
|
||||
fInstance->GetNPP(&npp);
|
||||
|
||||
if (callbacks->asfile == NULL)
|
||||
return NS_OK;
|
||||
|
||||
CallNPP_StreamAsFileProc(callbacks->asfile,
|
||||
npp,
|
||||
&fNPStream,
|
||||
filename);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginStream :: Close(void)
|
||||
{
|
||||
const NPPluginFuncs *callbacks;
|
||||
NPP npp;
|
||||
void *notifydata;
|
||||
|
||||
fInstance->GetCallbacks(&callbacks);
|
||||
fInstance->GetNPP(&npp);
|
||||
|
||||
fPeer->GetNotifyData(¬ifydata);
|
||||
|
||||
nsPluginReason reason;
|
||||
|
||||
fPeer->GetReason(&reason);
|
||||
|
||||
if (nsnull != notifydata)
|
||||
{
|
||||
if (callbacks->urlnotify == NULL)
|
||||
return NS_OK;
|
||||
|
||||
const char *url;
|
||||
|
||||
fPeer->GetURL(&url);
|
||||
|
||||
CallNPP_URLNotifyProc(callbacks->urlnotify,
|
||||
npp,
|
||||
url,
|
||||
(NPReason)reason,
|
||||
notifydata);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
115
mozilla/modules/plugin/base/src/ns4xPluginStream.h
Normal file
115
mozilla/modules/plugin/base/src/ns4xPluginStream.h
Normal file
@@ -0,0 +1,115 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef ns4xPluginStream_h__
|
||||
#define ns4xPluginStream_h__
|
||||
|
||||
#define _UINT32
|
||||
#define _INT32
|
||||
|
||||
#include "jri.h" // XXX should be jni.h
|
||||
#include "nsplugin.h"
|
||||
#include "ns4xPluginInstance.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* A 5.0 wrapper for a 4.x plugin stream.
|
||||
*/
|
||||
class ns4xPluginStream : public nsIPluginStream
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Construct a new 4.x plugin stream associated with the specified
|
||||
* instance and stream peer.
|
||||
*/
|
||||
ns4xPluginStream();
|
||||
~ns4xPluginStream();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
/**
|
||||
* Do internal initialization. This actually calls into the 4.x plugin
|
||||
* to create the stream, and may fail (which is why it's separate from
|
||||
* the constructor).
|
||||
*/
|
||||
NS_METHOD
|
||||
Initialize(ns4xPluginInstance* instance, nsIPluginStreamPeer* peer);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// nsIPluginStream methods
|
||||
|
||||
// (Corresponds to NPP_Write and NPN_Write.)
|
||||
NS_IMETHOD
|
||||
Write(const char* buffer, PRInt32 offset, PRInt32 len, PRInt32 *aWriteCount);
|
||||
|
||||
// (Corresponds to NPP_NewStream's stype return parameter.)
|
||||
NS_IMETHOD
|
||||
GetStreamType(nsPluginStreamType *result);
|
||||
|
||||
// (Corresponds to NPP_StreamAsFile.)
|
||||
NS_IMETHOD
|
||||
AsFile(const char* fname);
|
||||
|
||||
NS_IMETHOD
|
||||
Close(void);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Methods specific to ns4xPluginStream
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* The plugin instance to which this stream belongs.
|
||||
*/
|
||||
ns4xPluginInstance* fInstance;
|
||||
|
||||
/**
|
||||
* The peer associated with this stream.
|
||||
*/
|
||||
nsIPluginStreamPeer* fPeer;
|
||||
|
||||
/**
|
||||
* The type of stream, for the peer's use.
|
||||
*/
|
||||
nsPluginStreamType fStreamType;
|
||||
|
||||
/**
|
||||
* The 4.x-style structure used to contain stream information.
|
||||
* This is what actually gets used to communicate with the plugin.
|
||||
*/
|
||||
NPStream fNPStream;
|
||||
|
||||
/**
|
||||
* Set to <b>TRUE</b> if the peer implements
|
||||
* <b>NPISeekablPluginStreamPeer</b>.
|
||||
*/
|
||||
PRBool fSeekable;
|
||||
|
||||
/**
|
||||
* Tracks the position in the content that is being
|
||||
* read. 4.x-style plugins expect to be told the offset in the
|
||||
* buffer that they should read <i>to</i>, even though it's always
|
||||
* done serially.
|
||||
*/
|
||||
PRUint32 fPosition;
|
||||
};
|
||||
|
||||
|
||||
#endif // ns4xPluginStream_h__
|
||||
67
mozilla/modules/plugin/base/src/nsIPluginHost.h
Normal file
67
mozilla/modules/plugin/base/src/nsIPluginHost.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef nsIPluginHost_h___
|
||||
#define nsIPluginHost_h___
|
||||
|
||||
#include "xp_core.h"
|
||||
#include "nsplugindefs.h"
|
||||
#include "nsIFactory.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIPluginInstanceOwner.h"
|
||||
#include "nsIStreamListener.h"
|
||||
|
||||
class nsIURL;
|
||||
|
||||
#define NS_IPLUGINHOST_IID \
|
||||
{ 0x264c0640, 0x1c31, 0x11d2, \
|
||||
{ 0xa8, 0x2e, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
||||
|
||||
struct nsIPluginHost : public nsIFactory
|
||||
{
|
||||
public:
|
||||
|
||||
NS_IMETHOD
|
||||
Init(void) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
Destroy(void) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
LoadPlugins(void) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
InstantiatePlugin(const char *aMimeType, nsIURL *aURL, nsIPluginInstanceOwner *aOwner) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
InstantiatePlugin(const char *aMimeType, nsString& aURLSpec, nsIPluginInstanceOwner *aOwner) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
InstantiatePlugin(const char *aMimeType, nsString& aURLSpec, nsIStreamListener *&aStreamListener, nsIPluginInstanceOwner *aOwner) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
NewPluginStream(const nsString& aURL, nsIPluginInstance *aInstance, void *aNotifyData) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
NewPluginStream(const nsString& aURL, nsIPluginInstanceOwner *aOwner, void *aNotifyData) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
NewPluginStream(nsIStreamListener *&aStreamListener, nsIPluginInstance *aInstance, void *aNotifyData) = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
101
mozilla/modules/plugin/base/src/nsIPluginInstanceOwner.h
Normal file
101
mozilla/modules/plugin/base/src/nsIPluginInstanceOwner.h
Normal file
@@ -0,0 +1,101 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef nsIPluginInstanceOwner_h___
|
||||
#define nsIPluginInstanceOwner_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsplugin.h"
|
||||
|
||||
#define NS_IPLUGININSTANCEOWNER_IID \
|
||||
{ 0x18270870, 0x32f1, 0x11d2, \
|
||||
{ 0xa8, 0x30, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
||||
|
||||
struct nsIPluginInstanceOwner : public nsISupports
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Let the owner know that an instance has been created
|
||||
*
|
||||
*/
|
||||
NS_IMETHOD
|
||||
SetInstance(nsIPluginInstance *aInstance) = 0;
|
||||
|
||||
/**
|
||||
* Get the instance associated with this owner.
|
||||
*
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetInstance(nsIPluginInstance *&aInstance) = 0;
|
||||
|
||||
/**
|
||||
* Get a handle to the window structure of the owner.
|
||||
* This pointer cannot be made persistant by the caller.
|
||||
*
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetWindow(nsPluginWindow *&aWindow) = 0;
|
||||
|
||||
/**
|
||||
* Get the display mode for the plugin instance.
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetMode(nsPluginMode *aMode) = 0;
|
||||
|
||||
/**
|
||||
* Get a ptr to the paired list of attribute names and values,
|
||||
* returns the length of the array.
|
||||
*
|
||||
* Each name or value is a null-terminated string.
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetAttributes(PRUint16& n, const char*const*& names, const char*const*& values) = 0;
|
||||
|
||||
/**
|
||||
* Gets the value for the named attribute.
|
||||
*
|
||||
* @param name - the name of the attribute to find
|
||||
* @param result - the resulting attribute
|
||||
* @result - NS_OK if this operation was successful, NS_ERROR_FAILURE if
|
||||
* this operation failed. result is set to NULL if the attribute is not found
|
||||
* else to the found value.
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetAttribute(const char* name, const char* *result) = 0;
|
||||
|
||||
/**
|
||||
* Create a place for the plugin to live in the owner's
|
||||
* environment. this may or may not create a window
|
||||
* depending on the windowless state of the plugin instance.
|
||||
*
|
||||
*/
|
||||
NS_IMETHOD
|
||||
CreateWidget(void) = 0;
|
||||
|
||||
/**
|
||||
* Called when there is a valid target so that the proper
|
||||
* frame can be updated with new content. will not be called
|
||||
* with nsnull aTarget.
|
||||
*
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetURL(const char *aURL, const char *aTarget, void *aPostData) = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
120
mozilla/modules/plugin/base/src/nsMalloc.cpp
Normal file
120
mozilla/modules/plugin/base/src/nsMalloc.cpp
Normal file
@@ -0,0 +1,120 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Implementation of nsIMalloc using NSPR
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "nsMalloc.h"
|
||||
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kIMallocIID, NS_IMALLOC_IID);
|
||||
|
||||
nsMalloc::nsMalloc(nsISupports* outer)
|
||||
{
|
||||
NS_INIT_AGGREGATED(outer);
|
||||
}
|
||||
|
||||
nsMalloc::~nsMalloc(void)
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_AGGREGATED(nsMalloc);
|
||||
|
||||
NS_METHOD
|
||||
nsMalloc::AggregatedQueryInterface(const nsIID& aIID, void** aInstancePtr)
|
||||
{
|
||||
if (NULL == aInstancePtr) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
if (aIID.Equals(kIMallocIID) ||
|
||||
aIID.Equals(kISupportsIID)) {
|
||||
*aInstancePtr = (void*) this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
NS_METHOD
|
||||
nsMalloc::Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr)
|
||||
{
|
||||
if (outer && !aIID.Equals(kISupportsIID))
|
||||
return NS_NOINTERFACE; // XXX right error?
|
||||
nsMalloc* mm = new nsMalloc(outer);
|
||||
if (mm == NULL)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
mm->AddRef();
|
||||
if (aIID.Equals(kISupportsIID))
|
||||
*aInstancePtr = mm->GetInner();
|
||||
else
|
||||
*aInstancePtr = mm;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
NS_METHOD_(void*)
|
||||
nsMalloc::Alloc(PRUint32 size)
|
||||
{
|
||||
return PR_Malloc(size);
|
||||
}
|
||||
|
||||
NS_METHOD_(void*)
|
||||
nsMalloc::Realloc(void* ptr, PRUint32 size)
|
||||
{
|
||||
return PR_Realloc(ptr, size);
|
||||
}
|
||||
|
||||
NS_METHOD_(void)
|
||||
nsMalloc::Free(void* ptr)
|
||||
{
|
||||
PR_Free(ptr);
|
||||
}
|
||||
|
||||
NS_METHOD_(PRInt32)
|
||||
nsMalloc::GetSize(void* ptr)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
NS_METHOD_(PRBool)
|
||||
nsMalloc::DidAlloc(void* ptr)
|
||||
{
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
// For the definition of CallCacheFlushers()
|
||||
#ifdef XP_MAC
|
||||
# ifndef NSPR20
|
||||
# include "prmacos.h"
|
||||
# else
|
||||
# include "MacMemAllocator.h"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
NS_METHOD_(void)
|
||||
nsMalloc::HeapMinimize(void)
|
||||
{
|
||||
#ifdef XP_MAC
|
||||
// something wonderful
|
||||
CallCacheFlushers(0x7fffffff);
|
||||
#endif
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
101
mozilla/modules/plugin/base/src/nsMalloc.h
Normal file
101
mozilla/modules/plugin/base/src/nsMalloc.h
Normal file
@@ -0,0 +1,101 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Implementation of nsIMalloc using NSPR
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsMalloc_h__
|
||||
#define nsMalloc_h__
|
||||
|
||||
#include "nsIMalloc.h"
|
||||
#include "prmem.h"
|
||||
#include "nsAgg.h"
|
||||
|
||||
class nsMalloc : nsIMalloc {
|
||||
public:
|
||||
|
||||
/**
|
||||
* Allocates a block of memory of a particular size.
|
||||
*
|
||||
* @param size - the size of the block to allocate
|
||||
* @result the block of memory
|
||||
*/
|
||||
NS_IMETHOD_(void*)
|
||||
Alloc(PRUint32 size);
|
||||
|
||||
/**
|
||||
* Reallocates a block of memory to a new size.
|
||||
*
|
||||
* @param ptr - the block of memory to reallocate
|
||||
* @param size - the new size
|
||||
* @result the rellocated block of memory
|
||||
*/
|
||||
NS_IMETHOD_(void*)
|
||||
Realloc(void* ptr, PRUint32 size);
|
||||
|
||||
/**
|
||||
* Frees a block of memory.
|
||||
*
|
||||
* @param ptr - the block of memory to free
|
||||
*/
|
||||
NS_IMETHOD_(void)
|
||||
Free(void* ptr);
|
||||
|
||||
/**
|
||||
* Returns the size of a block of memory. Returns -1
|
||||
* if the size is not available.
|
||||
*
|
||||
* @param ptr - the block of memory
|
||||
* @result the size or -1 if not available
|
||||
*/
|
||||
NS_IMETHOD_(PRInt32)
|
||||
GetSize(void* ptr);
|
||||
|
||||
/**
|
||||
* Returns whether the block of memory was allocated by this
|
||||
* memory allocator. Returns PR_FALSE if this information is
|
||||
* not available.
|
||||
*
|
||||
* @param ptr - the block of memory
|
||||
* @result true if allocated by this nsIMalloc, false if not or
|
||||
* if it can't be determined
|
||||
*/
|
||||
NS_IMETHOD_(PRBool)
|
||||
DidAlloc(void* ptr);
|
||||
|
||||
/**
|
||||
* Attempts to shrink the heap.
|
||||
*/
|
||||
NS_IMETHOD_(void)
|
||||
HeapMinimize(void);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsMalloc(nsISupports* outer);
|
||||
virtual ~nsMalloc(void);
|
||||
|
||||
NS_DECL_AGGREGATED
|
||||
|
||||
static NS_METHOD
|
||||
Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr);
|
||||
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#endif // nsMalloc_h__
|
||||
156
mozilla/modules/plugin/base/src/nsPluginFactory.cpp
Normal file
156
mozilla/modules/plugin/base/src/nsPluginFactory.cpp
Normal file
@@ -0,0 +1,156 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "nscore.h"
|
||||
#include "nsIFactory.h"
|
||||
#include "nsISupports.h"
|
||||
|
||||
#include "nsPluginsCID.h"
|
||||
#include "nsPluginHostImpl.h"
|
||||
|
||||
static NS_DEFINE_IID(kCPluginHost, NS_PLUGIN_HOST_CID);
|
||||
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
|
||||
|
||||
class nsPluginFactory : public nsIFactory
|
||||
{
|
||||
public:
|
||||
// nsISupports methods
|
||||
NS_IMETHOD QueryInterface(const nsIID &aIID,
|
||||
void **aResult);
|
||||
NS_IMETHOD_(nsrefcnt) AddRef(void);
|
||||
NS_IMETHOD_(nsrefcnt) Release(void);
|
||||
|
||||
// nsIFactory methods
|
||||
NS_IMETHOD CreateInstance(nsISupports *aOuter,
|
||||
const nsIID &aIID,
|
||||
void **aResult);
|
||||
|
||||
NS_IMETHOD LockFactory(PRBool aLock);
|
||||
|
||||
nsPluginFactory(const nsCID &aClass);
|
||||
|
||||
protected:
|
||||
virtual ~nsPluginFactory();
|
||||
|
||||
private:
|
||||
nsrefcnt mRefCnt;
|
||||
nsCID mClassID;
|
||||
};
|
||||
|
||||
nsPluginFactory :: nsPluginFactory(const nsCID &aClass)
|
||||
{
|
||||
mRefCnt = 0;
|
||||
mClassID = aClass;
|
||||
}
|
||||
|
||||
nsPluginFactory :: ~nsPluginFactory()
|
||||
{
|
||||
NS_ASSERTION(mRefCnt == 0, "non-zero refcnt at destruction");
|
||||
}
|
||||
|
||||
nsresult nsPluginFactory :: QueryInterface(const nsIID &aIID,
|
||||
void **aResult)
|
||||
{
|
||||
if (aResult == NULL) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
// Always NULL result, in case of failure
|
||||
*aResult = NULL;
|
||||
|
||||
if (aIID.Equals(kISupportsIID)) {
|
||||
*aResult = (void *)(nsISupports*)this;
|
||||
} else if (aIID.Equals(kIFactoryIID)) {
|
||||
*aResult = (void *)(nsIFactory*)this;
|
||||
}
|
||||
|
||||
if (*aResult == NULL) {
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
AddRef(); // Increase reference count for caller
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsrefcnt nsPluginFactory :: AddRef()
|
||||
{
|
||||
return ++mRefCnt;
|
||||
}
|
||||
|
||||
nsrefcnt nsPluginFactory :: Release()
|
||||
{
|
||||
if (--mRefCnt == 0) {
|
||||
delete this;
|
||||
return 0; // Don't access mRefCnt after deleting!
|
||||
}
|
||||
return mRefCnt;
|
||||
}
|
||||
|
||||
nsresult nsPluginFactory :: CreateInstance(nsISupports *aOuter,
|
||||
const nsIID &aIID,
|
||||
void **aResult)
|
||||
{
|
||||
if (aResult == NULL) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
*aResult = NULL;
|
||||
|
||||
nsISupports *inst = nsnull;
|
||||
|
||||
if (mClassID.Equals(kCPluginHost)) {
|
||||
inst = (nsISupports *)(nsIPluginManager *)new nsPluginHostImpl();
|
||||
}
|
||||
|
||||
if (inst == NULL) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
nsresult res = inst->QueryInterface(aIID, aResult);
|
||||
|
||||
if (res != NS_OK) {
|
||||
// We didn't get the right interface, so clean up
|
||||
delete inst;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
nsresult nsPluginFactory :: LockFactory(PRBool aLock)
|
||||
{
|
||||
// Not implemented in simplest case.
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// return the proper factory to the caller
|
||||
extern "C" NS_PLUGIN nsresult NSGetFactory(const nsCID &aClass, nsIFactory **aFactory)
|
||||
{
|
||||
if (nsnull == aFactory) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
*aFactory = new nsPluginFactory(aClass);
|
||||
|
||||
if (nsnull == aFactory) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
return (*aFactory)->QueryInterface(kIFactoryIID, (void**)aFactory);
|
||||
}
|
||||
1364
mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp
Normal file
1364
mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp
Normal file
File diff suppressed because it is too large
Load Diff
140
mozilla/modules/plugin/base/src/nsPluginHostImpl.h
Normal file
140
mozilla/modules/plugin/base/src/nsPluginHostImpl.h
Normal file
@@ -0,0 +1,140 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef nsPluginHostImpl_h__
|
||||
#define nsPluginHostImpl_h__
|
||||
|
||||
#include "xp_core.h"
|
||||
#include "nsIPluginManager.h"
|
||||
#include "nsIPluginHost.h"
|
||||
#include "nsCRT.h"
|
||||
#include "prlink.h"
|
||||
#include "nsIMalloc.h"
|
||||
|
||||
class ns4xPlugin;
|
||||
|
||||
class nsPluginTag
|
||||
{
|
||||
public:
|
||||
nsPluginTag();
|
||||
~nsPluginTag();
|
||||
|
||||
nsPluginTag *mNext;
|
||||
char *mName;
|
||||
char *mDescription;
|
||||
char *mMimeType;
|
||||
char *mMimeDescription;
|
||||
char *mExtensions;
|
||||
PRInt32 mVariants;
|
||||
char **mMimeTypeArray;
|
||||
char **mMimeDescriptionArray;
|
||||
char **mExtensionsArray;
|
||||
PRLibrary *mLibrary;
|
||||
nsIPlugin *mEntryPoint;
|
||||
PRUint32 mFlags;
|
||||
};
|
||||
|
||||
#define NS_PLUGIN_FLAG_ENABLED 0x0001 //is this plugin enabled?
|
||||
#define NS_PLUGIN_FLAG_OLDSCHOOL 0x0002 //is this a pre-xpcom plugin?
|
||||
|
||||
class nsPluginHostImpl : public nsIPluginManager, public nsIPluginHost
|
||||
{
|
||||
public:
|
||||
nsPluginHostImpl();
|
||||
~nsPluginHostImpl();
|
||||
|
||||
void* operator new(size_t sz) {
|
||||
void* rv = new char[sz];
|
||||
nsCRT::zero(rv, sz);
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
//nsIPluginManager interface
|
||||
|
||||
NS_IMETHOD
|
||||
GetValue(nsPluginManagerVariable variable, void *value);
|
||||
|
||||
NS_IMETHOD
|
||||
ReloadPlugins(PRBool reloadPages);
|
||||
|
||||
NS_IMETHOD
|
||||
UserAgent(const char* *resultingAgentString);
|
||||
|
||||
NS_IMETHOD
|
||||
GetURL(nsISupports* inst, const char* url, const char* target,
|
||||
void* notifyData = NULL, const char* altHost = NULL,
|
||||
const char* referrer = NULL, PRBool forceJSEnabled = PR_FALSE);
|
||||
|
||||
NS_IMETHOD
|
||||
PostURL(nsISupports* inst, const char* url, const char* target,
|
||||
PRUint32 postDataLen, const char* postData,
|
||||
PRBool isFile = PR_FALSE, void* notifyData = NULL,
|
||||
const char* altHost = NULL, const char* referrer = NULL,
|
||||
PRBool forceJSEnabled = PR_FALSE,
|
||||
PRUint32 postHeadersLength = 0, const char* postHeaders = NULL);
|
||||
|
||||
NS_IMETHOD
|
||||
FindProxyForURL(const char* url, char* *result);
|
||||
|
||||
//nsIPluginHost interface
|
||||
|
||||
NS_IMETHOD
|
||||
Init(void);
|
||||
|
||||
NS_IMETHOD
|
||||
Destroy(void);
|
||||
|
||||
NS_IMETHOD
|
||||
LoadPlugins(void);
|
||||
|
||||
NS_IMETHOD
|
||||
InstantiatePlugin(const char *aMimeType, nsIURL *aURL, nsIPluginInstanceOwner *aOwner);
|
||||
|
||||
NS_IMETHOD
|
||||
InstantiatePlugin(const char *aMimeType, nsString& aURLSpec, nsIPluginInstanceOwner *aOwner);
|
||||
|
||||
NS_IMETHOD
|
||||
InstantiatePlugin(const char *aMimeType, nsString& aURLSpec,
|
||||
nsIStreamListener *&aStreamListener, nsIPluginInstanceOwner *aOwner);
|
||||
|
||||
NS_IMETHOD
|
||||
NewPluginStream(const nsString& aURL, nsIPluginInstance *aInstance, void *aNotifyData);
|
||||
|
||||
NS_IMETHOD
|
||||
NewPluginStream(const nsString& aURL, nsIPluginInstanceOwner *aOwner, void *aNotifyData);
|
||||
|
||||
NS_IMETHOD
|
||||
NewPluginStream(nsIStreamListener *&aStreamListener, nsIPluginInstance *aInstance, void *aNotifyData);
|
||||
|
||||
//nsIFactory interface
|
||||
|
||||
NS_IMETHOD CreateInstance(nsISupports *aOuter,
|
||||
REFNSIID aIID,
|
||||
void **aResult);
|
||||
|
||||
NS_IMETHOD LockFactory(PRBool aLock);
|
||||
|
||||
private:
|
||||
char *mPluginPath;
|
||||
nsPluginTag *mPlugins;
|
||||
nsIMalloc *mMalloc;
|
||||
};
|
||||
|
||||
#endif
|
||||
179
mozilla/modules/plugin/base/src/nsPluginInstancePeer.cpp
Normal file
179
mozilla/modules/plugin/base/src/nsPluginInstancePeer.cpp
Normal file
@@ -0,0 +1,179 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "nscore.h"
|
||||
#include "nsPluginInstancePeer.h"
|
||||
#include "nsIPluginInstance.h"
|
||||
#include <stdio.h>
|
||||
#include "prmem.h"
|
||||
#include "plstr.h"
|
||||
|
||||
nsPluginInstancePeerImpl :: nsPluginInstancePeerImpl()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
|
||||
mInstance = nsnull;
|
||||
mOwner = nsnull;
|
||||
mMIMEType = nsnull;
|
||||
}
|
||||
|
||||
nsPluginInstancePeerImpl :: ~nsPluginInstancePeerImpl()
|
||||
{
|
||||
mInstance = nsnull;
|
||||
mOwner = nsnull;
|
||||
|
||||
if (nsnull != mMIMEType)
|
||||
{
|
||||
PR_Free((void *)mMIMEType);
|
||||
mMIMEType = nsnull;
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMPL_ADDREF(nsPluginInstancePeerImpl);
|
||||
NS_IMPL_RELEASE(nsPluginInstancePeerImpl);
|
||||
|
||||
static NS_DEFINE_IID(kIPluginTagInfoIID, NS_IPLUGINTAGINFO_IID);
|
||||
static NS_DEFINE_IID(kIPluginInstancePeerIID, NS_IPLUGININSTANCEPEER_IID);
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
|
||||
nsresult nsPluginInstancePeerImpl :: QueryInterface(const nsIID& iid, void** instance)
|
||||
{
|
||||
if (instance == NULL)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
if (iid.Equals(kIPluginInstancePeerIID))
|
||||
{
|
||||
*instance = (void *)(nsIPluginInstancePeer *)this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (iid.Equals(kIPluginTagInfoIID))
|
||||
{
|
||||
*instance = (void *)(nsIPluginTagInfo *)this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (iid.Equals(kISupportsIID))
|
||||
{
|
||||
*instance = (void *)(nsISupports *)(nsIPluginTagInfo *)this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPluginInstancePeerImpl :: GetValue(nsPluginInstancePeerVariable variable, void *value)
|
||||
{
|
||||
printf("instance peer getvalue %d called\n", variable);
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPluginInstancePeerImpl :: GetMIMEType(nsMIMEType *result)
|
||||
{
|
||||
if (nsnull == mMIMEType)
|
||||
*result = "";
|
||||
else
|
||||
*result = mMIMEType;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPluginInstancePeerImpl :: GetMode(nsPluginMode *result)
|
||||
{
|
||||
if (nsnull != mOwner)
|
||||
return mOwner->GetMode(result);
|
||||
else
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPluginInstancePeerImpl :: NewStream(nsMIMEType type, const char* target, nsIOutputStream* *result)
|
||||
{
|
||||
printf("instance peer newstream called\n");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPluginInstancePeerImpl :: ShowStatus(const char* message)
|
||||
{
|
||||
printf("instance peer showstatus called\n");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPluginInstancePeerImpl :: GetAttributes(PRUint16& n, const char*const*& names, const char*const*& values)
|
||||
{
|
||||
if (nsnull != mOwner)
|
||||
return mOwner->GetAttributes(n, names, values);
|
||||
else
|
||||
{
|
||||
n = 0;
|
||||
names = nsnull;
|
||||
values = nsnull;
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPluginInstancePeerImpl :: GetAttribute(const char* name, const char* *result)
|
||||
{
|
||||
if (nsnull != mOwner)
|
||||
return mOwner->GetAttribute(name, result);
|
||||
else
|
||||
{
|
||||
*result = "";
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPluginInstancePeerImpl :: SetWindowSize(PRUint32 width, PRUint32 height)
|
||||
{
|
||||
printf("instance peer setwindowsize called\n");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsPluginInstancePeerImpl :: Initialize(nsIPluginInstanceOwner *aOwner,
|
||||
const nsMIMEType aMIMEType)
|
||||
{
|
||||
//don't add a ref to precent circular references... MMP
|
||||
mOwner = aOwner;
|
||||
|
||||
aOwner->GetInstance(mInstance);
|
||||
//release this one too... MMP
|
||||
NS_IF_RELEASE(mInstance);
|
||||
|
||||
if (nsnull != aMIMEType)
|
||||
{
|
||||
mMIMEType = (nsMIMEType)PR_Malloc(PL_strlen(aMIMEType) + 1);
|
||||
|
||||
if (nsnull != mMIMEType)
|
||||
PL_strcpy((char *)mMIMEType, aMIMEType);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsPluginInstancePeerImpl :: GetOwner(nsIPluginInstanceOwner *&aOwner)
|
||||
{
|
||||
aOwner = mOwner;
|
||||
NS_IF_ADDREF(mOwner);
|
||||
|
||||
if (nsnull != mOwner)
|
||||
return NS_OK;
|
||||
else
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
75
mozilla/modules/plugin/base/src/nsPluginInstancePeer.h
Normal file
75
mozilla/modules/plugin/base/src/nsPluginInstancePeer.h
Normal file
@@ -0,0 +1,75 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef nsPluginInstancePeer_h___
|
||||
#define nsPluginInstancePeer_h___
|
||||
|
||||
#include "nsIPluginInstancePeer.h"
|
||||
#include "nsIPluginTagInfo.h"
|
||||
#include "nsIPluginInstanceOwner.h"
|
||||
|
||||
class nsPluginInstancePeerImpl : public nsIPluginInstancePeer, public nsIPluginTagInfo
|
||||
{
|
||||
public:
|
||||
nsPluginInstancePeerImpl();
|
||||
~nsPluginInstancePeerImpl();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
//nsIPluginInstancePeer interface
|
||||
|
||||
NS_IMETHOD
|
||||
GetValue(nsPluginInstancePeerVariable variable, void *value);
|
||||
|
||||
NS_IMETHOD
|
||||
GetMIMEType(nsMIMEType *result);
|
||||
|
||||
NS_IMETHOD
|
||||
GetMode(nsPluginMode *result);
|
||||
|
||||
NS_IMETHOD
|
||||
NewStream(nsMIMEType type, const char* target, nsIOutputStream* *result);
|
||||
|
||||
NS_IMETHOD
|
||||
ShowStatus(const char* message);
|
||||
|
||||
NS_IMETHOD
|
||||
SetWindowSize(PRUint32 width, PRUint32 height);
|
||||
|
||||
//nsIPluginTagInfo interface
|
||||
|
||||
NS_IMETHOD
|
||||
GetAttributes(PRUint16& n, const char*const*& names, const char*const*& values);
|
||||
|
||||
NS_IMETHOD
|
||||
GetAttribute(const char* name, const char* *result);
|
||||
|
||||
//locals
|
||||
|
||||
nsresult Initialize(nsIPluginInstanceOwner *aInstance,
|
||||
const nsMIMEType aMimeType);
|
||||
|
||||
nsresult GetOwner(nsIPluginInstanceOwner *&aOwner);
|
||||
|
||||
private:
|
||||
nsIPluginInstance *mInstance; //we don't add a ref to this
|
||||
nsIPluginInstanceOwner *mOwner; //we don't add a ref to this
|
||||
nsMIMEType mMIMEType;
|
||||
};
|
||||
|
||||
#endif
|
||||
168
mozilla/modules/plugin/base/src/nsPluginStreamPeer.cpp
Normal file
168
mozilla/modules/plugin/base/src/nsPluginStreamPeer.cpp
Normal file
@@ -0,0 +1,168 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "nsPluginStreamPeer.h"
|
||||
#include "nsIURL.h"
|
||||
#include "prmem.h"
|
||||
#include "nsString.h"
|
||||
|
||||
nsPluginStreamPeer :: nsPluginStreamPeer()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
|
||||
mURL = nsnull;
|
||||
mLength = 0;
|
||||
mLastMod = 0;
|
||||
mNotifyData = nsnull;
|
||||
mMIMEType = nsnull;
|
||||
mURLSpec = nsnull;
|
||||
mReason = nsPluginReason_NoReason;
|
||||
}
|
||||
|
||||
nsPluginStreamPeer :: ~nsPluginStreamPeer()
|
||||
{
|
||||
NS_IF_RELEASE(mURL);
|
||||
|
||||
if (nsnull != mMIMEType)
|
||||
{
|
||||
PR_Free((void *)mMIMEType);
|
||||
mMIMEType = nsnull;
|
||||
}
|
||||
|
||||
if (nsnull != mURLSpec)
|
||||
{
|
||||
PR_Free((void *)mURLSpec);
|
||||
mURLSpec = nsnull;
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMPL_ADDREF(nsPluginStreamPeer);
|
||||
NS_IMPL_RELEASE(nsPluginStreamPeer);
|
||||
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kIPluginStreamPeerIID, NS_IPLUGINSTREAMPEER_IID);
|
||||
//static NS_DEFINE_IID(kISeekablePluginStreamPeerIID, NS_ISEEKABLEPLUGINSTREAMPEER_IID);
|
||||
|
||||
NS_IMETHODIMP nsPluginStreamPeer :: QueryInterface(const nsIID& iid, void** instance)
|
||||
{
|
||||
if (instance == NULL)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
if (iid.Equals(kIPluginStreamPeerIID))
|
||||
{
|
||||
*instance = (void *)(nsIPluginStreamPeer *)this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
else if (iid.Equals(kISupportsIID))
|
||||
{
|
||||
*instance = (void *)(nsISupports *)this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPluginStreamPeer :: GetURL(const char* *result)
|
||||
{
|
||||
if (nsnull != mURL)
|
||||
{
|
||||
if (nsnull == mURLSpec)
|
||||
{
|
||||
nsString string;
|
||||
|
||||
mURL->ToString(string);
|
||||
|
||||
mURLSpec = (char *)PR_Malloc(string.Length() + 1);
|
||||
|
||||
if (nsnull != mURLSpec)
|
||||
string.ToCString(mURLSpec, string.Length() + 1);
|
||||
else
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
*result = mURLSpec;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
else
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPluginStreamPeer :: GetEnd(PRUint32 *result)
|
||||
{
|
||||
*result = mLength;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPluginStreamPeer :: GetLastModified(PRUint32 *result)
|
||||
{
|
||||
*result = mLastMod;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPluginStreamPeer :: GetNotifyData(void* *result)
|
||||
{
|
||||
*result = mNotifyData;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPluginStreamPeer :: GetReason(nsPluginReason *result)
|
||||
{
|
||||
*result = mReason;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPluginStreamPeer :: GetMIMEType(nsMIMEType *result)
|
||||
{
|
||||
*result = mMIMEType;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsPluginStreamPeer :: Initialize(nsIURL *aURL, PRUint32 aLength,
|
||||
PRUint32 aLastMod, nsMIMEType aMIMEType,
|
||||
void *aNotifyData)
|
||||
{
|
||||
mURL = aURL;
|
||||
NS_ADDREF(mURL);
|
||||
|
||||
mLength = aLength;
|
||||
mLastMod = aLastMod;
|
||||
|
||||
if (nsnull != aMIMEType)
|
||||
{
|
||||
PRInt32 len = strlen(aMIMEType);
|
||||
mMIMEType = (char *)PR_Malloc(len + 1);
|
||||
|
||||
if (nsnull != mMIMEType)
|
||||
strcpy((char *)mMIMEType, (char *)aMIMEType);
|
||||
else
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
mNotifyData = aNotifyData;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsPluginStreamPeer :: SetReason(nsPluginReason aReason)
|
||||
{
|
||||
mReason = aReason;
|
||||
return NS_OK;
|
||||
}
|
||||
71
mozilla/modules/plugin/base/src/nsPluginStreamPeer.h
Normal file
71
mozilla/modules/plugin/base/src/nsPluginStreamPeer.h
Normal file
@@ -0,0 +1,71 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef nsPluginStreamPeer_h___
|
||||
#define nsPluginStreamPeer_h___
|
||||
|
||||
#include "nscore.h"
|
||||
#include "nsIPluginStreamPeer.h"
|
||||
|
||||
class nsIURL;
|
||||
|
||||
class nsPluginStreamPeer : public nsIPluginStreamPeer
|
||||
{
|
||||
public:
|
||||
nsPluginStreamPeer();
|
||||
~nsPluginStreamPeer();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD
|
||||
GetURL(const char* *result);
|
||||
|
||||
NS_IMETHOD
|
||||
GetEnd(PRUint32 *result);
|
||||
|
||||
NS_IMETHOD
|
||||
GetLastModified(PRUint32 *result);
|
||||
|
||||
NS_IMETHOD
|
||||
GetNotifyData(void* *result);
|
||||
|
||||
NS_IMETHOD
|
||||
GetReason(nsPluginReason *result);
|
||||
|
||||
NS_IMETHOD
|
||||
GetMIMEType(nsMIMEType *result);
|
||||
|
||||
//locals
|
||||
|
||||
nsresult Initialize(nsIURL *aURL, PRUint32 aLength,
|
||||
PRUint32 aLastMod, nsMIMEType aMIMEType,
|
||||
void *aNotifyData);
|
||||
|
||||
nsresult SetReason(nsPluginReason aReason);
|
||||
|
||||
private:
|
||||
nsIURL *mURL;
|
||||
PRUint32 mLength;
|
||||
PRUint32 mLastMod;
|
||||
void *mNotifyData;
|
||||
nsMIMEType mMIMEType;
|
||||
char *mURLSpec;
|
||||
nsPluginReason mReason;
|
||||
};
|
||||
|
||||
#endif
|
||||
30
mozilla/modules/plugin/base/src/nsPluginsCID.h
Normal file
30
mozilla/modules/plugin/base/src/nsPluginsCID.h
Normal file
@@ -0,0 +1,30 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef nsPluginsCID_h__
|
||||
#define nsPluginsCID_h__
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsIFactory.h"
|
||||
#include "nsRepository.h"
|
||||
|
||||
#define NS_PLUGIN_HOST_CID \
|
||||
{ 0xadea1880, 0x1a8e, 0x11d2, \
|
||||
{ 0xa8, 0x2e, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
||||
|
||||
#endif // nsPluginsCID_h__
|
||||
33
mozilla/modules/plugin/makefile.win
Normal file
33
mozilla/modules/plugin/makefile.win
Normal file
@@ -0,0 +1,33 @@
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Makefile to build the MODULES\APPLET tree
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the depth of the current directory relative to the
|
||||
#// root of NS
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DEPTH=..\..
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify any "command" targets. (ie. DIRS, INSTALL_FILES, ...)
|
||||
#// (these must come before the common makefiles are included)
|
||||
#//
|
||||
#// DIRS - There are subdirectories to process
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
!if !defined(NGLAYOUT_PLUGINS)
|
||||
DIRS= public src
|
||||
!else
|
||||
DIRS= public nglsrc
|
||||
!endif
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Include the common makefile rules
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
24
mozilla/modules/plugin/nglsrc/MANIFEST
Normal file
24
mozilla/modules/plugin/nglsrc/MANIFEST
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist directory
|
||||
#
|
||||
|
||||
nsPluginsCID.h
|
||||
nsIPluginHost.h
|
||||
nsIPluginInstanceOwner.h
|
||||
50
mozilla/modules/plugin/nglsrc/Makefile
Normal file
50
mozilla/modules/plugin/nglsrc/Makefile
Normal file
@@ -0,0 +1,50 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH=../../..
|
||||
|
||||
include $(DEPTH)/config/config.mk
|
||||
|
||||
MODULE=raptor
|
||||
|
||||
LIBRARY_NAME=raptorplugin
|
||||
|
||||
EXPORTS = \
|
||||
nsPluginsCID.h \
|
||||
nsIPluginHost.h \
|
||||
nsIPluginInstanceOwner.h
|
||||
|
||||
CPPSRCS = \
|
||||
nsPluginHostImpl.cpp \
|
||||
nsPluginFactory.cpp \
|
||||
ns4xPlugin.cpp \
|
||||
ns4xPluginInstance.cpp \
|
||||
ns4xPluginStream.cpp \
|
||||
nsPluginInstancePeer.cpp \
|
||||
nsPluginStreamPeer.cpp \
|
||||
nsMalloc.cpp \
|
||||
$(NULL)
|
||||
|
||||
REQUIRES = raptor plugin java xpcom netlib libplc21
|
||||
|
||||
LCFLAGS =-D_IMPL_NS_PLUGIN
|
||||
|
||||
TARGETS = $(LIBRARY)
|
||||
|
||||
INCLUDES += -I.
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
||||
57
mozilla/modules/plugin/nglsrc/Makefile.in
Normal file
57
mozilla/modules/plugin/nglsrc/Makefile.in
Normal file
@@ -0,0 +1,57 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH=../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
MODULE=raptor
|
||||
|
||||
LIBRARY_NAME=raptorplugin
|
||||
|
||||
EXPORTS = \
|
||||
nsPluginsCID.h \
|
||||
nsIPluginHost.h \
|
||||
nsIPluginInstanceOwner.h
|
||||
|
||||
EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))
|
||||
|
||||
CPPSRCS = \
|
||||
nsPluginHostImpl.cpp \
|
||||
nsPluginFactory.cpp \
|
||||
ns4xPlugin.cpp \
|
||||
ns4xPluginInstance.cpp \
|
||||
ns4xPluginStream.cpp \
|
||||
nsPluginInstancePeer.cpp \
|
||||
nsPluginStreamPeer.cpp \
|
||||
nsMalloc.cpp \
|
||||
$(NULL)
|
||||
|
||||
REQUIRES = raptor plugin java xpcom netlib libplc21
|
||||
|
||||
LCFLAGS =-D_IMPL_NS_PLUGIN
|
||||
|
||||
TARGETS = $(LIBRARY)
|
||||
|
||||
INCLUDES += -I$(srcdir)/
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
80
mozilla/modules/plugin/nglsrc/makefile.win
Normal file
80
mozilla/modules/plugin/nglsrc/makefile.win
Normal file
@@ -0,0 +1,80 @@
|
||||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
DEPTH=..\..\..
|
||||
IGNORE_MANIFEST=1
|
||||
|
||||
EXPORTS = \
|
||||
nsPluginsCID.h \
|
||||
nsIPluginHost.h \
|
||||
nsIPluginInstanceOwner.h
|
||||
|
||||
MAKE_OBJ_TYPE = DLL
|
||||
DLLNAME = raptorplugin
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
MISCDEP = $(OURLIBS)
|
||||
|
||||
MODULE=raptor
|
||||
|
||||
DEFINES =-D_IMPL_NS_PLUGIN -DWIN32_LEAN_AND_MEAN
|
||||
|
||||
OBJS = \
|
||||
.\$(OBJDIR)\nsPluginHostImpl.obj \
|
||||
.\$(OBJDIR)\nsPluginFactory.obj \
|
||||
.\$(OBJDIR)\ns4xPlugin.obj \
|
||||
.\$(OBJDIR)\ns4xPluginInstance.obj \
|
||||
.\$(OBJDIR)\ns4xPluginStream.obj \
|
||||
.\$(OBJDIR)\nsPluginInstancePeer.obj \
|
||||
.\$(OBJDIR)\nsPluginStreamPeer.obj \
|
||||
.\$(OBJDIR)\nsMalloc.obj \
|
||||
$(NULL)
|
||||
|
||||
LINCS= \
|
||||
-I$(PUBLIC)\raptor \
|
||||
-I$(PUBLIC)\xpcom \
|
||||
-I$(PUBLIC)\plugin \
|
||||
-I$(PUBLIC)\java \
|
||||
-I$(PUBLIC)\netlib \
|
||||
$(NULL)
|
||||
|
||||
|
||||
LCFLAGS = \
|
||||
$(LCFLAGS) \
|
||||
-D_IMPL_NS_PLUGIN \
|
||||
$(NULL)
|
||||
|
||||
OURLIBS= \
|
||||
$(DIST)\lib\xpcom32.lib \
|
||||
$(DIST)\lib\raptorbase.lib \
|
||||
$(DIST)\lib\libplc21.lib \
|
||||
$(DIST)\lib\netlib.lib \
|
||||
$(LIBNSPR)
|
||||
|
||||
LLIBS= \
|
||||
$(OURLIBS) \
|
||||
version.lib
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
it:
|
||||
echo $(LLIBS)
|
||||
|
||||
install:: $(DLL)
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\bin\$(DLLNAME).dll
|
||||
780
mozilla/modules/plugin/nglsrc/ns4xPlugin.cpp
Normal file
780
mozilla/modules/plugin/nglsrc/ns4xPlugin.cpp
Normal file
@@ -0,0 +1,780 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
// TODO: Implement Java callbacks
|
||||
|
||||
#include "xp_core.h"
|
||||
#include "nsplugin.h"
|
||||
#include "ns4xPlugin.h"
|
||||
#include "nsIPluginStream.h"
|
||||
#include "ns4xPluginInstance.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
NPNetscapeFuncs ns4xPlugin::CALLBACKS;
|
||||
nsIPluginManager * ns4xPlugin::mPluginManager;
|
||||
nsIMalloc * ns4xPlugin::mMalloc;
|
||||
|
||||
void
|
||||
ns4xPlugin::CheckClassInitialized(void)
|
||||
{
|
||||
static PRBool initialized = FALSE;
|
||||
|
||||
if (initialized)
|
||||
return;
|
||||
|
||||
mPluginManager = nsnull;
|
||||
mMalloc = nsnull;
|
||||
|
||||
// XXX It'd be nice to make this const and initialize it
|
||||
// statically...
|
||||
CALLBACKS.size = sizeof(CALLBACKS);
|
||||
CALLBACKS.version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
|
||||
|
||||
CALLBACKS.geturl = NewNPN_GetURLProc(_geturl);
|
||||
CALLBACKS.posturl = NewNPN_PostURLProc(_posturl);
|
||||
CALLBACKS.requestread = NewNPN_RequestReadProc(_requestread);
|
||||
CALLBACKS.newstream = NewNPN_NewStreamProc(_newstream);
|
||||
CALLBACKS.write = NewNPN_WriteProc(_write);
|
||||
CALLBACKS.destroystream = NewNPN_DestroyStreamProc(_destroystream);
|
||||
CALLBACKS.status = NewNPN_StatusProc(_status);
|
||||
CALLBACKS.uagent = NewNPN_UserAgentProc(_useragent);
|
||||
CALLBACKS.memalloc = NewNPN_MemAllocProc(_memalloc);
|
||||
CALLBACKS.memfree = NewNPN_MemFreeProc(_memfree);
|
||||
CALLBACKS.memflush = NewNPN_MemFlushProc(_memflush);
|
||||
CALLBACKS.reloadplugins = NewNPN_ReloadPluginsProc(_reloadplugins);
|
||||
CALLBACKS.getJavaEnv = NewNPN_GetJavaEnvProc(_getJavaEnv);
|
||||
// CALLBACKS.getJavaPeer = NewNPN_GetJavaPeerProc(_getJavaPeer);
|
||||
CALLBACKS.geturlnotify = NewNPN_GetURLNotifyProc(_geturlnotify);
|
||||
CALLBACKS.posturlnotify = NewNPN_PostURLNotifyProc(_posturlnotify);
|
||||
CALLBACKS.getvalue = NewNPN_GetValueProc(_getvalue);
|
||||
CALLBACKS.setvalue = NewNPN_SetValueProc(_setvalue);
|
||||
CALLBACKS.invalidaterect = NewNPN_InvalidateRectProc(_invalidaterect);
|
||||
CALLBACKS.invalidateregion = NewNPN_InvalidateRegionProc(_invalidateregion);
|
||||
CALLBACKS.forceredraw = NewNPN_ForceRedrawProc(_forceredraw);
|
||||
|
||||
initialized = TRUE;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
ns4xPlugin::ns4xPlugin(NPPluginFuncs* callbacks, NP_PLUGINSHUTDOWN aShutdown)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
|
||||
memcpy((void*) &fCallbacks, (void*) callbacks, sizeof(fCallbacks));
|
||||
fShutdownEntry = aShutdown;
|
||||
}
|
||||
|
||||
|
||||
ns4xPlugin::~ns4xPlugin(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// nsISupports stuff
|
||||
|
||||
NS_IMPL_ADDREF(ns4xPlugin);
|
||||
NS_IMPL_RELEASE(ns4xPlugin);
|
||||
|
||||
static NS_DEFINE_IID(kILiveConnectPluginIID, NS_ILIVECONNECTPLUGIN_IID);
|
||||
static NS_DEFINE_IID(kIPluginIID, NS_IPLUGIN_IID);
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kIWindowlessPluginInstancePeerIID, NS_IWINDOWLESSPLUGININSTANCEPEER_IID);
|
||||
static NS_DEFINE_IID(kISeekablePluginStreamPeerIID, NS_ISEEKABLEPLUGINSTREAMPEER_IID);
|
||||
|
||||
nsresult
|
||||
ns4xPlugin::QueryInterface(const nsIID& iid, void** instance)
|
||||
{
|
||||
if (instance == NULL)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
if (iid.Equals(kIPluginIID))
|
||||
{
|
||||
*instance = (void *)(nsIPlugin *)this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (iid.Equals(kILiveConnectPluginIID))
|
||||
{
|
||||
// Check the 4.x plugin callbacks to see if it supports
|
||||
// LiveConnect...
|
||||
if (fCallbacks.javaClass == NULL)
|
||||
return NS_NOINTERFACE;
|
||||
|
||||
*instance = (void *)(nsILiveConnectPlugin *)this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (iid.Equals(kISupportsIID))
|
||||
{
|
||||
*instance = (void *)(nsISupports *)this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Static factory method.
|
||||
//
|
||||
|
||||
nsresult
|
||||
ns4xPlugin::CreatePlugin(PRLibrary *library,
|
||||
nsIPlugin **result)
|
||||
{
|
||||
CheckClassInitialized();
|
||||
|
||||
NP_GETENTRYPOINTS pfnGetEntryPoints =
|
||||
(NP_GETENTRYPOINTS)PR_FindSymbol(library, "NP_GetEntryPoints");
|
||||
|
||||
if (pfnGetEntryPoints == NULL)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
NPPluginFuncs callbacks;
|
||||
memset((void*) &callbacks, 0, sizeof(callbacks));
|
||||
|
||||
callbacks.size = sizeof(callbacks);
|
||||
|
||||
if (pfnGetEntryPoints(&callbacks) != NS_OK)
|
||||
return NS_ERROR_FAILURE; // XXX
|
||||
|
||||
#ifdef XP_WIN // XXX This is really XP, but we need to figure out how to do HIBYTE()
|
||||
if (HIBYTE(callbacks.version) < NP_VERSION_MAJOR)
|
||||
return NS_ERROR_FAILURE;
|
||||
#endif
|
||||
|
||||
NP_PLUGINSHUTDOWN pfnShutdown =
|
||||
(NP_PLUGINSHUTDOWN)PR_FindSymbol(library, "NP_Shutdown");
|
||||
|
||||
// the NP_Initialize entry point was misnamed as NP_PluginInit,
|
||||
// early in plugin project development. Its correct name is
|
||||
// documented now, and new developers expect it to work. However,
|
||||
// I don't want to break the plugins already in the field, so
|
||||
// we'll accept either name
|
||||
NP_PLUGININIT pfnInitialize =
|
||||
(NP_PLUGININIT)PR_FindSymbol(library, "NP_Initialize");
|
||||
|
||||
if (!pfnInitialize) {
|
||||
pfnInitialize =
|
||||
(NP_PLUGININIT)PR_FindSymbol(library, "NP_PluginInit");
|
||||
}
|
||||
|
||||
if (pfnInitialize == NULL)
|
||||
return NS_ERROR_UNEXPECTED; // XXX Right error?
|
||||
|
||||
if (pfnInitialize(&ns4xPlugin::CALLBACKS) != NS_OK)
|
||||
return NS_ERROR_UNEXPECTED; // XXX shoudl convert the 4.x error...
|
||||
|
||||
*result = new ns4xPlugin(&callbacks, pfnShutdown);
|
||||
|
||||
NS_ADDREF(*result);
|
||||
|
||||
if (*result == NULL)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult ns4xPlugin :: CreateInstance(nsISupports *aOuter,
|
||||
const nsIID &aIID,
|
||||
void **aResult)
|
||||
{
|
||||
if (aResult == NULL) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
*aResult = NULL;
|
||||
|
||||
nsISupports *inst;
|
||||
|
||||
inst = nsnull;
|
||||
inst = (nsISupports *)(nsIPluginInstance *)new ns4xPluginInstance(&fCallbacks);
|
||||
|
||||
if (inst == NULL) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
nsresult res = inst->QueryInterface(aIID, aResult);
|
||||
|
||||
if (res != NS_OK) {
|
||||
// We didn't get the right interface, so clean up
|
||||
delete inst;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
nsresult ns4xPlugin :: LockFactory(PRBool aLock)
|
||||
{
|
||||
// Not implemented in simplest case.
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static NS_DEFINE_IID(kIPluginManagerIID, NS_IPLUGINMANAGER_IID);
|
||||
static NS_DEFINE_IID(kIMallocIID, NS_IMALLOC_IID);
|
||||
|
||||
nsresult
|
||||
ns4xPlugin::Initialize(nsISupports* browserInterfaces)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
if (nsnull == mPluginManager)
|
||||
rv = browserInterfaces->QueryInterface(kIPluginManagerIID, (void **)&mPluginManager);
|
||||
|
||||
if (nsnull == mMalloc)
|
||||
rv = browserInterfaces->QueryInterface(kIMallocIID, (void **)&mMalloc);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
ns4xPlugin::Shutdown(void)
|
||||
{
|
||||
if (nsnull != fShutdownEntry)
|
||||
{
|
||||
#ifdef NS_DEBUG
|
||||
printf("shutting down plugin %08x\n", this);
|
||||
#endif
|
||||
fShutdownEntry();
|
||||
fShutdownEntry = nsnull;
|
||||
}
|
||||
|
||||
NS_IF_RELEASE(mPluginManager);
|
||||
NS_IF_RELEASE(mMalloc);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
ns4xPlugin::GetMIMEDescription(const char* *resultingDesc)
|
||||
{
|
||||
printf("plugin getmimedescription called\n");
|
||||
*resultingDesc = "";
|
||||
return NS_OK; // XXX make a callback, etc.
|
||||
}
|
||||
|
||||
nsresult
|
||||
ns4xPlugin::GetValue(nsPluginVariable variable, void *value)
|
||||
{
|
||||
printf("plugin getvalue %d called\n", variable);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
ns4xPlugin::GetJavaClass(jclass *resultingClass)
|
||||
{
|
||||
*resultingClass = (jclass)fCallbacks.javaClass;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Static callbacks that get routed back through the new C++ API
|
||||
//
|
||||
|
||||
nsresult NP_EXPORT
|
||||
ns4xPlugin::_geturl(NPP npp, const char* relativeURL, const char* target)
|
||||
{
|
||||
nsIPluginInstance *inst = (nsIPluginInstance *) npp->ndata;
|
||||
|
||||
NS_ASSERTION(inst != NULL, "null instance");
|
||||
NS_ASSERTION(mPluginManager != NULL, "null manager");
|
||||
|
||||
if (inst == NULL)
|
||||
return NS_ERROR_UNEXPECTED; // XXX
|
||||
|
||||
return mPluginManager->GetURL(inst, relativeURL, target);
|
||||
}
|
||||
|
||||
nsresult NP_EXPORT
|
||||
ns4xPlugin::_geturlnotify(NPP npp, const char* relativeURL, const char* target,
|
||||
void* notifyData)
|
||||
{
|
||||
nsIPluginInstance *inst = (nsIPluginInstance *) npp->ndata;
|
||||
|
||||
NS_ASSERTION(inst != NULL, "null instance");
|
||||
NS_ASSERTION(mPluginManager != NULL, "null manager");
|
||||
|
||||
if (inst == NULL)
|
||||
return NS_ERROR_UNEXPECTED; // XXX
|
||||
|
||||
return mPluginManager->GetURL(inst, relativeURL, target,
|
||||
notifyData);
|
||||
}
|
||||
|
||||
|
||||
nsresult NP_EXPORT
|
||||
ns4xPlugin::_posturlnotify(NPP npp, const char* relativeURL, const char *target,
|
||||
uint32 len, const char *buf, NPBool file,
|
||||
void* notifyData)
|
||||
{
|
||||
nsIPluginInstance *inst = (nsIPluginInstance *) npp->ndata;
|
||||
|
||||
NS_ASSERTION(inst != NULL, "null instance");
|
||||
NS_ASSERTION(mPluginManager != NULL, "null manager");
|
||||
|
||||
if (inst == NULL)
|
||||
return NS_ERROR_UNEXPECTED; // XXX
|
||||
|
||||
return mPluginManager->PostURL(inst, relativeURL, target,
|
||||
len, buf, file, notifyData);
|
||||
}
|
||||
|
||||
|
||||
nsresult NP_EXPORT
|
||||
ns4xPlugin::_posturl(NPP npp, const char* relativeURL, const char *target, uint32 len,
|
||||
const char *buf, NPBool file)
|
||||
{
|
||||
nsIPluginInstance *inst = (nsIPluginInstance *) npp->ndata;
|
||||
|
||||
NS_ASSERTION(inst != NULL, "null instance");
|
||||
NS_ASSERTION(mPluginManager != NULL, "null manager");
|
||||
|
||||
if (inst == NULL)
|
||||
return NS_ERROR_UNEXPECTED; // XXX
|
||||
|
||||
return mPluginManager->PostURL(inst, relativeURL, target,
|
||||
len, buf, file);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* A little helper class used to wrap up plugin manager streams (that is,
|
||||
* streams from the plugin to the browser).
|
||||
*/
|
||||
class ns4xStreamWrapper
|
||||
{
|
||||
protected:
|
||||
nsIOutputStream *fStream;
|
||||
NPStream fNPStream;
|
||||
|
||||
public:
|
||||
ns4xStreamWrapper(nsIOutputStream* stream);
|
||||
~ns4xStreamWrapper();
|
||||
|
||||
nsIOutputStream*
|
||||
GetStream(void);
|
||||
|
||||
NPStream*
|
||||
GetNPStream(void) {
|
||||
return &fNPStream;
|
||||
};
|
||||
};
|
||||
|
||||
ns4xStreamWrapper::ns4xStreamWrapper(nsIOutputStream* stream)
|
||||
: fStream(stream)
|
||||
{
|
||||
NS_ASSERTION(stream != NULL, "bad stream");
|
||||
|
||||
NS_ADDREF(fStream);
|
||||
|
||||
memset(&fNPStream, 0, sizeof(fNPStream));
|
||||
fNPStream.ndata = (void*) this;
|
||||
}
|
||||
|
||||
ns4xStreamWrapper::~ns4xStreamWrapper(void)
|
||||
{
|
||||
NS_IF_RELEASE(fStream);
|
||||
}
|
||||
|
||||
nsIOutputStream*
|
||||
ns4xStreamWrapper::GetStream(void)
|
||||
{
|
||||
NS_IF_ADDREF(fStream);
|
||||
|
||||
return fStream;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
nsresult NP_EXPORT
|
||||
ns4xPlugin::_newstream(NPP npp, NPMIMEType type, const char* window, NPStream* *result)
|
||||
{
|
||||
nsIPluginInstance *inst = (nsIPluginInstance *) npp->ndata;
|
||||
|
||||
NS_ASSERTION(inst != NULL, "null instance");
|
||||
|
||||
if (inst == NULL)
|
||||
return NS_ERROR_UNEXPECTED; // XXX
|
||||
|
||||
nsresult error;
|
||||
nsIOutputStream* stream;
|
||||
nsIPluginInstancePeer *peer;
|
||||
|
||||
if (NS_OK == inst->GetPeer(&peer))
|
||||
{
|
||||
if ((error = peer->NewStream((const char*) type, window, &stream)) != NS_OK)
|
||||
{
|
||||
NS_RELEASE(peer);
|
||||
return error;
|
||||
}
|
||||
|
||||
ns4xStreamWrapper* wrapper = new ns4xStreamWrapper(stream);
|
||||
|
||||
if (wrapper == NULL)
|
||||
{
|
||||
NS_RELEASE(peer);
|
||||
NS_RELEASE(stream);
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
(*result) = wrapper->GetNPStream();
|
||||
|
||||
NS_RELEASE(peer);
|
||||
|
||||
return error;
|
||||
}
|
||||
else
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
int32 NP_EXPORT
|
||||
ns4xPlugin::_write(NPP npp, NPStream *pstream, int32 len, void *buffer)
|
||||
{
|
||||
ns4xStreamWrapper* wrapper = (ns4xStreamWrapper*) npp->ndata;
|
||||
|
||||
NS_ASSERTION(wrapper != NULL, "null wrapper");
|
||||
|
||||
if (wrapper == NULL)
|
||||
return 0;
|
||||
|
||||
nsIOutputStream* stream = wrapper->GetStream();
|
||||
|
||||
PRInt32 count = 0;
|
||||
nsresult rv = stream->Write((char *)buffer, 0, len, &count);
|
||||
|
||||
NS_RELEASE(stream);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
nsresult NP_EXPORT
|
||||
ns4xPlugin::_destroystream(NPP npp, NPStream *pstream, NPError reason)
|
||||
{
|
||||
ns4xStreamWrapper* wrapper = (ns4xStreamWrapper*) npp->ndata;
|
||||
|
||||
NS_ASSERTION(wrapper != NULL, "null wrapper");
|
||||
|
||||
if (wrapper == NULL)
|
||||
return 0;
|
||||
|
||||
// This will release the wrapped nsIOutputStream.
|
||||
delete wrapper;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void NP_EXPORT
|
||||
ns4xPlugin::_status(NPP npp, const char *message)
|
||||
{
|
||||
nsIPluginInstance *inst = (nsIPluginInstance *) npp->ndata;
|
||||
|
||||
NS_ASSERTION(inst != NULL, "null instance");
|
||||
|
||||
if (inst == NULL)
|
||||
return;
|
||||
|
||||
nsIPluginInstancePeer *peer;
|
||||
|
||||
if (NS_OK == inst->GetPeer(&peer))
|
||||
{
|
||||
peer->ShowStatus(message);
|
||||
NS_RELEASE(peer);
|
||||
}
|
||||
}
|
||||
|
||||
void NP_EXPORT
|
||||
ns4xPlugin::_memfree (void *ptr)
|
||||
{
|
||||
mMalloc->Free(ptr);
|
||||
}
|
||||
|
||||
uint32 NP_EXPORT
|
||||
ns4xPlugin::_memflush(uint32 size)
|
||||
{
|
||||
mMalloc->HeapMinimize();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void NP_EXPORT
|
||||
ns4xPlugin::_reloadplugins(NPBool reloadPages)
|
||||
{
|
||||
mPluginManager->ReloadPlugins(reloadPages);
|
||||
}
|
||||
|
||||
void NP_EXPORT
|
||||
ns4xPlugin::_invalidaterect(NPP npp, NPRect *invalidRect)
|
||||
{
|
||||
nsIPluginInstance *inst = (nsIPluginInstance *) npp->ndata;
|
||||
|
||||
NS_ASSERTION(inst != NULL, "null instance");
|
||||
|
||||
if (inst == NULL)
|
||||
return;
|
||||
|
||||
nsIPluginInstancePeer *peer;
|
||||
nsIWindowlessPluginInstancePeer *wpeer;
|
||||
|
||||
if (NS_OK == inst->GetPeer(&peer))
|
||||
{
|
||||
if (NS_OK == peer->QueryInterface(kIWindowlessPluginInstancePeerIID, (void **)&wpeer))
|
||||
{
|
||||
// XXX nsRect & NPRect are structurally equivalent
|
||||
wpeer->InvalidateRect((nsPluginRect *)invalidRect);
|
||||
NS_RELEASE(wpeer);
|
||||
}
|
||||
|
||||
NS_RELEASE(peer);
|
||||
}
|
||||
}
|
||||
|
||||
void NP_EXPORT
|
||||
ns4xPlugin::_invalidateregion(NPP npp, NPRegion invalidRegion)
|
||||
{
|
||||
nsIPluginInstance *inst = (nsIPluginInstance *) npp->ndata;
|
||||
|
||||
NS_ASSERTION(inst != NULL, "null instance");
|
||||
|
||||
if (inst == NULL)
|
||||
return;
|
||||
|
||||
nsIPluginInstancePeer *peer;
|
||||
nsIWindowlessPluginInstancePeer *wpeer;
|
||||
|
||||
if (NS_OK == inst->GetPeer(&peer))
|
||||
{
|
||||
if (NS_OK == peer->QueryInterface(kIWindowlessPluginInstancePeerIID, (void **)&wpeer))
|
||||
{
|
||||
// XXX nsRegion & NPRegion are typedef'd to the same thing
|
||||
wpeer->InvalidateRegion((nsPluginRegion)invalidRegion);
|
||||
NS_RELEASE(wpeer);
|
||||
}
|
||||
|
||||
NS_RELEASE(peer);
|
||||
}
|
||||
}
|
||||
|
||||
void NP_EXPORT
|
||||
ns4xPlugin::_forceredraw(NPP npp)
|
||||
{
|
||||
nsIPluginInstance *inst = (nsIPluginInstance *) npp->ndata;
|
||||
|
||||
NS_ASSERTION(inst != NULL, "null instance");
|
||||
|
||||
if (inst == NULL)
|
||||
return;
|
||||
|
||||
nsIPluginInstancePeer *peer;
|
||||
nsIWindowlessPluginInstancePeer *wpeer;
|
||||
|
||||
if (NS_OK == inst->GetPeer(&peer))
|
||||
{
|
||||
if (NS_OK == peer->QueryInterface(kIWindowlessPluginInstancePeerIID, (void **)&wpeer))
|
||||
{
|
||||
wpeer->ForceRedraw();
|
||||
NS_RELEASE(wpeer);
|
||||
}
|
||||
|
||||
NS_RELEASE(peer);
|
||||
}
|
||||
}
|
||||
|
||||
nsresult NP_EXPORT
|
||||
ns4xPlugin::_getvalue(NPP npp, NPNVariable variable, void *result)
|
||||
{
|
||||
nsIPluginInstance *inst = (nsIPluginInstance *) npp->ndata;
|
||||
|
||||
NS_ASSERTION(inst != NULL, "null instance");
|
||||
|
||||
if (inst == NULL)
|
||||
return NS_ERROR_FAILURE; // XXX
|
||||
|
||||
nsIPluginInstancePeer *peer;
|
||||
|
||||
if (NS_OK == inst->GetPeer(&peer))
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
// XXX Note that for backwards compatibility, the old NPNVariables
|
||||
// map correctly to NPPluginManagerVariables.
|
||||
rv = peer->GetValue((nsPluginInstancePeerVariable)variable, result);
|
||||
NS_RELEASE(peer);
|
||||
return rv;
|
||||
}
|
||||
else
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
nsresult NP_EXPORT
|
||||
ns4xPlugin::_setvalue(NPP npp, NPPVariable variable, void *result)
|
||||
{
|
||||
ns4xPluginInstance *inst = (ns4xPluginInstance *) npp->ndata;
|
||||
|
||||
NS_ASSERTION(inst != NULL, "null instance");
|
||||
|
||||
if (inst == NULL)
|
||||
return NS_ERROR_FAILURE; // XXX
|
||||
|
||||
switch (variable)
|
||||
{
|
||||
case NPPVpluginWindowBool:
|
||||
return inst->SetWindowless(*((NPBool *)result));
|
||||
|
||||
case NPPVpluginTransparentBool:
|
||||
return inst->SetTransparent(*((NPBool *)result));
|
||||
|
||||
default:
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#if 0
|
||||
nsIPluginInstancePeer *peer;
|
||||
|
||||
if (NS_OK == inst->GetPeer(&peer))
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
// XXX Note that for backwards compatibility, the old NPPVariables
|
||||
// map correctly to NPPluginVariables.
|
||||
rv = peer->SetValue((nsPluginInstancePeerVariable)variable, result);
|
||||
NS_RELEASE(peer);
|
||||
return rv;
|
||||
}
|
||||
else
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
#endif
|
||||
}
|
||||
|
||||
nsresult NP_EXPORT
|
||||
ns4xPlugin::_requestread(NPStream *pstream, NPByteRange *rangeList)
|
||||
{
|
||||
nsIPluginStreamPeer* streamPeer = (nsIPluginStreamPeer*) pstream->ndata;
|
||||
|
||||
NS_ASSERTION(streamPeer != NULL, "null streampeer");
|
||||
|
||||
if (streamPeer == NULL)
|
||||
return NS_ERROR_FAILURE; // XXX
|
||||
|
||||
nsISeekablePluginStreamPeer* seekablePeer = NULL;
|
||||
|
||||
if (streamPeer->QueryInterface(kISeekablePluginStreamPeerIID,
|
||||
(void**)seekablePeer) == NS_OK)
|
||||
{
|
||||
nsresult error;
|
||||
|
||||
// XXX nsByteRange & NPByteRange are structurally equivalent.
|
||||
error = seekablePeer->RequestRead((nsByteRange *)rangeList);
|
||||
NS_RELEASE(seekablePeer);
|
||||
return error;
|
||||
}
|
||||
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// On 68K Mac (XXX still supported?), we need to make sure that the
|
||||
// pointers are in D0 for the following functions that return pointers.
|
||||
//
|
||||
|
||||
#if defined(XP_MAC) && !defined(powerc)
|
||||
#pragma pointers_in_D0
|
||||
#endif
|
||||
|
||||
|
||||
JRIEnv* NP_EXPORT
|
||||
ns4xPlugin::_getJavaEnv(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char * NP_EXPORT
|
||||
ns4xPlugin::_useragent(NPP npp)
|
||||
{
|
||||
NS_ASSERTION(mPluginManager != NULL, "null pluginmanager");
|
||||
|
||||
if (mPluginManager == NULL)
|
||||
return NULL;
|
||||
|
||||
char *retstr;
|
||||
|
||||
mPluginManager->UserAgent((const char **)&retstr);
|
||||
|
||||
return retstr;
|
||||
}
|
||||
|
||||
void * NP_EXPORT
|
||||
ns4xPlugin::_memalloc (uint32 size)
|
||||
{
|
||||
return mMalloc->Alloc(size);
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
#ifdef JAVA
|
||||
java_lang_Class* NP_EXPORT
|
||||
ns4xPlugin::_getJavaClass(void* handle)
|
||||
{
|
||||
// Is this just a generic call into the Java VM?
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
jref NP_EXPORT
|
||||
ns4xPlugin::_getJavaPeer(NPP npp)
|
||||
{
|
||||
NPIPluginInstancePeer* peer = (NPIPluginInstancePeer*) npp->ndata;
|
||||
PR_ASSERT(peer != NULL);
|
||||
if (peer == NULL)
|
||||
return NULL;
|
||||
|
||||
static NS_DEFINE_IID(kILiveConnectPluginInstancePeerIID,
|
||||
NP_ILIVECONNECTPLUGININSTANCEPEER_IID);
|
||||
|
||||
NPILiveConnectPluginInstancePeer* lcPeer = NULL;
|
||||
if (peer->QueryInterface(kILiveConnectPluginInstancePeerIID,
|
||||
(void**) &lcPeer) == NS_OK) {
|
||||
jobject result = lcPeer->GetJavaPeer();
|
||||
lcPeer->Release();
|
||||
return result;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(XP_MAC) && !defined(powerc)
|
||||
#pragma pointers_in_A0
|
||||
#endif
|
||||
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
233
mozilla/modules/plugin/nglsrc/ns4xPlugin.h
Normal file
233
mozilla/modules/plugin/nglsrc/ns4xPlugin.h
Normal file
@@ -0,0 +1,233 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef ns4xPlugin_h__
|
||||
#define ns4xPlugin_h__
|
||||
|
||||
#include "nsplugin.h"
|
||||
#include "prlink.h" // for PRLibrary
|
||||
#include "npupp.h"
|
||||
#include "nsIMalloc.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
* Use this macro before each exported function
|
||||
* (between the return address and the function
|
||||
* itself), to ensure that the function has the
|
||||
* right calling conventions on Win16.
|
||||
*/
|
||||
|
||||
#ifdef XP_WIN16
|
||||
#define NP_EXPORT __export
|
||||
#elif defined(XP_OS2)
|
||||
#define NP_EXPORT _System
|
||||
#else
|
||||
#define NP_EXPORT
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// XXX These are defined in platform specific FE directories right now :-/
|
||||
|
||||
//BTW: this sucks rocks.
|
||||
#ifdef XP_WIN
|
||||
#define PLUGIN_ENTRYPOINT_CALL_TYPE __stdcall
|
||||
#else
|
||||
#define PLUGIN_ENTRYPOINT_CALL_TYPE
|
||||
#endif
|
||||
|
||||
typedef NPError (PLUGIN_ENTRYPOINT_CALL_TYPE *NP_GETENTRYPOINTS)(NPPluginFuncs* pCallbacks);
|
||||
typedef NPError (PLUGIN_ENTRYPOINT_CALL_TYPE *NP_PLUGININIT)(const NPNetscapeFuncs* pCallbacks);
|
||||
typedef NPError (PLUGIN_ENTRYPOINT_CALL_TYPE *NP_PLUGINSHUTDOWN)();
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* A 5.0 wrapper for a 4.x style plugin.
|
||||
*/
|
||||
class ns4xPlugin : public nsILiveConnectPlugin
|
||||
{
|
||||
public:
|
||||
ns4xPlugin(NPPluginFuncs* callbacks, NP_PLUGINSHUTDOWN aShutdown);
|
||||
~ns4xPlugin(void);
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
//nsIFactory interface
|
||||
|
||||
NS_IMETHOD CreateInstance(nsISupports *aOuter,
|
||||
REFNSIID aIID,
|
||||
void **aResult);
|
||||
|
||||
NS_IMETHOD LockFactory(PRBool aLock);
|
||||
|
||||
//nsIPlugin interface
|
||||
|
||||
NS_IMETHOD
|
||||
Initialize(nsISupports* browserInterfaces);
|
||||
|
||||
NS_IMETHOD
|
||||
Shutdown(void);
|
||||
|
||||
NS_IMETHOD
|
||||
GetMIMEDescription(const char* *resultingDesc);
|
||||
|
||||
NS_IMETHOD
|
||||
GetValue(nsPluginVariable variable, void *value);
|
||||
|
||||
//nsILiveConnectPlugin interface
|
||||
|
||||
NS_IMETHOD
|
||||
GetJavaClass(jclass *resultingClass);
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// ns4xPlugin-specific methods
|
||||
|
||||
/**
|
||||
* A static factory method for constructing 4.x plugins. Constructs
|
||||
* and initializes an ns4xPlugin object, and returns it in
|
||||
* <b>result</b>.
|
||||
*/
|
||||
static nsresult
|
||||
CreatePlugin(PRLibrary *library,
|
||||
nsIPlugin **result);
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Ensures that the static CALLBACKS is properly initialized
|
||||
*/
|
||||
static void CheckClassInitialized(void);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Static stub functions that are exported to the 4.x plugin as entry
|
||||
// points via the CALLBACKS variable.
|
||||
//
|
||||
static nsresult NP_EXPORT
|
||||
_requestread(NPStream *pstream, NPByteRange *rangeList);
|
||||
|
||||
static nsresult NP_EXPORT
|
||||
_geturlnotify(NPP npp, const char* relativeURL, const char* target, void* notifyData);
|
||||
|
||||
static nsresult NP_EXPORT
|
||||
_getvalue(NPP npp, NPNVariable variable, void *r_value);
|
||||
|
||||
static nsresult NP_EXPORT
|
||||
_setvalue(NPP npp, NPPVariable variable, void *r_value);
|
||||
|
||||
static nsresult NP_EXPORT
|
||||
_geturl(NPP npp, const char* relativeURL, const char* target);
|
||||
|
||||
static nsresult NP_EXPORT
|
||||
_posturlnotify(NPP npp, const char* relativeURL, const char *target,
|
||||
uint32 len, const char *buf, NPBool file, void* notifyData);
|
||||
|
||||
static nsresult NP_EXPORT
|
||||
_posturl(NPP npp, const char* relativeURL, const char *target, uint32 len,
|
||||
const char *buf, NPBool file);
|
||||
|
||||
static nsresult NP_EXPORT
|
||||
_newstream(NPP npp, NPMIMEType type, const char* window, NPStream** pstream);
|
||||
|
||||
static int32 NP_EXPORT
|
||||
_write(NPP npp, NPStream *pstream, int32 len, void *buffer);
|
||||
|
||||
static nsresult NP_EXPORT
|
||||
_destroystream(NPP npp, NPStream *pstream, NPError reason);
|
||||
|
||||
static void NP_EXPORT
|
||||
_status(NPP npp, const char *message);
|
||||
|
||||
#if 0
|
||||
|
||||
static void NP_EXPORT
|
||||
_registerwindow(NPP npp, void* window);
|
||||
|
||||
static void NP_EXPORT
|
||||
_unregisterwindow(NPP npp, void* window);
|
||||
|
||||
static int16 NP_EXPORT
|
||||
_allocateMenuID(NPP npp, NPBool isSubmenu);
|
||||
|
||||
#endif
|
||||
|
||||
static void NP_EXPORT
|
||||
_memfree (void *ptr);
|
||||
|
||||
static uint32 NP_EXPORT
|
||||
_memflush(uint32 size);
|
||||
|
||||
static void NP_EXPORT
|
||||
_reloadplugins(NPBool reloadPages);
|
||||
|
||||
static void NP_EXPORT
|
||||
_invalidaterect(NPP npp, NPRect *invalidRect);
|
||||
|
||||
static void NP_EXPORT
|
||||
_invalidateregion(NPP npp, NPRegion invalidRegion);
|
||||
|
||||
static void NP_EXPORT
|
||||
_forceredraw(NPP npp);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Anything that returns a pointer needs to be _HERE_ for 68K Mac to
|
||||
// work.
|
||||
//
|
||||
|
||||
#if defined(XP_MAC) && !defined(powerc)
|
||||
#pragma pointers_in_D0
|
||||
#endif
|
||||
|
||||
static const char* NP_EXPORT
|
||||
_useragent(NPP npp);
|
||||
|
||||
static void* NP_EXPORT
|
||||
_memalloc (uint32 size);
|
||||
|
||||
static JRIEnv* NP_EXPORT
|
||||
_getJavaEnv(void);
|
||||
|
||||
#if 0
|
||||
|
||||
static jref NP_EXPORT
|
||||
_getJavaPeer(NPP npp);
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(XP_MAC) && !defined(powerc)
|
||||
#pragma pointers_in_A0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The plugin-side callbacks that the browser calls. One set of
|
||||
* plugin callbacks for each plugin.
|
||||
*/
|
||||
NPPluginFuncs fCallbacks;
|
||||
|
||||
NP_PLUGINSHUTDOWN fShutdownEntry;
|
||||
|
||||
/**
|
||||
* The browser-side callbacks that a 4.x-style plugin calls.
|
||||
*/
|
||||
static NPNetscapeFuncs CALLBACKS;
|
||||
|
||||
static nsIPluginManager *mPluginManager;
|
||||
static nsIMalloc *mMalloc;
|
||||
};
|
||||
|
||||
#endif // ns4xPlugin_h__
|
||||
296
mozilla/modules/plugin/nglsrc/ns4xPluginInstance.cpp
Normal file
296
mozilla/modules/plugin/nglsrc/ns4xPluginInstance.cpp
Normal file
@@ -0,0 +1,296 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "ns4xPluginInstance.h"
|
||||
#include "ns4xPluginStream.h"
|
||||
#include "prlog.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
ns4xPluginInstance :: ns4xPluginInstance(NPPluginFuncs* callbacks)
|
||||
: fCallbacks(callbacks)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
|
||||
NS_ASSERTION(fCallbacks != NULL, "null callbacks");
|
||||
|
||||
// Initialize the NPP structure.
|
||||
|
||||
fNPP.pdata = NULL;
|
||||
fNPP.ndata = this;
|
||||
|
||||
fPeer = nsnull;
|
||||
|
||||
mWindowless = PR_FALSE;
|
||||
mTransparent = PR_FALSE;
|
||||
}
|
||||
|
||||
|
||||
ns4xPluginInstance :: ~ns4xPluginInstance(void)
|
||||
{
|
||||
NS_RELEASE(fPeer);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
NS_IMPL_ADDREF(ns4xPluginInstance);
|
||||
NS_IMPL_RELEASE(ns4xPluginInstance);
|
||||
|
||||
static NS_DEFINE_IID(kIPluginInstanceIID, NS_IPLUGININSTANCE_IID);
|
||||
static NS_DEFINE_IID(kIEventHandlerIID, NS_IEVENTHANDLER_IID);
|
||||
static NS_DEFINE_IID(kIPluginTagInfoIID, NS_IPLUGINTAGINFO_IID);
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance :: QueryInterface(const nsIID& iid, void** instance)
|
||||
{
|
||||
if (instance == NULL)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
if (iid.Equals(kIPluginInstanceIID))
|
||||
{
|
||||
*instance = (void *)(nsIPluginInstance *)this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (iid.Equals(kIEventHandlerIID))
|
||||
{
|
||||
*instance = (void *)(nsIEventHandler *)this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (iid.Equals(kISupportsIID))
|
||||
{
|
||||
*instance = (void *)(nsISupports *)this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance :: Initialize(nsIPluginInstancePeer* peer)
|
||||
{
|
||||
PRUint16 count;
|
||||
const char* const* names;
|
||||
const char* const* values;
|
||||
|
||||
NS_ASSERTION(peer != NULL, "null peer");
|
||||
|
||||
fPeer = peer;
|
||||
|
||||
NS_ADDREF(fPeer);
|
||||
|
||||
nsresult error;
|
||||
nsIPluginTagInfo *taginfo;
|
||||
|
||||
error = fPeer->QueryInterface(kIPluginTagInfoIID, (void **)&taginfo);
|
||||
|
||||
if (NS_OK == error)
|
||||
{
|
||||
if ((error = taginfo->GetAttributes(count, names, values)) != NS_OK)
|
||||
return error;
|
||||
|
||||
if (fCallbacks->newp == NULL)
|
||||
return NS_ERROR_FAILURE; // XXX right error?
|
||||
|
||||
// XXX Note that the NPPluginType_* enums were crafted to be
|
||||
// backward compatible...
|
||||
|
||||
nsPluginMode mode;
|
||||
nsMIMEType mimetype;
|
||||
|
||||
fPeer->GetMode(&mode);
|
||||
fPeer->GetMIMEType(&mimetype);
|
||||
|
||||
error = (nsresult)
|
||||
CallNPP_NewProc(fCallbacks->newp,
|
||||
(char *)mimetype,
|
||||
&fNPP,
|
||||
(PRUint16)mode,
|
||||
count,
|
||||
(char**)names,
|
||||
(char**)values,
|
||||
NULL); // saved data
|
||||
|
||||
NS_RELEASE(taginfo);
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance :: GetPeer(nsIPluginInstancePeer* *resultingPeer)
|
||||
{
|
||||
NS_ADDREF(fPeer);
|
||||
*resultingPeer = fPeer;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance::Start(void)
|
||||
{
|
||||
// XXX At some point, we maybe should implement start and stop to
|
||||
// load/unload the 4.x plugin, just in case there are some plugins
|
||||
// that rely on that behavior...
|
||||
printf("instance start called\n");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance::Stop(void)
|
||||
{
|
||||
printf("instance stop called\n");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance::Destroy(void)
|
||||
{
|
||||
nsresult error;
|
||||
|
||||
printf("instance destroy called\n");
|
||||
if (fCallbacks->destroy == NULL)
|
||||
return NS_ERROR_FAILURE; // XXX right error?
|
||||
|
||||
NPSavedData *sdata;
|
||||
|
||||
error = (nsresult)CallNPP_DestroyProc(fCallbacks->destroy,
|
||||
&fNPP, &sdata); // saved data
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance::SetWindow(nsPluginWindow* window)
|
||||
{
|
||||
// XXX 4.x plugins don't want a SetWindow(NULL).
|
||||
|
||||
if (window == NULL)
|
||||
return NS_OK;
|
||||
|
||||
nsresult error = NS_OK;
|
||||
|
||||
if (fCallbacks->setwindow)
|
||||
{
|
||||
// XXX Turns out that NPPluginWindow and NPWindow are structurally
|
||||
// identical (on purpose!), so there's no need to make a copy.
|
||||
|
||||
error = (nsresult) CallNPP_SetWindowProc(fCallbacks->setwindow,
|
||||
&fNPP,
|
||||
(NPWindow*) window);
|
||||
|
||||
// XXX In the old code, we'd just ignore any errors coming
|
||||
// back from the plugin's SetWindow(). Is this the correct
|
||||
// behavior?!?
|
||||
|
||||
if (error != NS_OK)
|
||||
printf("error in setwindow %d\n", error);
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance::NewStream(nsIPluginStreamPeer* peer, nsIPluginStream* *result)
|
||||
{
|
||||
(*result) = NULL;
|
||||
|
||||
ns4xPluginStream* stream = new ns4xPluginStream();
|
||||
|
||||
if (stream == NULL)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
NS_ADDREF(stream);
|
||||
|
||||
nsresult error;
|
||||
|
||||
// does it need the peer?
|
||||
|
||||
if ((error = stream->Initialize(this, peer)) != NS_OK)
|
||||
{
|
||||
NS_RELEASE(stream);
|
||||
return error;
|
||||
}
|
||||
|
||||
(*result) = stream;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance::Print(nsPluginPrint* platformPrint)
|
||||
{
|
||||
printf("instance print called\n");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance::HandleEvent(nsPluginEvent* event, PRBool* handled)
|
||||
{
|
||||
printf("instance handleevent called\n");
|
||||
*handled = PR_FALSE;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance::URLNotify(const char* url, const char* target,
|
||||
nsPluginReason reason, void* notifyData)
|
||||
{
|
||||
if (fCallbacks->urlnotify != NULL)
|
||||
{
|
||||
CallNPP_URLNotifyProc(fCallbacks->urlnotify,
|
||||
&fNPP,
|
||||
url,
|
||||
reason,
|
||||
notifyData);
|
||||
}
|
||||
|
||||
return NS_OK; //XXX this seems bad...
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance :: GetValue(nsPluginInstanceVariable variable, void *value)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
switch (variable)
|
||||
{
|
||||
case nsPluginInstanceVariable_WindowlessBool:
|
||||
*(PRBool *)value = mWindowless;
|
||||
break;
|
||||
|
||||
case nsPluginInstanceVariable_TransparentBool:
|
||||
*(PRBool *)value = mTransparent;
|
||||
break;
|
||||
|
||||
default:
|
||||
rv = NS_ERROR_FAILURE; //XXX this is bad
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance :: SetWindowless(PRBool aWindowless)
|
||||
{
|
||||
mWindowless = aWindowless;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginInstance :: SetTransparent(PRBool aTransparent)
|
||||
{
|
||||
mTransparent = aTransparent;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
145
mozilla/modules/plugin/nglsrc/ns4xPluginInstance.h
Normal file
145
mozilla/modules/plugin/nglsrc/ns4xPluginInstance.h
Normal file
@@ -0,0 +1,145 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef ns4xPluginInstance_h__
|
||||
#define ns4xPluginInstance_h__
|
||||
|
||||
#define _UINT32
|
||||
#define _INT32
|
||||
|
||||
#include "nsplugin.h"
|
||||
#include "npupp.h"
|
||||
#include "jri.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class ns4xPluginInstance : public nsIPluginInstance
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Construct a new 4.x plugin instance with the specified peer
|
||||
* and callbacks.
|
||||
*/
|
||||
ns4xPluginInstance(NPPluginFuncs* callbacks);
|
||||
|
||||
// Use Release() to destroy this
|
||||
~ns4xPluginInstance(void);
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// nsIPluginInstance methods
|
||||
|
||||
/**
|
||||
* Actually initialize the plugin instance. This calls the 4.x <b>newp</b>
|
||||
* callback, and may return an error (which is why it is distinct from the
|
||||
* constructor.) If an error is returned, the caller should <i>not</i>
|
||||
* continue to use the <b>ns4xPluginInstance</b> object.
|
||||
*/
|
||||
NS_METHOD
|
||||
Initialize(nsIPluginInstancePeer* peer);
|
||||
|
||||
NS_IMETHOD
|
||||
GetPeer(nsIPluginInstancePeer* *resultingPeer);
|
||||
|
||||
NS_IMETHOD
|
||||
Start(void);
|
||||
|
||||
NS_IMETHOD
|
||||
Stop(void);
|
||||
|
||||
NS_IMETHOD
|
||||
Destroy(void);
|
||||
|
||||
NS_IMETHOD
|
||||
SetWindow(nsPluginWindow* window);
|
||||
|
||||
NS_IMETHOD
|
||||
NewStream(nsIPluginStreamPeer* peer, nsIPluginStream* *result);
|
||||
|
||||
NS_IMETHOD
|
||||
Print(nsPluginPrint* platformPrint);
|
||||
|
||||
NS_IMETHOD
|
||||
HandleEvent(nsPluginEvent* event, PRBool* handled);
|
||||
|
||||
NS_IMETHOD
|
||||
URLNotify(const char* url, const char* target,
|
||||
nsPluginReason reason, void* notifyData);
|
||||
|
||||
NS_IMETHOD
|
||||
GetValue(nsPluginInstanceVariable variable, void *value);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// ns4xPluginInstance-specific methods
|
||||
|
||||
|
||||
/**
|
||||
* Return the 4.x-style interface object.
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetNPP(NPP * aNPP) {
|
||||
*aNPP = &fNPP;
|
||||
return NS_OK;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return the callbacks for the plugin instance.
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetCallbacks(const NPPluginFuncs ** aCallbacks) {
|
||||
*aCallbacks = fCallbacks;
|
||||
return NS_OK;
|
||||
};
|
||||
|
||||
NS_IMETHOD
|
||||
SetWindowless(PRBool aWindowless);
|
||||
|
||||
NS_IMETHOD
|
||||
SetTransparent(PRBool aTransparent);
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* The plugin instance peer for this instance.
|
||||
*/
|
||||
nsIPluginInstancePeer* fPeer;
|
||||
|
||||
/**
|
||||
* A pointer to the plugin's callback functions. This information
|
||||
* is actually stored in the plugin class (<b>nsPluginClass</b>),
|
||||
* and is common for all plugins of the class.
|
||||
*/
|
||||
NPPluginFuncs* fCallbacks;
|
||||
|
||||
/**
|
||||
* The 4.x-style structure used to communicate between the plugin
|
||||
* instance and the browser.
|
||||
*/
|
||||
NPP_t fNPP;
|
||||
|
||||
//these are used to store the windowless properties
|
||||
//which the browser will later query
|
||||
|
||||
PRBool mWindowless;
|
||||
PRBool mTransparent;
|
||||
};
|
||||
|
||||
|
||||
#endif // ns4xPluginInstance_h__
|
||||
262
mozilla/modules/plugin/nglsrc/ns4xPluginStream.cpp
Normal file
262
mozilla/modules/plugin/nglsrc/ns4xPluginStream.cpp
Normal file
@@ -0,0 +1,262 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
|
||||
#include "ns4xPluginStream.h"
|
||||
#include "prlog.h" // for PR_ASSERT
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
ns4xPluginStream::ns4xPluginStream(void)
|
||||
: fStreamType(nsPluginStreamType_Normal), fSeekable(PR_FALSE), fPosition(0)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
|
||||
fPeer = nsnull;
|
||||
fInstance = nsnull;
|
||||
|
||||
// Initialize the 4.x interface structure
|
||||
memset(&fNPStream, 0, sizeof(fNPStream));
|
||||
}
|
||||
|
||||
|
||||
ns4xPluginStream::~ns4xPluginStream(void)
|
||||
{
|
||||
const NPPluginFuncs *callbacks;
|
||||
NPP npp;
|
||||
nsPluginReason reason;
|
||||
|
||||
fInstance->GetCallbacks(&callbacks);
|
||||
fInstance->GetNPP(&npp);
|
||||
fPeer->GetReason(&reason);
|
||||
|
||||
if (callbacks->destroystream != NULL)
|
||||
{
|
||||
CallNPP_DestroyStreamProc(callbacks->destroystream,
|
||||
npp,
|
||||
&fNPStream,
|
||||
reason);
|
||||
}
|
||||
|
||||
NS_IF_RELEASE(fPeer);
|
||||
NS_IF_RELEASE(fInstance);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
NS_IMPL_ADDREF(ns4xPluginStream);
|
||||
NS_IMPL_RELEASE(ns4xPluginStream);
|
||||
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kIPluginStreamIID, NS_IPLUGINSTREAM_IID);
|
||||
static NS_DEFINE_IID(kISeekablePluginStreamPeerIID, NS_ISEEKABLEPLUGINSTREAMPEER_IID);
|
||||
|
||||
NS_IMETHODIMP ns4xPluginStream::QueryInterface(const nsIID& iid, void** instance)
|
||||
{
|
||||
if (instance == NULL)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
if (iid.Equals(kIPluginStreamIID))
|
||||
{
|
||||
*instance = (void *)(nsIPluginStream *)this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
else if (iid.Equals(kISupportsIID))
|
||||
{
|
||||
*instance = (void *)(nsISupports *)this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
NS_IMETHODIMP ns4xPluginStream::Initialize(ns4xPluginInstance* instance,
|
||||
nsIPluginStreamPeer* peer)
|
||||
{
|
||||
fInstance = instance;
|
||||
fPeer = peer;
|
||||
|
||||
NS_ASSERTION(fInstance != NULL, "null instance");
|
||||
|
||||
NS_ADDREF(fInstance);
|
||||
|
||||
NS_ASSERTION(fPeer != NULL, "null peer");
|
||||
|
||||
NS_ADDREF(fPeer);
|
||||
|
||||
const char *url;
|
||||
PRUint32 length, modified;
|
||||
|
||||
fPeer->GetURL(&url);
|
||||
fPeer->GetEnd(&length);
|
||||
fPeer->GetLastModified(&modified);
|
||||
|
||||
fNPStream.ndata = (void*) fPeer;
|
||||
fNPStream.url = url;
|
||||
fNPStream.end = length;
|
||||
fNPStream.lastmodified = modified;
|
||||
|
||||
// Are we seekable?
|
||||
|
||||
nsISupports* seekablePeer;
|
||||
|
||||
if (fPeer->QueryInterface(kISeekablePluginStreamPeerIID,
|
||||
(void**) &seekablePeer) == NS_OK)
|
||||
{
|
||||
fSeekable = TRUE;
|
||||
NS_RELEASE(seekablePeer);
|
||||
}
|
||||
|
||||
const NPPluginFuncs *callbacks;
|
||||
NPP npp;
|
||||
nsMIMEType mimetype;
|
||||
|
||||
fInstance->GetCallbacks(&callbacks);
|
||||
fInstance->GetNPP(&npp);
|
||||
fPeer->GetMIMEType(&mimetype);
|
||||
|
||||
if (callbacks->newstream == NULL)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
PRUint16 streamType = (PRUint16) fStreamType;
|
||||
|
||||
nsresult error
|
||||
= (nsresult)CallNPP_NewStreamProc(callbacks->newstream,
|
||||
npp,
|
||||
(char *)mimetype,
|
||||
&fNPStream,
|
||||
fSeekable,
|
||||
&streamType);
|
||||
|
||||
fStreamType = (nsPluginStreamType) streamType;
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginStream::Write(const char* buffer, PRInt32 offset, PRInt32 len, PRInt32 *aWriteCount)
|
||||
{
|
||||
const NPPluginFuncs *callbacks;
|
||||
NPP npp;
|
||||
PRInt32 remaining = len;
|
||||
|
||||
fInstance->GetCallbacks(&callbacks);
|
||||
fInstance->GetNPP(&npp);
|
||||
|
||||
if (callbacks->write == NULL)
|
||||
return NS_OK;
|
||||
|
||||
while (remaining > 0)
|
||||
{
|
||||
PRInt32 numtowrite;
|
||||
|
||||
if (callbacks->writeready != NULL)
|
||||
{
|
||||
numtowrite = CallNPP_WriteReadyProc(callbacks->writeready,
|
||||
npp,
|
||||
&fNPStream);
|
||||
|
||||
if (numtowrite > remaining)
|
||||
numtowrite = remaining;
|
||||
}
|
||||
else
|
||||
numtowrite = len;
|
||||
|
||||
*aWriteCount = CallNPP_WriteProc(callbacks->write,
|
||||
npp,
|
||||
&fNPStream,
|
||||
fPosition,
|
||||
numtowrite,
|
||||
(void *)buffer);
|
||||
|
||||
remaining -= numtowrite;
|
||||
}
|
||||
|
||||
fPosition += len;
|
||||
|
||||
return NS_OK; //XXX this seems bad...
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginStream::GetStreamType(nsPluginStreamType *result)
|
||||
{
|
||||
*result = fStreamType;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginStream::AsFile(const char* filename)
|
||||
{
|
||||
const NPPluginFuncs *callbacks;
|
||||
NPP npp;
|
||||
|
||||
fInstance->GetCallbacks(&callbacks);
|
||||
fInstance->GetNPP(&npp);
|
||||
|
||||
if (callbacks->asfile == NULL)
|
||||
return NS_OK;
|
||||
|
||||
CallNPP_StreamAsFileProc(callbacks->asfile,
|
||||
npp,
|
||||
&fNPStream,
|
||||
filename);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP ns4xPluginStream :: Close(void)
|
||||
{
|
||||
const NPPluginFuncs *callbacks;
|
||||
NPP npp;
|
||||
void *notifydata;
|
||||
|
||||
fInstance->GetCallbacks(&callbacks);
|
||||
fInstance->GetNPP(&npp);
|
||||
|
||||
fPeer->GetNotifyData(¬ifydata);
|
||||
|
||||
nsPluginReason reason;
|
||||
|
||||
fPeer->GetReason(&reason);
|
||||
|
||||
if (nsnull != notifydata)
|
||||
{
|
||||
if (callbacks->urlnotify == NULL)
|
||||
return NS_OK;
|
||||
|
||||
const char *url;
|
||||
|
||||
fPeer->GetURL(&url);
|
||||
|
||||
CallNPP_URLNotifyProc(callbacks->urlnotify,
|
||||
npp,
|
||||
url,
|
||||
(NPReason)reason,
|
||||
notifydata);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
115
mozilla/modules/plugin/nglsrc/ns4xPluginStream.h
Normal file
115
mozilla/modules/plugin/nglsrc/ns4xPluginStream.h
Normal file
@@ -0,0 +1,115 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef ns4xPluginStream_h__
|
||||
#define ns4xPluginStream_h__
|
||||
|
||||
#define _UINT32
|
||||
#define _INT32
|
||||
|
||||
#include "jri.h" // XXX should be jni.h
|
||||
#include "nsplugin.h"
|
||||
#include "ns4xPluginInstance.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* A 5.0 wrapper for a 4.x plugin stream.
|
||||
*/
|
||||
class ns4xPluginStream : public nsIPluginStream
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Construct a new 4.x plugin stream associated with the specified
|
||||
* instance and stream peer.
|
||||
*/
|
||||
ns4xPluginStream();
|
||||
~ns4xPluginStream();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
/**
|
||||
* Do internal initialization. This actually calls into the 4.x plugin
|
||||
* to create the stream, and may fail (which is why it's separate from
|
||||
* the constructor).
|
||||
*/
|
||||
NS_METHOD
|
||||
Initialize(ns4xPluginInstance* instance, nsIPluginStreamPeer* peer);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// nsIPluginStream methods
|
||||
|
||||
// (Corresponds to NPP_Write and NPN_Write.)
|
||||
NS_IMETHOD
|
||||
Write(const char* buffer, PRInt32 offset, PRInt32 len, PRInt32 *aWriteCount);
|
||||
|
||||
// (Corresponds to NPP_NewStream's stype return parameter.)
|
||||
NS_IMETHOD
|
||||
GetStreamType(nsPluginStreamType *result);
|
||||
|
||||
// (Corresponds to NPP_StreamAsFile.)
|
||||
NS_IMETHOD
|
||||
AsFile(const char* fname);
|
||||
|
||||
NS_IMETHOD
|
||||
Close(void);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Methods specific to ns4xPluginStream
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* The plugin instance to which this stream belongs.
|
||||
*/
|
||||
ns4xPluginInstance* fInstance;
|
||||
|
||||
/**
|
||||
* The peer associated with this stream.
|
||||
*/
|
||||
nsIPluginStreamPeer* fPeer;
|
||||
|
||||
/**
|
||||
* The type of stream, for the peer's use.
|
||||
*/
|
||||
nsPluginStreamType fStreamType;
|
||||
|
||||
/**
|
||||
* The 4.x-style structure used to contain stream information.
|
||||
* This is what actually gets used to communicate with the plugin.
|
||||
*/
|
||||
NPStream fNPStream;
|
||||
|
||||
/**
|
||||
* Set to <b>TRUE</b> if the peer implements
|
||||
* <b>NPISeekablPluginStreamPeer</b>.
|
||||
*/
|
||||
PRBool fSeekable;
|
||||
|
||||
/**
|
||||
* Tracks the position in the content that is being
|
||||
* read. 4.x-style plugins expect to be told the offset in the
|
||||
* buffer that they should read <i>to</i>, even though it's always
|
||||
* done serially.
|
||||
*/
|
||||
PRUint32 fPosition;
|
||||
};
|
||||
|
||||
|
||||
#endif // ns4xPluginStream_h__
|
||||
67
mozilla/modules/plugin/nglsrc/nsIPluginHost.h
Normal file
67
mozilla/modules/plugin/nglsrc/nsIPluginHost.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef nsIPluginHost_h___
|
||||
#define nsIPluginHost_h___
|
||||
|
||||
#include "xp_core.h"
|
||||
#include "nsplugindefs.h"
|
||||
#include "nsIFactory.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIPluginInstanceOwner.h"
|
||||
#include "nsIStreamListener.h"
|
||||
|
||||
class nsIURL;
|
||||
|
||||
#define NS_IPLUGINHOST_IID \
|
||||
{ 0x264c0640, 0x1c31, 0x11d2, \
|
||||
{ 0xa8, 0x2e, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
||||
|
||||
struct nsIPluginHost : public nsIFactory
|
||||
{
|
||||
public:
|
||||
|
||||
NS_IMETHOD
|
||||
Init(void) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
Destroy(void) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
LoadPlugins(void) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
InstantiatePlugin(const char *aMimeType, nsIURL *aURL, nsIPluginInstanceOwner *aOwner) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
InstantiatePlugin(const char *aMimeType, nsString& aURLSpec, nsIPluginInstanceOwner *aOwner) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
InstantiatePlugin(const char *aMimeType, nsString& aURLSpec, nsIStreamListener *&aStreamListener, nsIPluginInstanceOwner *aOwner) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
NewPluginStream(const nsString& aURL, nsIPluginInstance *aInstance, void *aNotifyData) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
NewPluginStream(const nsString& aURL, nsIPluginInstanceOwner *aOwner, void *aNotifyData) = 0;
|
||||
|
||||
NS_IMETHOD
|
||||
NewPluginStream(nsIStreamListener *&aStreamListener, nsIPluginInstance *aInstance, void *aNotifyData) = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
101
mozilla/modules/plugin/nglsrc/nsIPluginInstanceOwner.h
Normal file
101
mozilla/modules/plugin/nglsrc/nsIPluginInstanceOwner.h
Normal file
@@ -0,0 +1,101 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef nsIPluginInstanceOwner_h___
|
||||
#define nsIPluginInstanceOwner_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsplugin.h"
|
||||
|
||||
#define NS_IPLUGININSTANCEOWNER_IID \
|
||||
{ 0x18270870, 0x32f1, 0x11d2, \
|
||||
{ 0xa8, 0x30, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9 } }
|
||||
|
||||
struct nsIPluginInstanceOwner : public nsISupports
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Let the owner know that an instance has been created
|
||||
*
|
||||
*/
|
||||
NS_IMETHOD
|
||||
SetInstance(nsIPluginInstance *aInstance) = 0;
|
||||
|
||||
/**
|
||||
* Get the instance associated with this owner.
|
||||
*
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetInstance(nsIPluginInstance *&aInstance) = 0;
|
||||
|
||||
/**
|
||||
* Get a handle to the window structure of the owner.
|
||||
* This pointer cannot be made persistant by the caller.
|
||||
*
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetWindow(nsPluginWindow *&aWindow) = 0;
|
||||
|
||||
/**
|
||||
* Get the display mode for the plugin instance.
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetMode(nsPluginMode *aMode) = 0;
|
||||
|
||||
/**
|
||||
* Get a ptr to the paired list of attribute names and values,
|
||||
* returns the length of the array.
|
||||
*
|
||||
* Each name or value is a null-terminated string.
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetAttributes(PRUint16& n, const char*const*& names, const char*const*& values) = 0;
|
||||
|
||||
/**
|
||||
* Gets the value for the named attribute.
|
||||
*
|
||||
* @param name - the name of the attribute to find
|
||||
* @param result - the resulting attribute
|
||||
* @result - NS_OK if this operation was successful, NS_ERROR_FAILURE if
|
||||
* this operation failed. result is set to NULL if the attribute is not found
|
||||
* else to the found value.
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetAttribute(const char* name, const char* *result) = 0;
|
||||
|
||||
/**
|
||||
* Create a place for the plugin to live in the owner's
|
||||
* environment. this may or may not create a window
|
||||
* depending on the windowless state of the plugin instance.
|
||||
*
|
||||
*/
|
||||
NS_IMETHOD
|
||||
CreateWidget(void) = 0;
|
||||
|
||||
/**
|
||||
* Called when there is a valid target so that the proper
|
||||
* frame can be updated with new content. will not be called
|
||||
* with nsnull aTarget.
|
||||
*
|
||||
*/
|
||||
NS_IMETHOD
|
||||
GetURL(const char *aURL, const char *aTarget, void *aPostData) = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
120
mozilla/modules/plugin/nglsrc/nsMalloc.cpp
Normal file
120
mozilla/modules/plugin/nglsrc/nsMalloc.cpp
Normal file
@@ -0,0 +1,120 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Implementation of nsIMalloc using NSPR
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "nsMalloc.h"
|
||||
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kIMallocIID, NS_IMALLOC_IID);
|
||||
|
||||
nsMalloc::nsMalloc(nsISupports* outer)
|
||||
{
|
||||
NS_INIT_AGGREGATED(outer);
|
||||
}
|
||||
|
||||
nsMalloc::~nsMalloc(void)
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_AGGREGATED(nsMalloc);
|
||||
|
||||
NS_METHOD
|
||||
nsMalloc::AggregatedQueryInterface(const nsIID& aIID, void** aInstancePtr)
|
||||
{
|
||||
if (NULL == aInstancePtr) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
if (aIID.Equals(kIMallocIID) ||
|
||||
aIID.Equals(kISupportsIID)) {
|
||||
*aInstancePtr = (void*) this;
|
||||
AddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
NS_METHOD
|
||||
nsMalloc::Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr)
|
||||
{
|
||||
if (outer && !aIID.Equals(kISupportsIID))
|
||||
return NS_NOINTERFACE; // XXX right error?
|
||||
nsMalloc* mm = new nsMalloc(outer);
|
||||
if (mm == NULL)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
mm->AddRef();
|
||||
if (aIID.Equals(kISupportsIID))
|
||||
*aInstancePtr = mm->GetInner();
|
||||
else
|
||||
*aInstancePtr = mm;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
NS_METHOD_(void*)
|
||||
nsMalloc::Alloc(PRUint32 size)
|
||||
{
|
||||
return PR_Malloc(size);
|
||||
}
|
||||
|
||||
NS_METHOD_(void*)
|
||||
nsMalloc::Realloc(void* ptr, PRUint32 size)
|
||||
{
|
||||
return PR_Realloc(ptr, size);
|
||||
}
|
||||
|
||||
NS_METHOD_(void)
|
||||
nsMalloc::Free(void* ptr)
|
||||
{
|
||||
PR_Free(ptr);
|
||||
}
|
||||
|
||||
NS_METHOD_(PRInt32)
|
||||
nsMalloc::GetSize(void* ptr)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
NS_METHOD_(PRBool)
|
||||
nsMalloc::DidAlloc(void* ptr)
|
||||
{
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
// For the definition of CallCacheFlushers()
|
||||
#ifdef XP_MAC
|
||||
# ifndef NSPR20
|
||||
# include "prmacos.h"
|
||||
# else
|
||||
# include "MacMemAllocator.h"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
NS_METHOD_(void)
|
||||
nsMalloc::HeapMinimize(void)
|
||||
{
|
||||
#ifdef XP_MAC
|
||||
// something wonderful
|
||||
CallCacheFlushers(0x7fffffff);
|
||||
#endif
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
101
mozilla/modules/plugin/nglsrc/nsMalloc.h
Normal file
101
mozilla/modules/plugin/nglsrc/nsMalloc.h
Normal file
@@ -0,0 +1,101 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Implementation of nsIMalloc using NSPR
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsMalloc_h__
|
||||
#define nsMalloc_h__
|
||||
|
||||
#include "nsIMalloc.h"
|
||||
#include "prmem.h"
|
||||
#include "nsAgg.h"
|
||||
|
||||
class nsMalloc : nsIMalloc {
|
||||
public:
|
||||
|
||||
/**
|
||||
* Allocates a block of memory of a particular size.
|
||||
*
|
||||
* @param size - the size of the block to allocate
|
||||
* @result the block of memory
|
||||
*/
|
||||
NS_IMETHOD_(void*)
|
||||
Alloc(PRUint32 size);
|
||||
|
||||
/**
|
||||
* Reallocates a block of memory to a new size.
|
||||
*
|
||||
* @param ptr - the block of memory to reallocate
|
||||
* @param size - the new size
|
||||
* @result the rellocated block of memory
|
||||
*/
|
||||
NS_IMETHOD_(void*)
|
||||
Realloc(void* ptr, PRUint32 size);
|
||||
|
||||
/**
|
||||
* Frees a block of memory.
|
||||
*
|
||||
* @param ptr - the block of memory to free
|
||||
*/
|
||||
NS_IMETHOD_(void)
|
||||
Free(void* ptr);
|
||||
|
||||
/**
|
||||
* Returns the size of a block of memory. Returns -1
|
||||
* if the size is not available.
|
||||
*
|
||||
* @param ptr - the block of memory
|
||||
* @result the size or -1 if not available
|
||||
*/
|
||||
NS_IMETHOD_(PRInt32)
|
||||
GetSize(void* ptr);
|
||||
|
||||
/**
|
||||
* Returns whether the block of memory was allocated by this
|
||||
* memory allocator. Returns PR_FALSE if this information is
|
||||
* not available.
|
||||
*
|
||||
* @param ptr - the block of memory
|
||||
* @result true if allocated by this nsIMalloc, false if not or
|
||||
* if it can't be determined
|
||||
*/
|
||||
NS_IMETHOD_(PRBool)
|
||||
DidAlloc(void* ptr);
|
||||
|
||||
/**
|
||||
* Attempts to shrink the heap.
|
||||
*/
|
||||
NS_IMETHOD_(void)
|
||||
HeapMinimize(void);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsMalloc(nsISupports* outer);
|
||||
virtual ~nsMalloc(void);
|
||||
|
||||
NS_DECL_AGGREGATED
|
||||
|
||||
static NS_METHOD
|
||||
Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr);
|
||||
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#endif // nsMalloc_h__
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user