LCOV - code coverage report
Current view: directory - xpcom/build - nsXREAppData.h (source / functions) Found Hit Coverage
Test: app.info Lines: 1 1 100.0 %
Date: 2012-06-02 Functions: 1 1 100.0 %

       1                 : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
       2                 : /* ***** BEGIN LICENSE BLOCK *****
       3                 :  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
       4                 :  *
       5                 :  * The contents of this file are subject to the Mozilla Public License Version
       6                 :  * 1.1 (the "License"); you may not use this file except in compliance with
       7                 :  * the License. You may obtain a copy of the License at
       8                 :  * http://www.mozilla.org/MPL/
       9                 :  *
      10                 :  * Software distributed under the License is distributed on an "AS IS" basis,
      11                 :  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
      12                 :  * for the specific language governing rights and limitations under the
      13                 :  * License.
      14                 :  *
      15                 :  * The Original Code is mozilla.org code.
      16                 :  *
      17                 :  * The Initial Developer of the Original Code is
      18                 :  * Netscape Communications Corporation.
      19                 :  * Portions created by the Initial Developer are Copyright (C) 2002
      20                 :  * the Initial Developer. All Rights Reserved.
      21                 :  *
      22                 :  * Contributor(s):
      23                 :  *  Brian Ryner <bryner@brianryner.com>
      24                 :  *  Benjamin Smedberg <benjamin@smedbergs.us>
      25                 :  *
      26                 :  * Alternatively, the contents of this file may be used under the terms of
      27                 :  * either the GNU General Public License Version 2 or later (the "GPL"), or
      28                 :  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
      29                 :  * in which case the provisions of the GPL or the LGPL are applicable instead
      30                 :  * of those above. If you wish to allow use of your version of this file only
      31                 :  * under the terms of either the GPL or the LGPL, and not to allow others to
      32                 :  * use your version of this file under the terms of the MPL, indicate your
      33                 :  * decision by deleting the provisions above and replace them with the notice
      34                 :  * and other provisions required by the GPL or the LGPL. If you do not delete
      35                 :  * the provisions above, a recipient may use your version of this file under
      36                 :  * the terms of any one of the MPL, the GPL or the LGPL.
      37                 :  *
      38                 :  * ***** END LICENSE BLOCK ***** */
      39                 : 
      40                 : #ifndef nsXREAppData_h
      41                 : #define nsXREAppData_h
      42                 : 
      43                 : #include "mozilla/StandardInteger.h"
      44                 : 
      45                 : class nsILocalFile;
      46                 : 
      47                 : /**
      48                 :  * Application-specific data needed to start the apprunner.
      49                 :  *
      50                 :  * @note When this structure is allocated and manipulated by XRE_CreateAppData,
      51                 :  *       string fields will be allocated with NS_Alloc, and interface pointers
      52                 :  *       are strong references.
      53                 :  */
      54                 : struct nsXREAppData
      55              23 : {
      56                 :   /**
      57                 :    * This should be set to sizeof(nsXREAppData). This structure may be
      58                 :    * extended in future releases, and this ensures that binary compatibility
      59                 :    * is maintained.
      60                 :    */
      61                 :   uint32_t size;
      62                 : 
      63                 :   /**
      64                 :    * The directory of the application to be run. May be null if the
      65                 :    * xulrunner and the app are installed into the same directory.
      66                 :    */
      67                 :   nsILocalFile* directory;
      68                 : 
      69                 :   /**
      70                 :    * The name of the application vendor. This must be ASCII, and is normally
      71                 :    * mixed-case, e.g. "Mozilla". Optional (may be null), but highly
      72                 :    * recommended. Must not be the empty string.
      73                 :    */
      74                 :   const char *vendor;
      75                 : 
      76                 :   /**
      77                 :    * The name of the application. This must be ASCII, and is normally
      78                 :    * mixed-case, e.g. "Firefox". Required (must not be null or an empty
      79                 :    * string).
      80                 :    */
      81                 :   const char *name;
      82                 : 
      83                 :   /**
      84                 :    * The major version, e.g. "0.8.0+". Optional (may be null), but
      85                 :    * required for advanced application features such as the extension
      86                 :    * manager and update service. Must not be the empty string.
      87                 :    */
      88                 :   const char *version;
      89                 : 
      90                 :   /**
      91                 :    * The application's build identifier, e.g. "2004051604"
      92                 :    */
      93                 :   const char *buildID;
      94                 : 
      95                 :   /**
      96                 :    * The application's UUID. Used by the extension manager to determine
      97                 :    * compatible extensions. Optional, but required for advanced application
      98                 :    * features such as the extension manager and update service.
      99                 :    *
     100                 :    * This has traditionally been in the form
     101                 :    * "{AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE}" but for new applications
     102                 :    * a more readable form is encouraged: "appname@vendor.tld". Only
     103                 :    * the following characters are allowed: a-z A-Z 0-9 - . @ _ { } *
     104                 :    */
     105                 :   const char *ID;
     106                 : 
     107                 :   /**
     108                 :    * The copyright information to print for the -h commandline flag,
     109                 :    * e.g. "Copyright (c) 2003 mozilla.org".
     110                 :    */
     111                 :   const char *copyright;
     112                 : 
     113                 :   /**
     114                 :    * Combination of NS_XRE_ prefixed flags (defined below).
     115                 :    */
     116                 :   uint32_t flags;
     117                 : 
     118                 :   /**
     119                 :    * The location of the XRE. XRE_main may not be able to figure this out
     120                 :    * programatically.
     121                 :    */
     122                 :   nsILocalFile* xreDirectory;
     123                 : 
     124                 :   /**
     125                 :    * The minimum/maximum compatible XRE version.
     126                 :    */
     127                 :   const char *minVersion;
     128                 :   const char *maxVersion;
     129                 : 
     130                 :   /**
     131                 :    * The server URL to send crash reports to.
     132                 :    */
     133                 :   const char *crashReporterURL;
     134                 : 
     135                 :   /**
     136                 :    * The profile directory that will be used. Optional (may be null). Must not
     137                 :    * be the empty string, must be ASCII. The path is split into components
     138                 :    * along the path separator characters '/' and '\'.
     139                 :    *
     140                 :    * The application data directory ("UAppData", see below) is normally
     141                 :    * composed as follows, where $HOME is platform-specific:
     142                 :    *
     143                 :    *   UAppData = $HOME[/$vendor]/$name
     144                 :    *
     145                 :    * If present, the 'profile' string will be used instead of the combination of
     146                 :    * vendor and name as follows:
     147                 :    *
     148                 :    *   UAppData = $HOME/$profile
     149                 :    */
     150                 :   const char *profile;
     151                 : };
     152                 : 
     153                 : /**
     154                 :  * Indicates whether or not the profile migrator service may be
     155                 :  * invoked at startup when creating a profile.
     156                 :  */
     157                 : #define NS_XRE_ENABLE_PROFILE_MIGRATOR (1 << 1)
     158                 : 
     159                 : /**
     160                 :  * Indicates whether or not the extension manager service should be
     161                 :  * initialized at startup.
     162                 :  */
     163                 : #define NS_XRE_ENABLE_EXTENSION_MANAGER (1 << 2)
     164                 : 
     165                 : /**
     166                 :  * Indicates whether or not to use Breakpad crash reporting.
     167                 :  */
     168                 : #define NS_XRE_ENABLE_CRASH_REPORTER (1 << 3)
     169                 : 
     170                 : #endif // nsXREAppData_h

Generated by: LCOV version 1.7