gio: Track API changes (I- interface prefixes)
This includes changes to fix the build, and changes to custom code that gets added to the generated code. I.e. File.cs now becomes IFile.cs
This commit is contained in:
parent
6cb03440c1
commit
321181b761
6 changed files with 21 additions and 21 deletions
|
@ -26,10 +26,10 @@ namespace GLib {
|
|||
[DllImport ("libgio-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
static extern IntPtr g_app_info_get_all();
|
||||
|
||||
public static GLib.AppInfo[] GetAll() {
|
||||
public static GLib.IAppInfo[] GetAll () {
|
||||
IntPtr raw_ret = g_app_info_get_all();
|
||||
GLib.AppInfo[] ret = (GLib.AppInfo[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), true, false, typeof(GLib.AppInfo));
|
||||
GLib.IAppInfo[] ret = (GLib.IAppInfo[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof (GLib.List), true, false, typeof (GLib.IAppInfo));
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,30 +30,30 @@ namespace GLib
|
|||
[DllImport ("libgio-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern IntPtr g_file_new_for_uri (string uri);
|
||||
|
||||
public static File NewForUri (string uri)
|
||||
public static IFile NewForUri (string uri)
|
||||
{
|
||||
return GLib.FileAdapter.GetObject (g_file_new_for_uri (uri), false) as File;
|
||||
return GLib.FileAdapter.GetObject (g_file_new_for_uri (uri), false) as IFile;
|
||||
}
|
||||
|
||||
public static File NewForUri (Uri uri)
|
||||
public static IFile NewForUri (Uri uri)
|
||||
{
|
||||
return GLib.FileAdapter.GetObject (g_file_new_for_uri (uri.ToString ()), false) as File;
|
||||
return GLib.FileAdapter.GetObject (g_file_new_for_uri (uri.ToString ()), false) as IFile;
|
||||
}
|
||||
|
||||
[DllImport ("libgio-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern IntPtr g_file_new_for_path (string path);
|
||||
|
||||
public static File NewForPath (string path)
|
||||
public static IFile NewForPath (string path)
|
||||
{
|
||||
return GLib.FileAdapter.GetObject (g_file_new_for_path (path), false) as File;
|
||||
return GLib.FileAdapter.GetObject (g_file_new_for_path (path), false) as IFile;
|
||||
}
|
||||
|
||||
[DllImport ("libgio-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern IntPtr g_file_new_for_commandline_arg (string arg);
|
||||
|
||||
public static File NewFromCommandlineArg (string arg)
|
||||
public static IFile NewFromCommandlineArg (string arg)
|
||||
{
|
||||
return GLib.FileAdapter.GetObject (g_file_new_for_commandline_arg (arg), false) as File;
|
||||
return GLib.FileAdapter.GetObject (g_file_new_for_commandline_arg (arg), false) as IFile;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,14 +53,14 @@ namespace GLib
|
|||
{
|
||||
this.stream = stream;
|
||||
can_read = true;
|
||||
can_seek = stream is Seekable && (stream as Seekable).CanSeek;
|
||||
can_seek = stream is ISeekable && (stream as ISeekable).CanSeek;
|
||||
}
|
||||
|
||||
public GioStream (OutputStream stream)
|
||||
{
|
||||
this.stream = stream;
|
||||
can_write = true;
|
||||
can_seek = stream is Seekable && (stream as Seekable).CanSeek;
|
||||
can_seek = stream is ISeekable && (stream as ISeekable).CanSeek;
|
||||
}
|
||||
|
||||
public GioStream (IOStream stream)
|
||||
|
@ -68,7 +68,7 @@ namespace GLib
|
|||
this.stream = stream;
|
||||
can_read = true;
|
||||
can_write = true;
|
||||
can_seek = stream is Seekable && (stream as Seekable).CanSeek;
|
||||
can_seek = stream is ISeekable && (stream as ISeekable).CanSeek;
|
||||
}
|
||||
|
||||
public override bool CanSeek {
|
||||
|
@ -112,7 +112,7 @@ namespace GLib
|
|||
throw new NotSupportedException ("This stream doesn't support seeking");
|
||||
if (is_disposed)
|
||||
throw new ObjectDisposedException ("The stream is closed");
|
||||
return (stream as Seekable).Position;
|
||||
return (stream as ISeekable).Position;
|
||||
}
|
||||
set {
|
||||
Seek (value, System.IO.SeekOrigin.Begin);
|
||||
|
@ -195,7 +195,7 @@ namespace GLib
|
|||
throw new NotSupportedException ("This stream doesn't support seeking");
|
||||
if (is_disposed)
|
||||
throw new ObjectDisposedException ("The stream is closed");
|
||||
Seekable seekable = stream as Seekable;
|
||||
var seekable = stream as ISeekable;
|
||||
|
||||
SeekType seek_type;
|
||||
switch (origin) {
|
||||
|
@ -219,7 +219,7 @@ namespace GLib
|
|||
if (!CanSeek || !CanWrite)
|
||||
throw new NotSupportedException ("This stream doesn't support seeking");
|
||||
|
||||
var seekable = stream as Seekable;
|
||||
var seekable = stream as ISeekable;
|
||||
|
||||
if (!seekable.CanTruncate ())
|
||||
throw new NotSupportedException ("This stream doesn't support truncating");
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
// Boston, MA 02111-1307, USA.
|
||||
|
||||
namespace GLib {
|
||||
public partial interface File : GLib.IWrapper {
|
||||
public partial interface IFile : GLib.IWrapper {
|
||||
bool Exists
|
||||
{
|
||||
get;
|
|
@ -13,11 +13,11 @@ POLICY_VERSIONS=
|
|||
|
||||
sources = \
|
||||
AppInfoAdapter.cs \
|
||||
File.cs \
|
||||
FileAdapter.cs \
|
||||
FileEnumerator.cs \
|
||||
FileFactory.cs \
|
||||
GioStream.cs
|
||||
GioStream.cs \
|
||||
IFile.cs
|
||||
|
||||
add_dist = gio-sharp-3.0.pc.in
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<Compile Include="AppInfoAdapter.cs" />
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
<Compile Include="DBusInterfaceVTable.cs" />
|
||||
<Compile Include="File.cs" />
|
||||
<Compile Include="IFile.cs" />
|
||||
<Compile Include="FileAdapter.cs" />
|
||||
<Compile Include="FileEnumerator.cs" />
|
||||
<Compile Include="FileFactory.cs" />
|
||||
|
|
Loading…
Add table
Reference in a new issue