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 12 namespace BPackageKit { 13 namespace 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 20 enum { 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 B_MESSAGE_COMMIT_TRANSACTION_REPLY = 'PKTR' 51 // "error": int32 52 // a BTransactionError describing how committing the transaction 53 // went 54 // "system error": int32 55 // a status_t for the operation that failed; B_ERROR, if n/a 56 // "error package": string 57 // [error case only] file name of the package causing the error, 58 // if any in particarly; optional 59 // "path1": string 60 // [error case only] first path specific to the error 61 // "path2": string 62 // [error case only] second path specific to the error 63 // "string1": string 64 // [error case only] first string specific to the error 65 // "string2": string 66 // [error case only] second string specific to the error 67 // "old state": string 68 // [success case only] name of the directory (subdirectory of the 69 // administrative directory) containing the deactivated packages 70 // "issues": message[] 71 // A list of non-critical issues that occurred while performing the 72 // package activation. On success the user should be notified about 73 // these. Each contains: 74 // "type": int32 75 // a BTransactionIssue::BType specifying the kind of issue 76 // "package": string 77 // file name of the package which the issue is related to 78 // "path1": string 79 // first path specific to the issue 80 // "path2": string 81 // second path specific to the issue 82 // "system error": int32 83 // a status_t for the operation that failed; B_OK, if n/a 84 // "exit code": int32 85 // a exit code of the program that failed; 0, if n/a 86 }; 87 88 89 } // namespace BPrivate 90 } // namespace BPackageKit 91 92 93 #endif // _PACKAGE__PRIVATE__DAEMON_DEFS_H_ 94