VirtualBox

Changeset 29230 in vbox for trunk/src/libs/xpcom18a4/java


Ignore:
Timestamp:
May 7, 2010 7:29:18 PM (15 years ago)
Author:
vboxsync
Message:

java bridge: callbacks works too

Location:
trunk/src/libs/xpcom18a4/java/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/java/src/nsJavaXPCOMGlue.cpp

    r29212 r29230  
    133133    {
    134134        mOuter = aOuter;
    135         //if (mOuter)
    136         //    mOuter->AddRef();
    137135        mII = ii;
    138136    }
     
    140138    virtual ~nsXPTCJStub()
    141139    {
    142         //if (mOuter)
    143         //  mOuter->Release();
    144140    }
    145141
     
    147143    {
    148144        *info = mII;
     145        (*info)->AddRef();
    149146         return NS_OK;
    150147    }
     
    172169NS_IMETHODIMP nsXPTCJStub::QueryInterface(REFNSIID aIID, void** aInstancePtr)
    173170{
    174     nsIID* mIID;
     171    nsIID* mIID; 
    175172    mII->GetInterfaceIID(&mIID);
    176173
  • trunk/src/libs/xpcom18a4/java/src/org/virtualbox/VirtualBoxManager.java

    r29212 r29230  
    9898    }
    9999
    100     public boolean startVm(String name, int timeout)
     100    public boolean startVm(String name, String type, int timeout)
    101101    {
    102102        IMachine m = vbox.findMachine(name);
     
    107107
    108108        String mid = m.getId();
    109         String type = "gui";
     109        if (type == null)
     110            type = "gui";
    110111        IProgress p = vbox.openRemoteSession(session, mid, type, "");
    111112        progressBar(p, timeout);
     
    123124        mozilla.waitForEvents(tmo);
    124125    }
    125 
    126     public ILocalOwner makeWrapper(nsISupports obj)
    127     {
    128 
    129        ILocalOwner lo = (ILocalOwner) this.componentManager
    130                .createInstanceByContractID("@virtualbox.org/CallbackWrapper;1",
    131                                            null,
    132                                            ILocalOwner.ILOCALOWNER_IID);
    133        lo.setLocalObject(obj);
    134        return lo;
    135     }
    136 
    137     public IVirtualBoxCallback makeVirtualBoxCallback(IVirtualBoxCallback obj)
    138     {
    139        ILocalOwner lo = makeWrapper(obj);
    140        return (IVirtualBoxCallback)lo.queryInterface(IVirtualBoxCallback.IVIRTUALBOXCALLBACK_IID);
    141     }
    142126}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette