Beispiel #1
0
 public unsafe uint WriteFrom(nsIInputStream aFromStream, uint aCount)
 {
     PreparePointer((int)aCount);
     aFromStream.Read(new IntPtr(CurrentPointer), aCount);
     MovePointer(aCount);
     return(aCount);
 }
Beispiel #2
0
 internal InputStream(nsIInputStream inputStream)
 {
     _inputStream = inputStream;
     // refcount (+1)
     _seekableStream = Xpcom.QueryInterface <nsISeekableStream>(inputStream);
     _seekable       = _seekableStream != null;
 }
 public unsafe uint WriteFrom( nsIInputStream aFromStream, uint aCount )
 {
     PreparePointer( ( int ) aCount );
     aFromStream.Read(new IntPtr(CurrentPointer), aCount);
     MovePointer( aCount );
     return aCount;
 }
Beispiel #4
0
 public int writeFrom([MarshalAs(UnmanagedType.Interface)]  nsIInputStream aFromStream,
                      uint aCount,
                      out uint ret)
 {
     ret = 0;
     return(0);
 }
Beispiel #5
0
		internal InputStream( nsIInputStream inputStream )
		{
			_inputStream = inputStream;
			// refcount (+1)
			_seekableStream = Xpcom.QueryInterface<nsISeekableStream>( inputStream );
			_seekable = _seekableStream != null;
		}
 internal InputStream(nsIInputStream inputStream)
 {
     _inputStream = new ComPtr<nsIInputStream>( inputStream );
     var seekableStream = Xpcom.QueryInterface<nsISeekableStream>(inputStream);
     if ( _seekable = seekableStream != null )
     {
         _seekableStream = new ComPtr<nsISeekableStream>( seekableStream );
     }
 }
    public void OnDataAvailable(nsIRequest aRequest, nsISupports aContext, nsIInputStream aInputStream, ulong aOffset, uint aCount)
    {
        // This gets called several times with small chunks of data.
        // Do what you need with the stream. In my case, I read it
        // in a small buffer, which then gets written to an output
        // filestream (not shown).
        // The aOffset parameter is the sum of all previously received data.
        var lInput = InputStream.Create(aInputStream);

        byte[] lBuffer = new byte[aCount];
        lInput.Read(lBuffer, 0, (int)aCount);
    }
 public static InputStream Create(nsIInputStream stream)
 {
     var mimeInputStream= Xpcom.QueryInterface<nsIMIMEInputStream>(stream);
     if (mimeInputStream != null)
     {
         return new MimeInputStream( mimeInputStream );
     }
     var stringInputStream = Xpcom.QueryInterface<nsIStringInputStream>( stream );
     if (stringInputStream != null)
     {
         return new StringInputStream( stringInputStream );
     }
     return new InputStream(stream);
 }
Beispiel #9
0
        public static InputStream Create(nsIInputStream stream)
        {
            var mimeInputStream = Xpcom.QueryInterface <nsIMIMEInputStream>(stream);

            if (mimeInputStream != null)
            {
                return(new MimeInputStream(mimeInputStream));
            }
            var stringInputStream = Xpcom.QueryInterface <nsIStringInputStream>(stream);

            if (stringInputStream != null)
            {
                return(new StringInputStream(stringInputStream));
            }
            return(new InputStream(stream));
        }
 public uint WriteFrom(nsIInputStream aFromStream, uint aCount)
 {
     throw new NotImplementedException();
 }
Beispiel #11
0
        public static nsIInputStream GetProxy(Mono.WebBrowser.IWebBrowser control, nsIInputStream obj)
        {
            object o = Base.GetProxyForObject(control, typeof(nsIInputStream).GUID, obj);

            return(o as nsIInputStream);
        }
Beispiel #12
0
		public static nsIInputStream GetProxy (Mono.WebBrowser.IWebBrowser control, nsIInputStream obj)
		{
			object o = Base.GetProxyForObject (control, typeof(nsIInputStream).GUID, obj);
			return o as nsIInputStream;
		}
Beispiel #13
0
 public uint WriteFrom(nsIInputStream aFromStream, uint aCount)
 {
     throw new NotImplementedException();
 }