Fix typo in 9b54bd30006c008b4a951331b273613d5bac3abf
[pm.git] / xpcom / build / nsXREAppData.h
blob4c9c6351ca80370580145af46a93e815befc128b
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef nsXREAppData_h
7 #define nsXREAppData_h
9 #include <stdint.h>
10 #include "mozilla/Attributes.h"
12 class nsIFile;
14 /**
15 * Application-specific data needed to start the apprunner.
17 * @note When this structure is allocated and manipulated by XRE_CreateAppData,
18 * string fields will be allocated with NS_Alloc, and interface pointers
19 * are strong references.
21 struct nsXREAppData
23 /**
24 * This should be set to sizeof(nsXREAppData). This structure may be
25 * extended in future releases, and this ensures that binary compatibility
26 * is maintained.
28 uint32_t size;
30 /**
31 * The directory of the application to be run. May be null if the
32 * xulrunner and the app are installed into the same directory.
34 nsIFile* MOZ_NON_OWNING_REF directory;
36 /**
37 * The name of the application vendor. This must be ASCII, and is normally
38 * mixed-case, e.g. "Mozilla". Optional (may be null), but highly
39 * recommended. Must not be the empty string.
41 const char* vendor;
43 /**
44 * The name of the application. This must be ASCII, and is normally
45 * mixed-case, e.g. "Firefox". Required (must not be null or an empty
46 * string).
48 const char* name;
50 /**
51 * The internal name of the application for remoting purposes. When left
52 * unspecified, "name" is used instead. This must be ASCII, and is normally
53 * lowercase, e.g. "firefox". Optional (may be null but not an empty string).
55 const char* remotingName;
57 /**
58 * The major version, e.g. "0.8.0+". Optional (may be null), but
59 * required for advanced application features such as the extension
60 * manager and update service. Must not be the empty string.
62 const char* version;
64 /**
65 * The application's build identifier, e.g. "2004051604"
67 const char* buildID;
69 /**
70 * The application's UUID. Used by the extension manager to determine
71 * compatible extensions. Optional, but required for advanced application
72 * features such as the extension manager and update service.
74 * This has traditionally been in the form
75 * "{AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE}" but for new applications
76 * a more readable form is encouraged: "appname@vendor.tld". Only
77 * the following characters are allowed: a-z A-Z 0-9 - . @ _ { } *
79 const char* ID;
81 /**
82 * The copyright information to print for the -h commandline flag,
83 * e.g. "Copyright (c) 2003 mozilla.org".
85 const char* copyright;
87 /**
88 * Combination of NS_XRE_ prefixed flags (defined below).
90 uint32_t flags;
92 /**
93 * The location of the XRE. XRE_main may not be able to figure this out
94 * programatically.
96 nsIFile* MOZ_NON_OWNING_REF xreDirectory;
98 /**
99 * The minimum/maximum compatible XRE version.
101 const char* minVersion;
102 const char* maxVersion;
105 * The server URL to send crash reports to.
107 const char* crashReporterURL;
110 * The profile directory that will be used. Optional (may be null). Must not
111 * be the empty string, must be ASCII. The path is split into components
112 * along the path separator characters '/' and '\'.
114 * The application data directory ("UAppData", see below) is normally
115 * composed as follows, where $HOME is platform-specific:
117 * UAppData = $HOME[/$vendor]/$name
119 * If present, the 'profile' string will be used instead of the combination of
120 * vendor and name as follows:
122 * UAppData = $HOME/$profile
124 const char* profile;
127 * The application name to use in the User Agent string.
129 const char* UAName;
133 * Indicates whether or not the profile migrator service may be
134 * invoked at startup when creating a profile.
136 #define NS_XRE_ENABLE_PROFILE_MIGRATOR (1 << 1)
139 * Indicates whether or not to use Breakpad crash reporting.
141 #define NS_XRE_ENABLE_CRASH_REPORTER (1 << 3)
143 #endif // nsXREAppData_h