/// </privilege>
public class Camera : IDisposable
{
- private IntPtr _handle;
+ private IntPtr _handle = IntPtr.Zero;
private bool _disposed = false;
private Interop.Camera.CapturingCallback _capturingCallback;
private Interop.Camera.CaptureCompletedCallback _captureCompletedCallback;
Dispose(false);
}
+ internal IntPtr GetHandle()
+ {
+ ValidateNotDisposed();
+ return _handle;
+ }
+
/// <summary>
/// Event that occurs when there is change in HDR capture progress.
/// </summary>
/// <privilege>
/// http://tizen.org/privilege/camera
/// </privilege>
- /// <exception cref="ArgumentException">In case of invalid parameters</exception>
/// <exception cref="InvalidOperationException">In case of any invalid operations</exception>
/// <exception cref="NotSupportedException">In case of this feature is not supported</exception>
/// <exception cref="UnauthorizedAccessException">In case of access to the resources cannot be granted</exception>
/// <privilege>
/// http://tizen.org/privilege/camera
/// </privilege>
- /// <exception cref="ArgumentException">In case of invalid parameters</exception>
/// <exception cref="InvalidOperationException">In case of any invalid operations</exception>
/// <exception cref="NotSupportedException">In case of this feature is not supported</exception>
/// <exception cref="UnauthorizedAccessException">In case of access to the resources cannot be granted</exception>
/// The camera's preview should be restarted by calling <see cref="Tizen.Multimedia.Camera.StartPreview"/>
/// method.
/// </remarks>
- /// <exception cref="ArgumentException">In case of invalid parameters</exception>
/// <exception cref="InvalidOperationException">In case of any invalid operations</exception>
/// <exception cref="NotSupportedException">In case of this feature is not supported</exception>
/// <exception cref="UnauthorizedAccessException">In case of access to the resources cannot be granted</exception>
/// <privilege>
/// http://tizen.org/privilege/camera
/// </privilege>
- /// <exception cref="ArgumentException">In case of invalid parameters</exception>
/// <exception cref="InvalidOperationException">In case of any invalid operations</exception>
/// <exception cref="NotSupportedException">In case of this feature is not supported</exception>
/// <exception cref="UnauthorizedAccessException">In case of access to the resources cannot be granted</exception>
/// <privilege>
/// http://tizen.org/privilege/camera
/// </privilege>
- /// <exception cref="ArgumentException">In case of invalid parameters</exception>
/// <exception cref="InvalidOperationException">In case of any invalid operations</exception>
/// <exception cref="NotSupportedException">In case of this feature is not supported</exception>
/// <exception cref="UnauthorizedAccessException">In case of access to the resources cannot be granted</exception>
/// The Eventhandler set using <see cref="Tizen.Multimedia.Camera.FaceDetected"/> invoked when the face is detected in preview frame.
/// Internally it starts continuous focus and focusing on the detected face.
/// </remarks>
- /// <exception cref="ArgumentException">In case of invalid parameters</exception>
/// <exception cref="InvalidOperationException">In case of any invalid operations</exception>
/// <exception cref="NotSupportedException">In case of this feature is not supported</exception>
/// <exception cref="UnauthorizedAccessException">In case of access to the resources cannot be granted</exception>
/// <privilege>
/// http://tizen.org/privilege/camera
/// </privilege>
- /// <exception cref="ArgumentException">In case of invalid parameters</exception>
/// <exception cref="InvalidOperationException">In case of any invalid operations</exception>
/// <exception cref="NotSupportedException">In case of this feature is not supported</exception>
/// <exception cref="UnauthorizedAccessException">In case of access to the resources cannot be granted</exception>
}
}
+ internal void ValidateNotDisposed()
+ {
+ if (_disposed)
+ {
+ throw new ObjectDisposedException(nameof(Camera));
+ }
+ }
+
[DllImport(Interop.Libraries.Camera, EntryPoint = "camera_add_device_state_changed_cb")]
internal static extern int AddDeviceChangedCallback(DeviceChangedCallback callback, IntPtr userData, out int callbackId);