1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/xpcom/build/nsXREAppData.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,141 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef nsXREAppData_h 1.10 +#define nsXREAppData_h 1.11 + 1.12 +#include <stdint.h> 1.13 + 1.14 +class nsIFile; 1.15 + 1.16 +/** 1.17 + * Application-specific data needed to start the apprunner. 1.18 + * 1.19 + * @note When this structure is allocated and manipulated by XRE_CreateAppData, 1.20 + * string fields will be allocated with NS_Alloc, and interface pointers 1.21 + * are strong references. 1.22 + */ 1.23 +struct nsXREAppData 1.24 +{ 1.25 + /** 1.26 + * This should be set to sizeof(nsXREAppData). This structure may be 1.27 + * extended in future releases, and this ensures that binary compatibility 1.28 + * is maintained. 1.29 + */ 1.30 + uint32_t size; 1.31 + 1.32 + /** 1.33 + * The directory of the application to be run. May be null if the 1.34 + * xulrunner and the app are installed into the same directory. 1.35 + */ 1.36 + nsIFile* directory; 1.37 + 1.38 + /** 1.39 + * The name of the application vendor. This must be ASCII, and is normally 1.40 + * mixed-case, e.g. "Mozilla". Optional (may be null), but highly 1.41 + * recommended. Must not be the empty string. 1.42 + */ 1.43 + const char *vendor; 1.44 + 1.45 + /** 1.46 + * The name of the application. This must be ASCII, and is normally 1.47 + * mixed-case, e.g. "Firefox". Required (must not be null or an empty 1.48 + * string). 1.49 + */ 1.50 + const char *name; 1.51 + 1.52 + /** 1.53 + * The major version, e.g. "0.8.0+". Optional (may be null), but 1.54 + * required for advanced application features such as the extension 1.55 + * manager and update service. Must not be the empty string. 1.56 + */ 1.57 + const char *version; 1.58 + 1.59 + /** 1.60 + * The application's build identifier, e.g. "2004051604" 1.61 + */ 1.62 + const char *buildID; 1.63 + 1.64 + /** 1.65 + * The application's UUID. Used by the extension manager to determine 1.66 + * compatible extensions. Optional, but required for advanced application 1.67 + * features such as the extension manager and update service. 1.68 + * 1.69 + * This has traditionally been in the form 1.70 + * "{AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE}" but for new applications 1.71 + * a more readable form is encouraged: "appname@vendor.tld". Only 1.72 + * the following characters are allowed: a-z A-Z 0-9 - . @ _ { } * 1.73 + */ 1.74 + const char *ID; 1.75 + 1.76 + /** 1.77 + * The copyright information to print for the -h commandline flag, 1.78 + * e.g. "Copyright (c) 2003 mozilla.org". 1.79 + */ 1.80 + const char *copyright; 1.81 + 1.82 + /** 1.83 + * Combination of NS_XRE_ prefixed flags (defined below). 1.84 + */ 1.85 + uint32_t flags; 1.86 + 1.87 + /** 1.88 + * The location of the XRE. XRE_main may not be able to figure this out 1.89 + * programatically. 1.90 + */ 1.91 + nsIFile* xreDirectory; 1.92 + 1.93 + /** 1.94 + * The minimum/maximum compatible XRE version. 1.95 + */ 1.96 + const char *minVersion; 1.97 + const char *maxVersion; 1.98 + 1.99 + /** 1.100 + * The server URL to send crash reports to. 1.101 + */ 1.102 + const char *crashReporterURL; 1.103 + 1.104 + /** 1.105 + * The profile directory that will be used. Optional (may be null). Must not 1.106 + * be the empty string, must be ASCII. The path is split into components 1.107 + * along the path separator characters '/' and '\'. 1.108 + * 1.109 + * The application data directory ("UAppData", see below) is normally 1.110 + * composed as follows, where $HOME is platform-specific: 1.111 + * 1.112 + * UAppData = $HOME[/$vendor]/$name 1.113 + * 1.114 + * If present, the 'profile' string will be used instead of the combination of 1.115 + * vendor and name as follows: 1.116 + * 1.117 + * UAppData = $HOME/$profile 1.118 + */ 1.119 + const char *profile; 1.120 + 1.121 + /** 1.122 + * The application name to use in the User Agent string. 1.123 + */ 1.124 + const char *UAName; 1.125 +}; 1.126 + 1.127 +/** 1.128 + * Indicates whether or not the profile migrator service may be 1.129 + * invoked at startup when creating a profile. 1.130 + */ 1.131 +#define NS_XRE_ENABLE_PROFILE_MIGRATOR (1 << 1) 1.132 + 1.133 +/** 1.134 + * Indicates whether or not the extension manager service should be 1.135 + * initialized at startup. 1.136 + */ 1.137 +#define NS_XRE_ENABLE_EXTENSION_MANAGER (1 << 2) 1.138 + 1.139 +/** 1.140 + * Indicates whether or not to use Breakpad crash reporting. 1.141 + */ 1.142 +#define NS_XRE_ENABLE_CRASH_REPORTER (1 << 3) 1.143 + 1.144 +#endif // nsXREAppData_h