Skip to content

Commit

Permalink
feat(storage): Import missing interfaces from generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
dr1rrb committed Oct 9, 2020
1 parent a774ad5 commit 922632a
Show file tree
Hide file tree
Showing 12 changed files with 107 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
#pragma warning disable 114 // new keyword hiding
namespace Windows.Storage.Streams
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented]
#endif
public partial interface IContentTypeProvider
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
string ContentType
{
get;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
#pragma warning disable 114 // new keyword hiding
namespace Windows.Storage.Streams
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented]
#endif
public partial interface IInputStream : global::System.IDisposable
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
global::Windows.Foundation.IAsyncOperationWithProgress<global::Windows.Storage.Streams.IBuffer, uint> ReadAsync( global::Windows.Storage.Streams.IBuffer buffer, uint count, global::Windows.Storage.Streams.InputStreamOptions options);
#endif
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
#pragma warning disable 114 // new keyword hiding
namespace Windows.Storage.Streams
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented]
#endif
public partial interface IOutputStream : global::System.IDisposable
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
global::Windows.Foundation.IAsyncOperationWithProgress<uint, uint> WriteAsync( global::Windows.Storage.Streams.IBuffer buffer);
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
global::Windows.Foundation.IAsyncOperation<bool> FlushAsync();
#endif
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@
#pragma warning disable 114 // new keyword hiding
namespace Windows.Storage.Streams
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented]
#endif
public partial interface IRandomAccessStream : global::System.IDisposable,global::Windows.Storage.Streams.IInputStream,global::Windows.Storage.Streams.IOutputStream
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
bool CanRead
{
get;
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
bool CanWrite
{
get;
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
ulong Position
{
get;
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
ulong Size
{
get;
Expand All @@ -34,17 +34,17 @@ ulong Size
#endif
// Forced skipping of method Windows.Storage.Streams.IRandomAccessStream.Size.get
// Forced skipping of method Windows.Storage.Streams.IRandomAccessStream.Size.set
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
global::Windows.Storage.Streams.IInputStream GetInputStreamAt( ulong position);
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
global::Windows.Storage.Streams.IOutputStream GetOutputStreamAt( ulong position);
#endif
// Forced skipping of method Windows.Storage.Streams.IRandomAccessStream.Position.get
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
void Seek( ulong position);
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
global::Windows.Storage.Streams.IRandomAccessStream CloneStream();
#endif
// Forced skipping of method Windows.Storage.Streams.IRandomAccessStream.CanRead.get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#pragma warning disable 114 // new keyword hiding
namespace Windows.Storage.Streams
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented]
#endif
public partial interface IRandomAccessStreamWithContentType : global::Windows.Storage.Streams.IRandomAccessStream,global::System.IDisposable,global::Windows.Storage.Streams.IInputStream,global::Windows.Storage.Streams.IOutputStream,global::Windows.Storage.Streams.IContentTypeProvider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#pragma warning disable 114 // new keyword hiding
namespace Windows.Storage.Streams
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented]
#endif
Expand Down
18 changes: 18 additions & 0 deletions src/Uno.UWP/Storage/Streams/IContentTypeProvider.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#pragma warning disable 108 // new keyword hiding
#pragma warning disable 114 // new keyword hiding
namespace Windows.Storage.Streams
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented]
#endif
public partial interface IContentTypeProvider
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
string ContentType
{
get;
}
#endif
// Forced skipping of method Windows.Storage.Streams.IContentTypeProvider.ContentType.get
}
}
11 changes: 11 additions & 0 deletions src/Uno.UWP/Storage/Streams/IInputStream.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

using System;
using Windows.Foundation;

namespace Windows.Storage.Streams
{
public partial interface IInputStream : IDisposable
{
IAsyncOperationWithProgress<IBuffer, uint> ReadAsync(IBuffer buffer, uint count, InputStreamOptions options);
}
}
12 changes: 12 additions & 0 deletions src/Uno.UWP/Storage/Streams/IOutputStream.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using Windows.Foundation;

namespace Windows.Storage.Streams
{
public partial interface IOutputStream : IDisposable
{
IAsyncOperationWithProgress<uint, uint> WriteAsync(IBuffer buffer);

IAsyncOperation<bool> FlushAsync();
}
}
23 changes: 23 additions & 0 deletions src/Uno.UWP/Storage/Streams/IRandomAccessStream.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;

namespace Windows.Storage.Streams
{
public partial interface IRandomAccessStream : IDisposable, IInputStream, IOutputStream
{
bool CanRead { get; }

bool CanWrite { get; }

ulong Position { get; }

ulong Size { get; }

IInputStream GetInputStreamAt( ulong position);

IOutputStream GetOutputStreamAt( ulong position);

void Seek( ulong position);

IRandomAccessStream CloneStream();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using System;

namespace Windows.Storage.Streams
{
public partial interface IRandomAccessStreamWithContentType : IRandomAccessStream, IDisposable, IInputStream, IOutputStream, IContentTypeProvider
{
}
}
17 changes: 17 additions & 0 deletions src/Uno.UWP/Storage/Streams/InputStreamOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using Uno;

namespace Windows.Storage.Streams
{
[Flags]
public enum InputStreamOptions : uint
{
None = 0,

[NotImplemented]
Partial = 1,

[NotImplemented]
ReadAhead = 2,
}
}

0 comments on commit 922632a

Please sign in to comment.