LCOV - code coverage report
Current view: directory - objdir/dist/include - nsIProfileChangeStatus.h (source / functions) Found Hit Coverage
Test: app.info Lines: 1 0 0.0 %
Date: 2012-06-02 Functions: 1 0 0.0 %

       1                 : /*
       2                 :  * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/profile/public/nsIProfileChangeStatus.idl
       3                 :  */
       4                 : 
       5                 : #ifndef __gen_nsIProfileChangeStatus_h__
       6                 : #define __gen_nsIProfileChangeStatus_h__
       7                 : 
       8                 : 
       9                 : #ifndef __gen_nsISupports_h__
      10                 : #include "nsISupports.h"
      11                 : #endif
      12                 : 
      13                 : /* For IDL files that don't want to include root IDL files. */
      14                 : #ifndef NS_NO_VTABLE
      15                 : #define NS_NO_VTABLE
      16                 : #endif
      17                 : 
      18                 :    /**
      19                 :     * nsIObserver topics for profile changing. Profile changing happens in phases
      20                 :     * in the order given below. An observer may register separately for each phase
      21                 :     * of the process depending on its needs. The subject passed to the observer's
      22                 :     * Observe() method can be QI'd to an nsIProfileChangeStatus.
      23                 :     *
      24                 :     * "profile-approve-change"
      25                 :     *   Called before a profile change is attempted. Typically,
      26                 :     *   the application level observer will ask the user if
      27                 :     *   he/she wants to stop all network activity, close all open
      28                 :     *   windows, etc. If the user says NO, the observer should
      29                 :     *   call the subject's vetoChange(). If any observer does
      30                 :     *   this, the profile will not be changed.
      31                 :     *
      32                 :     * "profile-change-teardown"
      33                 :     *   All async activity must be stopped in this phase. Typically,
      34                 :     *   the application level observer will close all open windows.
      35                 :     *   This is the last phase in which the subject's vetoChange()
      36                 :     *   method may still be called. 
      37                 :     *   The next notification will be either 
      38                 :     *   profile-change-teardown-veto or profile-before-change.
      39                 :     *
      40                 :     * "profile-change-teardown-veto"
      41                 :     *   This notification will only be sent, if the profile change 
      42                 :     *   was vetoed during the profile-change-teardown phase.
      43                 :     *   This allows components to bring back required resources,
      44                 :     *   that were tore down on profile-change-teardown.
      45                 :     *
      46                 :     * "profile-before-change"
      47                 :     *   Called before the profile has changed. Use this notification
      48                 :     *   to prepare for the profile going away. If a component is
      49                 :     *   holding any state which needs to be flushed to a profile-relative
      50                 :     *   location, it should be done here.
      51                 :     *
      52                 :     * "profile-do-change"
      53                 :     *   Called after the profile has changed. Do the work to
      54                 :     *   respond to having a new profile. Any change which
      55                 :     *   affects others must be done in this phase.
      56                 :     *
      57                 :     * "profile-after-change"
      58                 :     *   Called after the profile has changed. Use this notification
      59                 :     *   to make changes that are dependent on what some other listener
      60                 :     *   did during its profile-do-change. For example, to respond to
      61                 :     *   new preferences. 
      62                 :     *
      63                 :     * "profile-initial-state"
      64                 :     *   Called after all phases of a change have completed. Typically
      65                 :     *   in this phase, an application level observer will open a new window.
      66                 :     *
      67                 :     * Contexts for profile changes. These are passed as the someData param to the
      68                 :     * observer's Observe() method.
      69                 :     
      70                 :     * "startup"
      71                 :     *   Going from no profile to a profile.
      72                 :     *
      73                 :     *   The following topics happen in this context:
      74                 :     *       profile-do-change
      75                 :     *       profile-after-change
      76                 :     *
      77                 :     * "shutdown-persist"
      78                 :     *   The user is logging out and whatever data the observer stores
      79                 :     *   for the current profile should be released from memory and
      80                 :     *   saved to disk.
      81                 :     *
      82                 :     * "shutdown-cleanse"
      83                 :     *   The user is logging out and whatever data the observer stores
      84                 :     *   for the current profile should be released from memory and
      85                 :     *   deleted from disk.
      86                 :     *
      87                 :     *   The following topics happen in both shutdown contexts:
      88                 :     *       profile-approve-change
      89                 :     *       profile-change-teardown
      90                 :     *       profile-before-change
      91                 :     *
      92                 :     * "switch"
      93                 :     *   Going from one profile to another.
      94                 :     *
      95                 :     *   All of the above topics happen in a profile switch.
      96                 :     *
      97                 :     */  
      98                 : 
      99                 : /* starting interface:    nsIProfileChangeStatus */
     100                 : #define NS_IPROFILECHANGESTATUS_IID_STR "2f977d43-5485-11d4-87e2-0010a4e75ef2"
     101                 : 
     102                 : #define NS_IPROFILECHANGESTATUS_IID \
     103                 :   {0x2f977d43, 0x5485, 0x11d4, \
     104                 :     { 0x87, 0xe2, 0x00, 0x10, 0xa4, 0xe7, 0x5e, 0xf2 }}
     105                 : 
     106               0 : class NS_NO_VTABLE NS_SCRIPTABLE nsIProfileChangeStatus : public nsISupports {
     107                 :  public: 
     108                 : 
     109                 :   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPROFILECHANGESTATUS_IID)
     110                 : 
     111                 :   /* void vetoChange (); */
     112                 :   NS_SCRIPTABLE NS_IMETHOD VetoChange(void) = 0;
     113                 : 
     114                 :   /* void changeFailed (); */
     115                 :   NS_SCRIPTABLE NS_IMETHOD ChangeFailed(void) = 0;
     116                 : 
     117                 : };
     118                 : 
     119                 :   NS_DEFINE_STATIC_IID_ACCESSOR(nsIProfileChangeStatus, NS_IPROFILECHANGESTATUS_IID)
     120                 : 
     121                 : /* Use this macro when declaring classes that implement this interface. */
     122                 : #define NS_DECL_NSIPROFILECHANGESTATUS \
     123                 :   NS_SCRIPTABLE NS_IMETHOD VetoChange(void); \
     124                 :   NS_SCRIPTABLE NS_IMETHOD ChangeFailed(void); 
     125                 : 
     126                 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
     127                 : #define NS_FORWARD_NSIPROFILECHANGESTATUS(_to) \
     128                 :   NS_SCRIPTABLE NS_IMETHOD VetoChange(void) { return _to VetoChange(); } \
     129                 :   NS_SCRIPTABLE NS_IMETHOD ChangeFailed(void) { return _to ChangeFailed(); } 
     130                 : 
     131                 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
     132                 : #define NS_FORWARD_SAFE_NSIPROFILECHANGESTATUS(_to) \
     133                 :   NS_SCRIPTABLE NS_IMETHOD VetoChange(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->VetoChange(); } \
     134                 :   NS_SCRIPTABLE NS_IMETHOD ChangeFailed(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ChangeFailed(); } 
     135                 : 
     136                 : #if 0
     137                 : /* Use the code below as a template for the implementation class for this interface. */
     138                 : 
     139                 : /* Header file */
     140                 : class nsProfileChangeStatus : public nsIProfileChangeStatus
     141                 : {
     142                 : public:
     143                 :   NS_DECL_ISUPPORTS
     144                 :   NS_DECL_NSIPROFILECHANGESTATUS
     145                 : 
     146                 :   nsProfileChangeStatus();
     147                 : 
     148                 : private:
     149                 :   ~nsProfileChangeStatus();
     150                 : 
     151                 : protected:
     152                 :   /* additional members */
     153                 : };
     154                 : 
     155                 : /* Implementation file */
     156                 : NS_IMPL_ISUPPORTS1(nsProfileChangeStatus, nsIProfileChangeStatus)
     157                 : 
     158                 : nsProfileChangeStatus::nsProfileChangeStatus()
     159                 : {
     160                 :   /* member initializers and constructor code */
     161                 : }
     162                 : 
     163                 : nsProfileChangeStatus::~nsProfileChangeStatus()
     164                 : {
     165                 :   /* destructor code */
     166                 : }
     167                 : 
     168                 : /* void vetoChange (); */
     169                 : NS_IMETHODIMP nsProfileChangeStatus::VetoChange()
     170                 : {
     171                 :     return NS_ERROR_NOT_IMPLEMENTED;
     172                 : }
     173                 : 
     174                 : /* void changeFailed (); */
     175                 : NS_IMETHODIMP nsProfileChangeStatus::ChangeFailed()
     176                 : {
     177                 :     return NS_ERROR_NOT_IMPLEMENTED;
     178                 : }
     179                 : 
     180                 : /* End of implementation class template. */
     181                 : #endif
     182                 : 
     183                 : 
     184                 : #endif /* __gen_nsIProfileChangeStatus_h__ */

Generated by: LCOV version 1.7