/* * DO NOT EDIT. THIS FILE IS GENERATED FROM nsITimingService.idl */ #ifndef __gen_nsITimingService_h__ #define __gen_nsITimingService_h__ #ifndef __gen_nsISupports_h__ #include "nsISupports.h" #endif /* For IDL files that don't want to include root IDL files. */ #ifndef NS_NO_VTABLE #define NS_NO_VTABLE #endif /* starting interface: nsITimingService */ #define NS_ITIMINGSERVICE_IID_STR "53510e04-0891-4fd0-bb63-5bf243100bf7" #define NS_ITIMINGSERVICE_IID \ {0x53510e04, 0x0891, 0x4fd0, \ { 0xbb, 0x63, 0x5b, 0xf2, 0x43, 0x10, 0x0b, 0xf7 }} class NS_NO_VTABLE nsITimingService : public nsISupports { public: NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITIMINGSERVICE_IID) /** * startNamedTimer - start or reset the timer with the given name */ /* void startTimer (in string timername); */ NS_IMETHOD StartTimer(const char *timername) = 0; /** * getTimerElapsed() * get the elapsed time on the given timer */ /* long long getElapsedTime (in string timername); */ NS_IMETHOD GetElapsedTime(const char *timername, PRInt64 *_retval) = 0; /** * setNamedTimer() * for advanced users only - sets the start time for a given * timer. Only use if you could not call startNamedTimer() for * some reason */ /* void setTimer (in string timername, in long long starttime); */ NS_IMETHOD SetTimer(const char *timername, PRInt64 starttime) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSITIMINGSERVICE \ NS_IMETHOD StartTimer(const char *timername); \ NS_IMETHOD GetElapsedTime(const char *timername, PRInt64 *_retval); \ NS_IMETHOD SetTimer(const char *timername, PRInt64 starttime); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSITIMINGSERVICE(_to) \ NS_IMETHOD StartTimer(const char *timername) { return _to StartTimer(timername); } \ NS_IMETHOD GetElapsedTime(const char *timername, PRInt64 *_retval) { return _to GetElapsedTime(timername, _retval); } \ NS_IMETHOD SetTimer(const char *timername, PRInt64 starttime) { return _to SetTimer(timername, starttime); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSITIMINGSERVICE(_to) \ NS_IMETHOD StartTimer(const char *timername) { return !_to ? NS_ERROR_NULL_POINTER : _to->StartTimer(timername); } \ NS_IMETHOD GetElapsedTime(const char *timername, PRInt64 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetElapsedTime(timername, _retval); } \ NS_IMETHOD SetTimer(const char *timername, PRInt64 starttime) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTimer(timername, starttime); } #if 0 /* Use the code below as a template for the implementation class for this interface. */ /* Header file */ class nsTimingService : public nsITimingService { public: NS_DECL_ISUPPORTS NS_DECL_NSITIMINGSERVICE nsTimingService(); virtual ~nsTimingService(); /* additional members */ }; /* Implementation file */ NS_IMPL_ISUPPORTS1(nsTimingService, nsITimingService) nsTimingService::nsTimingService() { NS_INIT_ISUPPORTS(); /* member initializers and constructor code */ } nsTimingService::~nsTimingService() { /* destructor code */ } /* void startTimer (in string timername); */ NS_IMETHODIMP nsTimingService::StartTimer(const char *timername) { return NS_ERROR_NOT_IMPLEMENTED; } /* long long getElapsedTime (in string timername); */ NS_IMETHODIMP nsTimingService::GetElapsedTime(const char *timername, PRInt64 *_retval) { return NS_ERROR_NOT_IMPLEMENTED; } /* void setTimer (in string timername, in long long starttime); */ NS_IMETHODIMP nsTimingService::SetTimer(const char *timername, PRInt64 starttime) { return NS_ERROR_NOT_IMPLEMENTED; } /* End of implementation class template. */ #endif #define NS_TIMINGSERVICE_CONTRACTID \ "@mozilla.org/appshell/timing-service;1" #endif /* __gen_nsITimingService_h__ */ .