File: CameraFilesystem.cs

package info (click to toggle)
f-spot 0.6.2-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 21,784 kB
  • ctags: 16,078
  • sloc: cs: 108,718; sh: 17,053; xml: 13,852; ansic: 3,187; makefile: 2,324
file content (84 lines) | stat: -rw-r--r-- 1,813 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
 * CameraFilesystem.cs
 *
 * Author(s):
 *	Ewen Cheslack-Postava <echeslack@gmail.com>
 *	Larry Ewing <lewing@novell.com>
 *
 * This is free software. See COPYING for details.
 */
using System;
using System.Runtime.InteropServices;

namespace GPhoto2
{
	public enum CameraFilePermissions
	{
		None = 0,
		Read = 1 << 0,
		Delete = 1 << 1,
		All = 0xFF
	}

	public enum CameraFileStatus
	{
		NotDownloaded,
		Downloaded
	}
	
	public enum CameraFileInfoFields
	{
		None		= 0,
		Type		= 1 << 0,
		Name		= 1 << 1,
		Size		= 1 << 2,
		Width		= 1 << 3,
		Height		= 1 << 4,
		Permissions	= 1 << 5,
		Status		= 1 << 6,
		MTime		= 1 << 7,
		All		= 0xFF
	}
	
	[StructLayout(LayoutKind.Sequential)]
	public unsafe struct CameraFileInfoAudio
	{
		public CameraFileInfoFields fields;
		public CameraFileStatus status;
		public ulong size;
		[MarshalAs(UnmanagedType.ByValTStr, SizeConst=64)] public char[] type;
	}
	
	[StructLayout(LayoutKind.Sequential)]
	public unsafe struct CameraFileInfoPreview
	{
		public CameraFileInfoFields fields;
		public CameraFileStatus status;
		public ulong size;
		[MarshalAs(UnmanagedType.ByValTStr, SizeConst=64)] public char[] type;
		
		public uint width, height;
	}
	
	[StructLayout(LayoutKind.Sequential)]
	public unsafe struct CameraFileInfoFile
	{
		public CameraFileInfoFields fields;
		public CameraFileStatus status;
		public ulong size;
		[MarshalAs(UnmanagedType.ByValTStr, SizeConst=64)] public char[] type;
		
		public uint width, height;
		[MarshalAs(UnmanagedType.ByValTStr, SizeConst=64)] public char[] name;
		public CameraFilePermissions permissions;
		public long time;
	}
	
	[StructLayout(LayoutKind.Sequential)]
	public unsafe struct CameraFileInfo
	{
		public CameraFileInfoPreview preview;
		public CameraFileInfoFile file;
		public CameraFileInfoAudio audio;
	}
}