Ejemplo n.º 1
0
 public UnoInterfaceInfo(com.sun.star.bridges.mono_uno.Bridge bridge,
                         IntPtr unoInterface,
                         InterfaceTypeDescription *td)
 {
     Bridge = bridge;
     UnoInterface = unoInterface;
     Type = Bridge.MapUnoType((TypeDescription *)td);
     uno.Binary.Interface.Acquire(UnoInterface);
     TypeDesc = td;
     InterfaceTypeDescription.Acquire(TypeDesc);
     
     fixed (InterfaceTypeDescription **ppTypeDesc = &TypeDesc)
         if (((TypeDescription *)TypeDesc)->bComplete == 0 &&
             TypeDescription.Complete((TypeDescription **)ppTypeDesc))
         {
             // FIXME throw a uno runtime exception
         }
 }
Ejemplo n.º 2
0
 public static unsafe object Create(Bridge bridge, IntPtr unoInterface,
                                    InterfaceTypeDescription *TD, string oid)
 {
     UnoInterfaceProxy realProxy = new UnoInterfaceProxy(bridge, unoInterface,
                                                         TD, oid);
     object proxy = realProxy.GetTransparentProxy();
     bridge.RegisterWithCliEnvironment(proxy, oid);
     return proxy;
 }
Ejemplo n.º 3
0
 // internals
 public unsafe void AddUnoInterface(IntPtr unoInterface, InterfaceTypeDescription *TD)
 {
     lock (this)
     {
         foreach (UnoInterfaceInfo info in interfaces)
         {
             if (InterfaceTypeDescription.Equal(info.TypeDesc, TD))
                 return;
         }
         // This proxy does not contain the unoInterface. Add it.
         bridge.RegisterWithUnoEnvironment(ref unoInterface,
                                           oid, TD);
         interfaces.Add(new UnoInterfaceInfo(bridge, unoInterface, TD));         
     }
 }
Ejemplo n.º 4
0
 private unsafe UnoInterfaceProxy(Bridge bridge, IntPtr unoInterface,
                                  InterfaceTypeDescription *TD, string oid)
     : base(typeof(MarshalByRefObject)) // FIXME is there a better type?
 {
     this.bridge = bridge;
     this.oid = oid;
     AddUnoInterface(unoInterface, TD);
 }