LCOV - code coverage report
Current view: directory - objdir/dist/include - nsIJSON.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/dom/interfaces/json/nsIJSON.idl
       3                 :  */
       4                 : 
       5                 : #ifndef __gen_nsIJSON_h__
       6                 : #define __gen_nsIJSON_h__
       7                 : 
       8                 : 
       9                 : #ifndef __gen_domstubs_h__
      10                 : #include "domstubs.h"
      11                 : #endif
      12                 : 
      13                 : #include "jspubtd.h"
      14                 : 
      15                 : /* For IDL files that don't want to include root IDL files. */
      16                 : #ifndef NS_NO_VTABLE
      17                 : #define NS_NO_VTABLE
      18                 : #endif
      19                 : class nsIInputStream; /* forward declaration */
      20                 : 
      21                 : class nsIOutputStream; /* forward declaration */
      22                 : 
      23                 : class nsIScriptGlobalObject; /* forward declaration */
      24                 : 
      25                 : 
      26                 : /* starting interface:    nsIJSON */
      27                 : #define NS_IJSON_IID_STR "43845d58-1054-47fb-8be3-970b3f7bd7ea"
      28                 : 
      29                 : #define NS_IJSON_IID \
      30                 :   {0x43845d58, 0x1054, 0x47fb, \
      31                 :     { 0x8b, 0xe3, 0x97, 0x0b, 0x3f, 0x7b, 0xd7, 0xea }}
      32                 : 
      33             303 : class NS_NO_VTABLE NS_SCRIPTABLE nsIJSON : public nsISupports {
      34                 :  public: 
      35                 : 
      36                 :   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IJSON_IID)
      37                 : 
      38                 :   /* [deprecated,implicit_jscontext,optional_argc] AString encode ([optional] in jsval value); */
      39                 :   NS_SCRIPTABLE NS_IMETHOD Encode(const JS::Value & value, JSContext* cx, PRUint8 _argc, nsAString & _retval NS_OUTPARAM) = 0;
      40                 : 
      41                 :   /* [deprecated,implicit_jscontext,optional_argc] void encodeToStream (in nsIOutputStream stream, in string charset, in boolean writeBOM, [optional] in jsval value); */
      42                 :   NS_SCRIPTABLE NS_IMETHOD EncodeToStream(nsIOutputStream *stream, const char * charset, bool writeBOM, const JS::Value & value, JSContext* cx, PRUint8 _argc) = 0;
      43                 : 
      44                 :   /* [deprecated,implicit_jscontext] jsval decode (in AString str); */
      45                 :   NS_SCRIPTABLE NS_IMETHOD Decode(const nsAString & str, JSContext* cx, JS::Value *_retval NS_OUTPARAM) = 0;
      46                 : 
      47                 :   /* [implicit_jscontext] jsval decodeFromStream (in nsIInputStream stream, in long contentLength); */
      48                 :   NS_SCRIPTABLE NS_IMETHOD DecodeFromStream(nsIInputStream *stream, PRInt32 contentLength, JSContext* cx, JS::Value *_retval NS_OUTPARAM) = 0;
      49                 : 
      50                 :   /* [noscript] AString encodeFromJSVal (in JSValPtr value, in JSContext cx); */
      51                 :   NS_IMETHOD EncodeFromJSVal(jsval *value, JSContext *cx, nsAString & _retval NS_OUTPARAM) = 0;
      52                 : 
      53                 :   /* [noscript] jsval decodeToJSVal (in AString str, in JSContext cx); */
      54                 :   NS_IMETHOD DecodeToJSVal(const nsAString & str, JSContext *cx, JS::Value *_retval NS_OUTPARAM) = 0;
      55                 : 
      56                 :   /* [implicit_jscontext] jsval legacyDecode (in AString str); */
      57                 :   NS_SCRIPTABLE NS_IMETHOD LegacyDecode(const nsAString & str, JSContext* cx, JS::Value *_retval NS_OUTPARAM) = 0;
      58                 : 
      59                 :   /* [implicit_jscontext] jsval legacyDecodeFromStream (in nsIInputStream stream, in long contentLength); */
      60                 :   NS_SCRIPTABLE NS_IMETHOD LegacyDecodeFromStream(nsIInputStream *stream, PRInt32 contentLength, JSContext* cx, JS::Value *_retval NS_OUTPARAM) = 0;
      61                 : 
      62                 :   /* [noscript] jsval legacyDecodeToJSVal (in AString str, in JSContext cx); */
      63                 :   NS_IMETHOD LegacyDecodeToJSVal(const nsAString & str, JSContext *cx, JS::Value *_retval NS_OUTPARAM) = 0;
      64                 : 
      65                 : };
      66                 : 
      67                 :   NS_DEFINE_STATIC_IID_ACCESSOR(nsIJSON, NS_IJSON_IID)
      68                 : 
      69                 : /* Use this macro when declaring classes that implement this interface. */
      70                 : #define NS_DECL_NSIJSON \
      71                 :   NS_SCRIPTABLE NS_IMETHOD Encode(const JS::Value & value, JSContext* cx, PRUint8 _argc, nsAString & _retval NS_OUTPARAM); \
      72                 :   NS_SCRIPTABLE NS_IMETHOD EncodeToStream(nsIOutputStream *stream, const char * charset, bool writeBOM, const JS::Value & value, JSContext* cx, PRUint8 _argc); \
      73                 :   NS_SCRIPTABLE NS_IMETHOD Decode(const nsAString & str, JSContext* cx, JS::Value *_retval NS_OUTPARAM); \
      74                 :   NS_SCRIPTABLE NS_IMETHOD DecodeFromStream(nsIInputStream *stream, PRInt32 contentLength, JSContext* cx, JS::Value *_retval NS_OUTPARAM); \
      75                 :   NS_IMETHOD EncodeFromJSVal(jsval *value, JSContext *cx, nsAString & _retval NS_OUTPARAM); \
      76                 :   NS_IMETHOD DecodeToJSVal(const nsAString & str, JSContext *cx, JS::Value *_retval NS_OUTPARAM); \
      77                 :   NS_SCRIPTABLE NS_IMETHOD LegacyDecode(const nsAString & str, JSContext* cx, JS::Value *_retval NS_OUTPARAM); \
      78                 :   NS_SCRIPTABLE NS_IMETHOD LegacyDecodeFromStream(nsIInputStream *stream, PRInt32 contentLength, JSContext* cx, JS::Value *_retval NS_OUTPARAM); \
      79                 :   NS_IMETHOD LegacyDecodeToJSVal(const nsAString & str, JSContext *cx, JS::Value *_retval NS_OUTPARAM); 
      80                 : 
      81                 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
      82                 : #define NS_FORWARD_NSIJSON(_to) \
      83                 :   NS_SCRIPTABLE NS_IMETHOD Encode(const JS::Value & value, JSContext* cx, PRUint8 _argc, nsAString & _retval NS_OUTPARAM) { return _to Encode(value, cx, _argc, _retval); } \
      84                 :   NS_SCRIPTABLE NS_IMETHOD EncodeToStream(nsIOutputStream *stream, const char * charset, bool writeBOM, const JS::Value & value, JSContext* cx, PRUint8 _argc) { return _to EncodeToStream(stream, charset, writeBOM, value, cx, _argc); } \
      85                 :   NS_SCRIPTABLE NS_IMETHOD Decode(const nsAString & str, JSContext* cx, JS::Value *_retval NS_OUTPARAM) { return _to Decode(str, cx, _retval); } \
      86                 :   NS_SCRIPTABLE NS_IMETHOD DecodeFromStream(nsIInputStream *stream, PRInt32 contentLength, JSContext* cx, JS::Value *_retval NS_OUTPARAM) { return _to DecodeFromStream(stream, contentLength, cx, _retval); } \
      87                 :   NS_IMETHOD EncodeFromJSVal(jsval *value, JSContext *cx, nsAString & _retval NS_OUTPARAM) { return _to EncodeFromJSVal(value, cx, _retval); } \
      88                 :   NS_IMETHOD DecodeToJSVal(const nsAString & str, JSContext *cx, JS::Value *_retval NS_OUTPARAM) { return _to DecodeToJSVal(str, cx, _retval); } \
      89                 :   NS_SCRIPTABLE NS_IMETHOD LegacyDecode(const nsAString & str, JSContext* cx, JS::Value *_retval NS_OUTPARAM) { return _to LegacyDecode(str, cx, _retval); } \
      90                 :   NS_SCRIPTABLE NS_IMETHOD LegacyDecodeFromStream(nsIInputStream *stream, PRInt32 contentLength, JSContext* cx, JS::Value *_retval NS_OUTPARAM) { return _to LegacyDecodeFromStream(stream, contentLength, cx, _retval); } \
      91                 :   NS_IMETHOD LegacyDecodeToJSVal(const nsAString & str, JSContext *cx, JS::Value *_retval NS_OUTPARAM) { return _to LegacyDecodeToJSVal(str, cx, _retval); } 
      92                 : 
      93                 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
      94                 : #define NS_FORWARD_SAFE_NSIJSON(_to) \
      95                 :   NS_SCRIPTABLE NS_IMETHOD Encode(const JS::Value & value, JSContext* cx, PRUint8 _argc, nsAString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Encode(value, cx, _argc, _retval); } \
      96                 :   NS_SCRIPTABLE NS_IMETHOD EncodeToStream(nsIOutputStream *stream, const char * charset, bool writeBOM, const JS::Value & value, JSContext* cx, PRUint8 _argc) { return !_to ? NS_ERROR_NULL_POINTER : _to->EncodeToStream(stream, charset, writeBOM, value, cx, _argc); } \
      97                 :   NS_SCRIPTABLE NS_IMETHOD Decode(const nsAString & str, JSContext* cx, JS::Value *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Decode(str, cx, _retval); } \
      98                 :   NS_SCRIPTABLE NS_IMETHOD DecodeFromStream(nsIInputStream *stream, PRInt32 contentLength, JSContext* cx, JS::Value *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->DecodeFromStream(stream, contentLength, cx, _retval); } \
      99                 :   NS_IMETHOD EncodeFromJSVal(jsval *value, JSContext *cx, nsAString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->EncodeFromJSVal(value, cx, _retval); } \
     100                 :   NS_IMETHOD DecodeToJSVal(const nsAString & str, JSContext *cx, JS::Value *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->DecodeToJSVal(str, cx, _retval); } \
     101                 :   NS_SCRIPTABLE NS_IMETHOD LegacyDecode(const nsAString & str, JSContext* cx, JS::Value *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->LegacyDecode(str, cx, _retval); } \
     102                 :   NS_SCRIPTABLE NS_IMETHOD LegacyDecodeFromStream(nsIInputStream *stream, PRInt32 contentLength, JSContext* cx, JS::Value *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->LegacyDecodeFromStream(stream, contentLength, cx, _retval); } \
     103                 :   NS_IMETHOD LegacyDecodeToJSVal(const nsAString & str, JSContext *cx, JS::Value *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->LegacyDecodeToJSVal(str, cx, _retval); } 
     104                 : 
     105                 : #if 0
     106                 : /* Use the code below as a template for the implementation class for this interface. */
     107                 : 
     108                 : /* Header file */
     109                 : class nsJSON : public nsIJSON
     110                 : {
     111                 : public:
     112                 :   NS_DECL_ISUPPORTS
     113                 :   NS_DECL_NSIJSON
     114                 : 
     115                 :   nsJSON();
     116                 : 
     117                 : private:
     118                 :   ~nsJSON();
     119                 : 
     120                 : protected:
     121                 :   /* additional members */
     122                 : };
     123                 : 
     124                 : /* Implementation file */
     125                 : NS_IMPL_ISUPPORTS1(nsJSON, nsIJSON)
     126                 : 
     127                 : nsJSON::nsJSON()
     128                 : {
     129                 :   /* member initializers and constructor code */
     130                 : }
     131                 : 
     132                 : nsJSON::~nsJSON()
     133                 : {
     134                 :   /* destructor code */
     135                 : }
     136                 : 
     137                 : /* [deprecated,implicit_jscontext,optional_argc] AString encode ([optional] in jsval value); */
     138                 : NS_IMETHODIMP nsJSON::Encode(const JS::Value & value, JSContext* cx, PRUint8 _argc, nsAString & _retval NS_OUTPARAM)
     139                 : {
     140                 :     return NS_ERROR_NOT_IMPLEMENTED;
     141                 : }
     142                 : 
     143                 : /* [deprecated,implicit_jscontext,optional_argc] void encodeToStream (in nsIOutputStream stream, in string charset, in boolean writeBOM, [optional] in jsval value); */
     144                 : NS_IMETHODIMP nsJSON::EncodeToStream(nsIOutputStream *stream, const char * charset, bool writeBOM, const JS::Value & value, JSContext* cx, PRUint8 _argc)
     145                 : {
     146                 :     return NS_ERROR_NOT_IMPLEMENTED;
     147                 : }
     148                 : 
     149                 : /* [deprecated,implicit_jscontext] jsval decode (in AString str); */
     150                 : NS_IMETHODIMP nsJSON::Decode(const nsAString & str, JSContext* cx, JS::Value *_retval NS_OUTPARAM)
     151                 : {
     152                 :     return NS_ERROR_NOT_IMPLEMENTED;
     153                 : }
     154                 : 
     155                 : /* [implicit_jscontext] jsval decodeFromStream (in nsIInputStream stream, in long contentLength); */
     156                 : NS_IMETHODIMP nsJSON::DecodeFromStream(nsIInputStream *stream, PRInt32 contentLength, JSContext* cx, JS::Value *_retval NS_OUTPARAM)
     157                 : {
     158                 :     return NS_ERROR_NOT_IMPLEMENTED;
     159                 : }
     160                 : 
     161                 : /* [noscript] AString encodeFromJSVal (in JSValPtr value, in JSContext cx); */
     162                 : NS_IMETHODIMP nsJSON::EncodeFromJSVal(jsval *value, JSContext *cx, nsAString & _retval NS_OUTPARAM)
     163                 : {
     164                 :     return NS_ERROR_NOT_IMPLEMENTED;
     165                 : }
     166                 : 
     167                 : /* [noscript] jsval decodeToJSVal (in AString str, in JSContext cx); */
     168                 : NS_IMETHODIMP nsJSON::DecodeToJSVal(const nsAString & str, JSContext *cx, JS::Value *_retval NS_OUTPARAM)
     169                 : {
     170                 :     return NS_ERROR_NOT_IMPLEMENTED;
     171                 : }
     172                 : 
     173                 : /* [implicit_jscontext] jsval legacyDecode (in AString str); */
     174                 : NS_IMETHODIMP nsJSON::LegacyDecode(const nsAString & str, JSContext* cx, JS::Value *_retval NS_OUTPARAM)
     175                 : {
     176                 :     return NS_ERROR_NOT_IMPLEMENTED;
     177                 : }
     178                 : 
     179                 : /* [implicit_jscontext] jsval legacyDecodeFromStream (in nsIInputStream stream, in long contentLength); */
     180                 : NS_IMETHODIMP nsJSON::LegacyDecodeFromStream(nsIInputStream *stream, PRInt32 contentLength, JSContext* cx, JS::Value *_retval NS_OUTPARAM)
     181                 : {
     182                 :     return NS_ERROR_NOT_IMPLEMENTED;
     183                 : }
     184                 : 
     185                 : /* [noscript] jsval legacyDecodeToJSVal (in AString str, in JSContext cx); */
     186                 : NS_IMETHODIMP nsJSON::LegacyDecodeToJSVal(const nsAString & str, JSContext *cx, JS::Value *_retval NS_OUTPARAM)
     187                 : {
     188                 :     return NS_ERROR_NOT_IMPLEMENTED;
     189                 : }
     190                 : 
     191                 : /* End of implementation class template. */
     192                 : #endif
     193                 : 
     194                 : 
     195                 : #endif /* __gen_nsIJSON_h__ */

Generated by: LCOV version 1.7