Refactoring error handling related code
[platform/core/csapi/media-content.git] / Tizen.Content.MediaContent / Interop / Interop.ImageInformation.cs
index 1b55590..3dd5c53 100755 (executable)
@@ -16,49 +16,49 @@ internal static partial class Interop
     internal static partial class ImageInformation
     {
         [DllImport(Libraries.MediaContent, EntryPoint = "image_meta_destroy", CallingConvention = CallingConvention.Cdecl)]
-        internal static extern int Destroy(IntPtr media);
+        internal static extern MediaContentError Destroy(IntPtr media);
 
         [DllImport(Libraries.MediaContent, EntryPoint = "image_meta_clone", CallingConvention = CallingConvention.Cdecl)]
-        internal static extern int Clone(out SafeImageInformationHandle dst, SafeImageInformationHandle src);
+        internal static extern MediaContentError Clone(out SafeImageInformationHandle dst, SafeImageInformationHandle src);
 
         [DllImport(Libraries.MediaContent, EntryPoint = "image_meta_get_orientation", CallingConvention = CallingConvention.Cdecl)]
-        internal static extern int GetOrientation(SafeImageInformationHandle imageInformationHandle, out MediaContentOrientation orientation);
+        internal static extern MediaContentError GetOrientation(SafeImageInformationHandle imageInformationHandle, out MediaContentOrientation orientation);
 
         [DllImport(Libraries.MediaContent, EntryPoint = "image_meta_get_date_taken", CallingConvention = CallingConvention.Cdecl)]
-        internal static extern int GetDateTaken(SafeImageInformationHandle imageInformationHandle, out string dateTaken);
+        internal static extern MediaContentError GetDateTaken(SafeImageInformationHandle imageInformationHandle, out string dateTaken);
 
         [DllImport(Libraries.MediaContent, EntryPoint = "image_meta_get_burst_id", CallingConvention = CallingConvention.Cdecl)]
-        internal static extern int GetBurstId(SafeImageInformationHandle imageInformationHandle, out string burstId);
+        internal static extern MediaContentError GetBurstId(SafeImageInformationHandle imageInformationHandle, out string burstId);
 
         [DllImport(Libraries.MediaContent, EntryPoint = "image_meta_get_exposure_time", CallingConvention = CallingConvention.Cdecl)]
-        internal static extern int GetExposureTime(SafeImageInformationHandle imageInformationHandle, out string exposureTime);
+        internal static extern MediaContentError GetExposureTime(SafeImageInformationHandle imageInformationHandle, out string exposureTime);
 
         [DllImport(Libraries.MediaContent, EntryPoint = "image_meta_get_fnumber", CallingConvention = CallingConvention.Cdecl)]
-        internal static extern int GetFNumber(SafeImageInformationHandle imageInformationHandle, out double fNumber);
+        internal static extern MediaContentError GetFNumber(SafeImageInformationHandle imageInformationHandle, out double fNumber);
 
         [DllImport(Libraries.MediaContent, EntryPoint = "image_meta_get_iso", CallingConvention = CallingConvention.Cdecl)]
-        internal static extern int GetISO(SafeImageInformationHandle imageInformationHandle, out int iso);
+        internal static extern MediaContentError GetISO(SafeImageInformationHandle imageInformationHandle, out int iso);
 
         [DllImport(Libraries.MediaContent, EntryPoint = "image_meta_get_model", CallingConvention = CallingConvention.Cdecl)]
-        internal static extern int GetModel(SafeImageInformationHandle imageInformationHandle, out string model);
+        internal static extern MediaContentError GetModel(SafeImageInformationHandle imageInformationHandle, out string model);
 
         [DllImport(Libraries.MediaContent, EntryPoint = "image_meta_is_burst_shot", CallingConvention = CallingConvention.Cdecl)]
-        internal static extern int IsBurstShot(SafeImageInformationHandle imageInformationHandle, out bool isBurstShot);
+        internal static extern MediaContentError IsBurstShot(SafeImageInformationHandle imageInformationHandle, out bool isBurstShot);
 
         [DllImport(Libraries.MediaContent, EntryPoint = "image_meta_set_orientation", CallingConvention = CallingConvention.Cdecl)]
-        internal static extern int SetOrientation(SafeImageInformationHandle imageInformationHandle, MediaContentOrientation orientation);
+        internal static extern MediaContentError SetOrientation(SafeImageInformationHandle imageInformationHandle, MediaContentOrientation orientation);
 
         [DllImport(Libraries.MediaContent, EntryPoint = "image_meta_get_media_id", CallingConvention = CallingConvention.Cdecl)]
-        internal static extern int GetMediaId(SafeImageInformationHandle imageInformationHandle, out string mediaId);
+        internal static extern MediaContentError GetMediaId(SafeImageInformationHandle imageInformationHandle, out string mediaId);
 
         [DllImport(Libraries.MediaContent, EntryPoint = "image_meta_get_width", CallingConvention = CallingConvention.Cdecl)]
-        internal static extern int GetWidth(SafeImageInformationHandle imageInformationHandle, out int width);
+        internal static extern MediaContentError GetWidth(SafeImageInformationHandle imageInformationHandle, out int width);
 
         [DllImport(Libraries.MediaContent, EntryPoint = "image_meta_get_height", CallingConvention = CallingConvention.Cdecl)]
-        internal static extern int GetHeight(SafeImageInformationHandle imageInformationHandle, out int width);
+        internal static extern MediaContentError GetHeight(SafeImageInformationHandle imageInformationHandle, out int width);
 
         [DllImport(Libraries.MediaContent, EntryPoint = "image_meta_update_to_db", CallingConvention = CallingConvention.Cdecl)]
-        internal static extern int UpdateToDB(IntPtr imageInformationHandle);
+        internal static extern MediaContentError UpdateToDB(IntPtr imageInformationHandle);
 
         internal sealed class SafeImageInformationHandle : SafeHandle
         {