1/*
2 * Copyright 2013, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		Ingo Weinhold <ingo_weinhold@gmx.de>
7 */
8#ifndef _PACKAGE__PRIVATE__DAEMON_DEFS_H_
9#define _PACKAGE__PRIVATE__DAEMON_DEFS_H_
10
11
12namespace BPackageKit {
13namespace BPrivate {
14
15
16#define B_PACKAGE_DAEMON_APP_SIGNATURE "application/x-vnd.haiku-package_daemon"
17
18
19// message codes for requests to and replies from the daemon
20enum {
21	B_MESSAGE_GET_INSTALLATION_LOCATION_INFO		= 'PKLI',
22		// "location": int32
23		//		the respective installation location constant
24	B_MESSAGE_GET_INSTALLATION_LOCATION_INFO_REPLY	= 'PKLR',
25		// "base directory device": int32
26		// "base directory node": int64
27		// "packages directory device": int32
28		// "packages directory node": int64
29		// "change count": int64
30		// "active packages": message[]
31		//		archived BPackageInfos of the active packages
32		// "inactive packages": message[]
33		//		archived BPackageInfos of the inactive packages
34
35	B_MESSAGE_COMMIT_TRANSACTION		= 'PKTC',
36		// "location": int32
37		//		the respective installation location constant
38		// "change count": int64
39		//		the expected change count of the installation location; fail,
40		//		if something has changed in the meantime
41		// "transaction": string
42		//		name of the transaction directory (subdirectory of the
43		//		administrative directory) where to-be-activated packages live
44		// "activate": string[]
45		//		file names of the packages to activate; must be in the
46		//		transaction directory
47		// "deactivate": string[]
48		//		file names of the packages to activate; must be in the
49		//		transaction directory
50		// "first boot processing": bool
51		//		if true then runs the package installation processing for
52		//		specified (in the activate list) packages on the volume.
53		//		Doesn't actually add the packages.  Package_daemon preemptively
54		//		deletes an empty transaction directory when done.
55	B_MESSAGE_COMMIT_TRANSACTION_REPLY	= 'PKTR'
56		// "error": int32
57		//		a BTransactionError describing how committing the transaction
58		//		went
59		// "system error": int32
60		//		a status_t for the operation that failed; B_ERROR, if n/a
61		// "error package": string
62		//		[error case only] file name of the package causing the error,
63		//		if any in particarly; optional
64		// "path1": string
65		//		[error case only] first path specific to the error
66		// "path2": string
67		//		[error case only] second path specific to the error
68		// "string1": string
69		//		[error case only] first string specific to the error
70		// "string2": string
71		//		[error case only] second string specific to the error
72		// "old state": string
73		//		[success case only] name of the directory (subdirectory of the
74		//		administrative directory) containing the deactivated packages
75		// "issues": message[]
76		//		A list of non-critical issues that occurred while performing the
77		//		package activation. On success the user should be notified about
78		//		these. Each contains:
79		//		"type": int32
80		//			a BTransactionIssue::BType specifying the kind of issue
81		//		"package": string
82		//			file name of the package which the issue is related to
83		//		"path1": string
84		//			first path specific to the issue
85		//		"path2": string
86		//			second path specific to the issue
87		//		"system error": int32
88		//			a status_t for the operation that failed; B_OK, if n/a
89		//		"exit code": int32
90		//			a exit code of the program that failed; 0, if n/a
91};
92
93
94}	// namespace BPrivate
95}	// namespace BPackageKit
96
97
98#endif	// _PACKAGE__PRIVATE__DAEMON_DEFS_H_
99