git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8996 67ed7778-7388-44ab-90cf-0a291f65f57c
25 lines
465 B
C#
25 lines
465 B
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace LibGPhoto2
|
|
{
|
|
public class Context : Object
|
|
{
|
|
[DllImport ("libgphoto2.so")]
|
|
internal static extern IntPtr gp_context_new ();
|
|
|
|
public Context ()
|
|
{
|
|
this.handle = new HandleRef (this, gp_context_new ());
|
|
}
|
|
|
|
[DllImport ("libgphoto2.so")]
|
|
internal static extern void gp_context_unref (HandleRef context);
|
|
|
|
protected override void Cleanup ()
|
|
{
|
|
gp_context_unref(handle);
|
|
}
|
|
}
|
|
}
|