Symbian platform (C++)
SDK native APIs, runtime and tooling
Loading...
Searching...
No Matches
sis.h
Go to the documentation of this file.
1#ifndef SYMBIAN_SIS_SIS_H_
2#define SYMBIAN_SIS_SIS_H_
3
4#include <array>
5#include <cstdint>
6#include <string>
7#include <string_view>
8#include <vector>
9
10#include <absl/status/statusor.h>
11
12namespace symbian::sis {
13
15 uint32_t uid = 0;
16 std::string name;
17 std::string vendor;
18 std::string executable_name;
19 std::array<int32_t, 3> version{1, 0, 0};
20};
21
24 uint32_t executable_uid = 0;
25 uint32_t executable_size = 0;
26 std::string executable_sha1; // Hex digest of the verified embedded payload.
27 std::string target;
28
29 struct EmbeddedFile {
30 std::string target;
31 uint32_t size = 0;
32 std::string sha1;
33 uint32_t capabilities = 0;
34 };
35
36 std::vector<EmbeddedFile> files;
38 bool signed_package = false;
39};
40
42 std::string target;
43 std::string bytes;
44};
45
46// Deterministic unsigned SISX, English, one validated E32 application EXE,
47// ordinary installation to !:\sys\bin. No scripts, dependencies or signature.
48// Printable ASCII metadata, experimental UID range and <=16 MiB payload only.
49// This application package format does not authorize installation on hardware.
50absl::StatusOr<std::string> BuildPackage(std::string_view executable,
51 const PackageOptions& options);
52
53// The same bounded profile with original rcomp-produced registration and
54// localisable-caption resources installed on the executable's drive.
55absl::StatusOr<std::string> BuildRegisteredPackage(
56 std::string_view executable, std::string_view registration,
57 std::string_view caption, const PackageOptions& options);
58
59// Includes the registration resource, locale resources and optional icon.
60// Targets use the install-drive placeholder and a fixed application subtree.
61absl::StatusOr<std::string> BuildApplicationPackage(
62 std::string_view executable, const std::vector<ApplicationFile>& assets,
63 const PackageOptions& options);
64
65// Wraps a bounded project SVG in a deterministic, gzip-backed MIF icon.
66absl::StatusOr<std::string> BuildSvgMif(std::string_view svg);
67
68// Sign a canonical package with a PEM RSA key and matching X.509
69// certificate. The private key is never stored in the resulting SIS.
70absl::StatusOr<std::string> SignPackage(std::string_view unsigned_package,
71 std::string_view certificate_pem,
72 std::string_view private_key_pem);
73
74// Bounded inspection of exactly the canonical profile above. Verifies UID,
75// controller/data CRCs, SHA-1 payload hash and native E32 checks. Other SIS
76// profiles return Unimplemented; this is not a general SIS validity verdict.
77absl::StatusOr<PackageInfo> InspectPackage(std::string_view bytes);
78
79} // namespace symbian::sis
80
81#endif // SYMBIAN_SIS_SIS_H_
Definition sis.cc:23
absl::StatusOr< std::string > BuildPackage(std::string_view executable, const PackageOptions &options)
Definition sis.cc:477
absl::StatusOr< PackageInfo > InspectPackage(std::string_view bytes)
Definition sis.cc:653
absl::StatusOr< std::string > BuildSvgMif(std::string_view svg)
Definition sis.cc:500
absl::StatusOr< std::string > BuildApplicationPackage(std::string_view executable, const std::vector< ApplicationFile > &assets, const PackageOptions &options)
Definition sis.cc:494
absl::StatusOr< std::string > SignPackage(std::string_view unsigned_package, std::string_view certificate_pem, std::string_view private_key_pem)
Definition sis.cc:537
absl::StatusOr< std::string > BuildRegisteredPackage(std::string_view executable, std::string_view registration, std::string_view caption, const PackageOptions &options)
Definition sis.cc:482
std::string_view bytes
Definition exports.cc:74
std::string target
Definition sis.h:42
std::string bytes
Definition sis.h:43
std::string target
Definition sis.h:30
uint32_t capabilities
Definition sis.h:33
std::string sha1
Definition sis.h:32
uint32_t size
Definition sis.h:31
Definition sis.h:22
std::string target
Definition sis.h:27
uint32_t executable_size
Definition sis.h:25
bool signed_package
Definition sis.h:38
uint32_t executable_uid
Definition sis.h:24
bool application_registered
Definition sis.h:37
std::vector< EmbeddedFile > files
Definition sis.h:36
std::string executable_sha1
Definition sis.h:26
PackageOptions options
Definition sis.h:23
Definition sis.h:14
std::string name
Definition sis.h:16
uint32_t uid
Definition sis.h:15
std::array< int32_t, 3 > version
Definition sis.h:19
std::string executable_name
Definition sis.h:18
std::string vendor
Definition sis.h:17