Package org.gocha.inetools.http

Examples of org.gocha.inetools.http.BasicHttpResponse$Variant


   * (non-Javadoc)
   *
   * @see com.google.gwt.dev.shell.JsValue#setInt(int)
   */
  public void setInt(int val) {
    setVariant(new Variant(val));
  }
View Full Code Here


   * (non-Javadoc)
   *
   * @see com.google.gwt.dev.shell.JsValue#setNull()
   */
  public void setNull() {
    setVariant(new Variant(0, COM.VT_NULL));
  }
View Full Code Here

   * (non-Javadoc)
   *
   * @see com.google.gwt.dev.shell.JsValue#setShort(short)
   */
  public void setShort(short val) {
    setVariant(new Variant(val));
  }
View Full Code Here

   * (non-Javadoc)
   *
   * @see com.google.gwt.dev.shell.JsValue#setString(java.lang.String)
   */
  public void setString(String val) {
    setVariant(new Variant(val));
  }
View Full Code Here

    } else {
      dispObj = new IDispatchProxy(cl, val);
    }
    IDispatch disp = new IDispatch(dispObj.getAddress());
    disp.AddRef();
    setVariant(new Variant(disp));
  }
View Full Code Here

     * querying for typeInfo that occurs in the OleAutomation(IDispatch)
     * constructor will cause a VM crash on some kinds of JavaScript objects,
     * such as the window.alert function. So we do it by hand.
     */
    IDispatch dispatch = variant.getDispatch();
    Variant result = new Variant();
    int pVarResultAddress = 0;
    int globalRef = 0;
    try {
      pVarResultAddress = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT,
          Variant.sizeof);
      int[] pArgErr = new int[1];
      int hr = dispatch.Invoke(IDispatchProxy.DISPID_MAGIC_GETGLOBALREF,
          new GUID(), COM.LOCALE_USER_DEFAULT, COM.DISPATCH_METHOD,
          new DISPPARAMS(), pVarResultAddress, new EXCEPINFO(), pArgErr);

      if (hr >= COM.S_OK) {
        result = Variant.win32_new(pVarResultAddress);
        globalRef = result.getInt();
      }
      if (globalRef != 0) {
        // This is really a Java object being passed back via an IDispatchProxy.
        IDispatchProxy proxy = (IDispatchProxy) LowLevel.objFromGlobalRefInt(globalRef);
        return proxy.getTarget();
      }
      return null;
    } finally {
      if (result != null) {
        result.dispose();
      }
      if (pVarResultAddress != 0) {
        COM.VariantClear(pVarResultAddress);
        OS.GlobalFree(pVarResultAddress);
      }
View Full Code Here

  public boolean setVariantProperty(int dispID, Variant propValue) {
    return oleAutomation.setProperty(dispID, propValue);
  }

  public int getIntegerProperty(int dispID) {
    Variant result = oleAutomation.getProperty(dispID);
    return (result != null) ? result.getInt() : -1;
  }
View Full Code Here

    Variant result = oleAutomation.getProperty(dispID);
    return (result != null) ? result.getInt() : -1;
  }

  public boolean setIntegerProperty(int dispID, int value) {
    return oleAutomation.setProperty(dispID, new Variant(value));
  }
View Full Code Here

  public boolean setIntegerProperty(int dispID, int value) {
    return oleAutomation.setProperty(dispID, new Variant(value));
  }

  public boolean getBooleanProperty(int dispID) {
    Variant result = oleAutomation.getProperty(dispID);
    return (result != null) ? result.getBoolean() : false;
  }
View Full Code Here

  public void gotoLabel(String timeline, String label) {
    if (!created)
      return;

    Variant[] args = new Variant[2];
    args[0] = new Variant(timeline);
    args[1] = new Variant(label);

    flashObject.invokeNoReply(DISPID_TGOTOLABEL, args);
  }
View Full Code Here

TOP

Related Classes of org.gocha.inetools.http.BasicHttpResponse$Variant

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.