File: libytnef.vapi

package info (click to toggle)
geary 46.0-13
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 15,092 kB
  • sloc: javascript: 972; ansic: 722; sql: 247; xml: 183; python: 30; makefile: 28; sh: 24
file content (58 lines) | stat: -rw-r--r-- 1,520 bytes parent folder | download | duplicates (5)
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
/*
 * Copyright (c) 2018 Oliver Giles <ohw.giles@gmail.com>
 *
 * This software is licensed under the GNU Lesser General Public License
 * (version 2.1 or later).  See the COPYING file in this distribution.
 */

[CCode (cheader_filename = "ytnef.h")]
namespace Ytnef {
	[CCode (cname ="variableLength", has_type_id = false)]
	public struct VariableLength {
		[CCode (array_length_cname = "size")]
		uint8[] data;
	}

	[CCode (cname = "MAPI_UNDEFINED")]
	public VariableLength* MAPI_UNDEFINED;

	[CCode (cname = "int", cprefix = "PT_", has_type_id = false)]
	public enum PropType {
		STRING8
	}

	[CCode (cname = "int", cprefix = "PR_", has_type_id = false)]
	public enum PropID {
		DISPLAY_NAME,
		ATTACH_LONG_FILENAME
	}

	[CCode (cname = "PROP_TAG")]
	public static int PROP_TAG(PropType type, PropID id);

	[CCode (cname = "MAPIProps", has_type_id = false)]
	public struct MAPIProps {
	}

	[CCode (cname = "Attachment", has_type_id = false)]
	public struct Attachment {
		VariableLength Title;
		VariableLength FileData;
		MAPIProps MAPI;
		Attachment? next;
	}

	[CCode (cname = "TNEFStruct", destroy_function="TNEFFree", has_type_id = false)]
	public struct TNEFStruct {
		[CCode (cname = "TNEFInitialize")]
		public TNEFStruct();
		Attachment starting_attach;
	}

	[CCode (cname = "TNEFParseMemory", has_type_id = false)]
	public static int ParseMemory(uint8[] data, ref TNEFStruct tnef);

	[CCode (cname = "MAPIFindProperty")]
	public static unowned VariableLength* MAPIFindProperty(MAPIProps MAPI, uint tag);
}