Back to index

lightning-sunbird  0.9+nobinonly
MozAxPlugin.java
Go to the documentation of this file.
00001 import netscape.plugin.Plugin;
00002 
00003 public class MozAxPlugin extends Plugin
00004 {
00006     // Public methods that are exposed through LiveConnect
00007 
00008     public Object getProperty(String dispid)
00009     {
00010       return xgetProperty(dispid);
00011     }
00012     public void setProperty(String dispid, String property)
00013     {
00014       xsetProperty1(dispid, property);
00015     }
00016     public void setProperty(String dispid, Object property)
00017     {
00018       xsetProperty2(dispid, property);
00019     }
00020 
00021     public Object invoke(String dispid)
00022     {
00023       return xinvoke(dispid);
00024     }
00025 
00026     public Object invoke(String dispid, Object p1)
00027     {
00028       return xinvoke1(dispid, p1);
00029     }
00030     public Object invoke(String dispid, Object p1, Object p2)
00031     {
00032       return xinvoke2(dispid, p1, p2);
00033     }
00034     public Object invoke(String dispid, Object p1, Object p2, Object p3)
00035     {
00036       return xinvoke3(dispid, p1, p2, p3);
00037     }
00038     public Object invoke(String dispid, Object p1, Object p2, Object p3, Object p4)
00039     {
00040       return xinvoke4(dispid, p1, p2, p3, p4);
00041     }
00042     public Object invoke(String dispid, Object params[])
00043     {
00044       return xinvokeX(dispid, params);
00045     }
00046 
00048     // Native implementations of the above methods.
00049     //
00050     // Note: These methods are not overloaded like the public versions above
00051     //       because javah generates bad code which doesn't compile if you try.
00052 
00053     private native Object xgetProperty(String dispid);
00054     private native void xsetProperty1(String dispid, String property);
00055     private native void xsetProperty2(String dispid, Object property);
00056     private native Object xinvoke(String dispid);
00057     private native Object xinvoke1(String dispid, Object p1);
00058     private native Object xinvoke2(String dispid, Object p1, Object p2);
00059     private native Object xinvoke3(String dispid, Object p1, Object p2, Object p3);
00060     private native Object xinvoke4(String dispid, Object p1, Object p2, Object p3, Object p4);
00061     private native Object xinvokeX(String dispid, Object params[]);
00062 };