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

       1                 : /*
       2                 :  * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/netwerk/base/public/nsINetworkLinkService.idl
       3                 :  */
       4                 : 
       5                 : #ifndef __gen_nsINetworkLinkService_h__
       6                 : #define __gen_nsINetworkLinkService_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                 : /* starting interface:    nsINetworkLinkService */
      19                 : #define NS_INETWORKLINKSERVICE_IID_STR "f7d3be87-7403-4a1e-b89f-2797776e9b08"
      20                 : 
      21                 : #define NS_INETWORKLINKSERVICE_IID \
      22                 :   {0xf7d3be87, 0x7403, 0x4a1e, \
      23                 :     { 0xb8, 0x9f, 0x27, 0x97, 0x77, 0x6e, 0x9b, 0x08 }}
      24                 : 
      25            1386 : class NS_NO_VTABLE NS_SCRIPTABLE nsINetworkLinkService : public nsISupports {
      26                 :  public: 
      27                 : 
      28                 :   NS_DECLARE_STATIC_IID_ACCESSOR(NS_INETWORKLINKSERVICE_IID)
      29                 : 
      30                 :   enum {
      31                 :     LINK_TYPE_UNKNOWN = 0U,
      32                 :     LINK_TYPE_ETHERNET = 1U,
      33                 :     LINK_TYPE_USB = 2U,
      34                 :     LINK_TYPE_WIFI = 3U,
      35                 :     LINK_TYPE_WIMAX = 4U,
      36                 :     LINK_TYPE_2G = 5U,
      37                 :     LINK_TYPE_3G = 6U,
      38                 :     LINK_TYPE_4G = 7U
      39                 :   };
      40                 : 
      41                 :   /* readonly attribute boolean isLinkUp; */
      42                 :   NS_SCRIPTABLE NS_IMETHOD GetIsLinkUp(bool *aIsLinkUp) = 0;
      43                 : 
      44                 :   /* readonly attribute boolean linkStatusKnown; */
      45                 :   NS_SCRIPTABLE NS_IMETHOD GetLinkStatusKnown(bool *aLinkStatusKnown) = 0;
      46                 : 
      47                 :   /* readonly attribute unsigned long linkType; */
      48                 :   NS_SCRIPTABLE NS_IMETHOD GetLinkType(PRUint32 *aLinkType) = 0;
      49                 : 
      50                 : };
      51                 : 
      52                 :   NS_DEFINE_STATIC_IID_ACCESSOR(nsINetworkLinkService, NS_INETWORKLINKSERVICE_IID)
      53                 : 
      54                 : /* Use this macro when declaring classes that implement this interface. */
      55                 : #define NS_DECL_NSINETWORKLINKSERVICE \
      56                 :   NS_SCRIPTABLE NS_IMETHOD GetIsLinkUp(bool *aIsLinkUp); \
      57                 :   NS_SCRIPTABLE NS_IMETHOD GetLinkStatusKnown(bool *aLinkStatusKnown); \
      58                 :   NS_SCRIPTABLE NS_IMETHOD GetLinkType(PRUint32 *aLinkType); 
      59                 : 
      60                 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
      61                 : #define NS_FORWARD_NSINETWORKLINKSERVICE(_to) \
      62                 :   NS_SCRIPTABLE NS_IMETHOD GetIsLinkUp(bool *aIsLinkUp) { return _to GetIsLinkUp(aIsLinkUp); } \
      63                 :   NS_SCRIPTABLE NS_IMETHOD GetLinkStatusKnown(bool *aLinkStatusKnown) { return _to GetLinkStatusKnown(aLinkStatusKnown); } \
      64                 :   NS_SCRIPTABLE NS_IMETHOD GetLinkType(PRUint32 *aLinkType) { return _to GetLinkType(aLinkType); } 
      65                 : 
      66                 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
      67                 : #define NS_FORWARD_SAFE_NSINETWORKLINKSERVICE(_to) \
      68                 :   NS_SCRIPTABLE NS_IMETHOD GetIsLinkUp(bool *aIsLinkUp) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsLinkUp(aIsLinkUp); } \
      69                 :   NS_SCRIPTABLE NS_IMETHOD GetLinkStatusKnown(bool *aLinkStatusKnown) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLinkStatusKnown(aLinkStatusKnown); } \
      70                 :   NS_SCRIPTABLE NS_IMETHOD GetLinkType(PRUint32 *aLinkType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLinkType(aLinkType); } 
      71                 : 
      72                 : #if 0
      73                 : /* Use the code below as a template for the implementation class for this interface. */
      74                 : 
      75                 : /* Header file */
      76                 : class nsNetworkLinkService : public nsINetworkLinkService
      77                 : {
      78                 : public:
      79                 :   NS_DECL_ISUPPORTS
      80                 :   NS_DECL_NSINETWORKLINKSERVICE
      81                 : 
      82                 :   nsNetworkLinkService();
      83                 : 
      84                 : private:
      85                 :   ~nsNetworkLinkService();
      86                 : 
      87                 : protected:
      88                 :   /* additional members */
      89                 : };
      90                 : 
      91                 : /* Implementation file */
      92                 : NS_IMPL_ISUPPORTS1(nsNetworkLinkService, nsINetworkLinkService)
      93                 : 
      94                 : nsNetworkLinkService::nsNetworkLinkService()
      95                 : {
      96                 :   /* member initializers and constructor code */
      97                 : }
      98                 : 
      99                 : nsNetworkLinkService::~nsNetworkLinkService()
     100                 : {
     101                 :   /* destructor code */
     102                 : }
     103                 : 
     104                 : /* readonly attribute boolean isLinkUp; */
     105                 : NS_IMETHODIMP nsNetworkLinkService::GetIsLinkUp(bool *aIsLinkUp)
     106                 : {
     107                 :     return NS_ERROR_NOT_IMPLEMENTED;
     108                 : }
     109                 : 
     110                 : /* readonly attribute boolean linkStatusKnown; */
     111                 : NS_IMETHODIMP nsNetworkLinkService::GetLinkStatusKnown(bool *aLinkStatusKnown)
     112                 : {
     113                 :     return NS_ERROR_NOT_IMPLEMENTED;
     114                 : }
     115                 : 
     116                 : /* readonly attribute unsigned long linkType; */
     117                 : NS_IMETHODIMP nsNetworkLinkService::GetLinkType(PRUint32 *aLinkType)
     118                 : {
     119                 :     return NS_ERROR_NOT_IMPLEMENTED;
     120                 : }
     121                 : 
     122                 : /* End of implementation class template. */
     123                 : #endif
     124                 : 
     125                 : /**
     126                 :  * We send notifications through nsIObserverService with topic
     127                 :  * NS_NETWORK_LINK_TOPIC whenever one of isLinkUp or linkStatusKnown
     128                 :  * changes. We pass one of the NS_NETWORK_LINK_DATA_ constants below
     129                 :  * as the aData parameter of the notification.
     130                 :  */
     131                 : #define NS_NETWORK_LINK_TOPIC "network:link-status-changed"
     132                 : /**
     133                 :  * isLinkUp is now true, linkStatusKnown is true.
     134                 :  */
     135                 : #define NS_NETWORK_LINK_DATA_UP      "up"
     136                 : /**
     137                 :  * isLinkUp is now false, linkStatusKnown is true.
     138                 :  */
     139                 : #define NS_NETWORK_LINK_DATA_DOWN    "down"
     140                 : /**
     141                 :  * linkStatusKnown is now false.
     142                 :  */
     143                 : #define NS_NETWORK_LINK_DATA_UNKNOWN "unknown"
     144                 : /**
     145                 :  * We send notifications through nsIObserverService with topic
     146                 :  * NS_NETWORK_LINK_TYPE_TOPIC whenever the network connection type
     147                 :  * changes. We pass one of the valid connection type constants
     148                 :  * below as the aData parameter of the notification.
     149                 :  */
     150                 : #define NS_NETWORK_LINK_TYPE_TOPIC "network:link-type-changed"
     151                 : /** We were unable to determine the network connection type */
     152                 : #define NS_NETWORK_LINK_TYPE_UNKNOWN  "unknown"
     153                 : /** A standard wired ethernet connection */
     154                 : #define NS_NETWORK_LINK_TYPE_ETHERNET    "ethernet"
     155                 : /** A connection via a USB port */
     156                 : #define NS_NETWORK_LINK_TYPE_USB    "usb"
     157                 : /** A connection via a WiFi access point (IEEE802.11) */
     158                 : #define NS_NETWORK_LINK_TYPE_WIFI "wifi"
     159                 : /** A connection via WiMax (IEEE802.16) */
     160                 : #define NS_NETWORK_LINK_TYPE_WIMAX "wimax"
     161                 : /** A '2G' mobile connection (e.g. GSM, GPRS, EDGE) */
     162                 : #define NS_NETWORK_LINK_TYPE_2G "2g"
     163                 : /** A '3G' mobile connection (e.g. UMTS, CDMA) */
     164                 : #define NS_NETWORK_LINK_TYPE_3G "3g"
     165                 : /** A '4G' mobile connection (e.g. LTE, UMB) */
     166                 : #define NS_NETWORK_LINK_TYPE_4G "4g"
     167                 : 
     168                 : #endif /* __gen_nsINetworkLinkService_h__ */

Generated by: LCOV version 1.7