LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/dist/include - nsIJSON.h (source / functions) Hit Total Coverage
Test: output.info Lines: 1 1 100.0 %
Date: 2017-07-14 16:53:18 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * DO NOT EDIT.  THIS FILE IS GENERATED FROM ../../../dist/idl/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 "js/Value.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             : #include "js/TypeDecls.h"
      26             : 
      27             : /* starting interface:    nsIJSON */
      28             : #define NS_IJSON_IID_STR "083aebb0-7790-43b2-ae81-9e404e626236"
      29             : 
      30             : #define NS_IJSON_IID \
      31             :   {0x083aebb0, 0x7790, 0x43b2, \
      32             :     { 0xae, 0x81, 0x9e, 0x40, 0x4e, 0x62, 0x62, 0x36 }}
      33             : 
      34           2 : class NS_NO_VTABLE nsIJSON : public nsISupports {
      35             :  public:
      36             : 
      37             :   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IJSON_IID)
      38             : 
      39             :   /* [deprecated,implicit_jscontext,optional_argc] AString encode ([optional] in jsval value); */
      40             :   NS_IMETHOD Encode(JS::HandleValue value, JSContext* cx, uint8_t _argc, nsAString & _retval) = 0;
      41             : 
      42             :   /* [deprecated,implicit_jscontext,optional_argc] void encodeToStream (in nsIOutputStream stream, in string charset, in boolean writeBOM, [optional] in jsval value); */
      43             :   NS_IMETHOD EncodeToStream(nsIOutputStream *stream, const char * charset, bool writeBOM, JS::HandleValue value, JSContext* cx, uint8_t _argc) = 0;
      44             : 
      45             :   /* [deprecated,implicit_jscontext] jsval decode (in AString str); */
      46             :   NS_IMETHOD Decode(const nsAString & str, JSContext* cx, JS::MutableHandleValue _retval) = 0;
      47             : 
      48             :   /* [implicit_jscontext] jsval decodeFromStream (in nsIInputStream stream, in long contentLength); */
      49             :   NS_IMETHOD DecodeFromStream(nsIInputStream *stream, int32_t contentLength, JSContext* cx, JS::MutableHandleValue _retval) = 0;
      50             : 
      51             :   /* [noscript] AString encodeFromJSVal (in JSValPtr value, in JSContext cx); */
      52             :   NS_IMETHOD EncodeFromJSVal(JS::Value *value, JSContext *cx, nsAString & _retval) = 0;
      53             : 
      54             :   /* [noscript] jsval decodeToJSVal (in AString str, in JSContext cx); */
      55             :   NS_IMETHOD DecodeToJSVal(const nsAString & str, JSContext *cx, JS::MutableHandleValue _retval) = 0;
      56             : 
      57             : };
      58             : 
      59             :   NS_DEFINE_STATIC_IID_ACCESSOR(nsIJSON, NS_IJSON_IID)
      60             : 
      61             : /* Use this macro when declaring classes that implement this interface. */
      62             : #define NS_DECL_NSIJSON \
      63             :   NS_IMETHOD Encode(JS::HandleValue value, JSContext* cx, uint8_t _argc, nsAString & _retval) override; \
      64             :   NS_IMETHOD EncodeToStream(nsIOutputStream *stream, const char * charset, bool writeBOM, JS::HandleValue value, JSContext* cx, uint8_t _argc) override; \
      65             :   NS_IMETHOD Decode(const nsAString & str, JSContext* cx, JS::MutableHandleValue _retval) override; \
      66             :   NS_IMETHOD DecodeFromStream(nsIInputStream *stream, int32_t contentLength, JSContext* cx, JS::MutableHandleValue _retval) override; \
      67             :   NS_IMETHOD EncodeFromJSVal(JS::Value *value, JSContext *cx, nsAString & _retval) override; \
      68             :   NS_IMETHOD DecodeToJSVal(const nsAString & str, JSContext *cx, JS::MutableHandleValue _retval) override; 
      69             : 
      70             : /* Use this macro when declaring the members of this interface when the
      71             :    class doesn't implement the interface. This is useful for forwarding. */
      72             : #define NS_DECL_NON_VIRTUAL_NSIJSON \
      73             :   nsresult Encode(JS::HandleValue value, JSContext* cx, uint8_t _argc, nsAString & _retval); \
      74             :   nsresult EncodeToStream(nsIOutputStream *stream, const char * charset, bool writeBOM, JS::HandleValue value, JSContext* cx, uint8_t _argc); \
      75             :   nsresult Decode(const nsAString & str, JSContext* cx, JS::MutableHandleValue _retval); \
      76             :   nsresult DecodeFromStream(nsIInputStream *stream, int32_t contentLength, JSContext* cx, JS::MutableHandleValue _retval); \
      77             :   nsresult EncodeFromJSVal(JS::Value *value, JSContext *cx, nsAString & _retval); \
      78             :   nsresult DecodeToJSVal(const nsAString & str, JSContext *cx, JS::MutableHandleValue _retval); 
      79             : 
      80             : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
      81             : #define NS_FORWARD_NSIJSON(_to) \
      82             :   NS_IMETHOD Encode(JS::HandleValue value, JSContext* cx, uint8_t _argc, nsAString & _retval) override { return _to Encode(value, cx, _argc, _retval); } \
      83             :   NS_IMETHOD EncodeToStream(nsIOutputStream *stream, const char * charset, bool writeBOM, JS::HandleValue value, JSContext* cx, uint8_t _argc) override { return _to EncodeToStream(stream, charset, writeBOM, value, cx, _argc); } \
      84             :   NS_IMETHOD Decode(const nsAString & str, JSContext* cx, JS::MutableHandleValue _retval) override { return _to Decode(str, cx, _retval); } \
      85             :   NS_IMETHOD DecodeFromStream(nsIInputStream *stream, int32_t contentLength, JSContext* cx, JS::MutableHandleValue _retval) override { return _to DecodeFromStream(stream, contentLength, cx, _retval); } \
      86             :   NS_IMETHOD EncodeFromJSVal(JS::Value *value, JSContext *cx, nsAString & _retval) override { return _to EncodeFromJSVal(value, cx, _retval); } \
      87             :   NS_IMETHOD DecodeToJSVal(const nsAString & str, JSContext *cx, JS::MutableHandleValue _retval) override { return _to DecodeToJSVal(str, cx, _retval); } 
      88             : 
      89             : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
      90             : #define NS_FORWARD_SAFE_NSIJSON(_to) \
      91             :   NS_IMETHOD Encode(JS::HandleValue value, JSContext* cx, uint8_t _argc, nsAString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Encode(value, cx, _argc, _retval); } \
      92             :   NS_IMETHOD EncodeToStream(nsIOutputStream *stream, const char * charset, bool writeBOM, JS::HandleValue value, JSContext* cx, uint8_t _argc) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EncodeToStream(stream, charset, writeBOM, value, cx, _argc); } \
      93             :   NS_IMETHOD Decode(const nsAString & str, JSContext* cx, JS::MutableHandleValue _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Decode(str, cx, _retval); } \
      94             :   NS_IMETHOD DecodeFromStream(nsIInputStream *stream, int32_t contentLength, JSContext* cx, JS::MutableHandleValue _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DecodeFromStream(stream, contentLength, cx, _retval); } \
      95             :   NS_IMETHOD EncodeFromJSVal(JS::Value *value, JSContext *cx, nsAString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EncodeFromJSVal(value, cx, _retval); } \
      96             :   NS_IMETHOD DecodeToJSVal(const nsAString & str, JSContext *cx, JS::MutableHandleValue _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DecodeToJSVal(str, cx, _retval); } 
      97             : 
      98             : #if 0
      99             : /* Use the code below as a template for the implementation class for this interface. */
     100             : 
     101             : /* Header file */
     102             : class nsJSON : public nsIJSON
     103             : {
     104             : public:
     105             :   NS_DECL_ISUPPORTS
     106             :   NS_DECL_NSIJSON
     107             : 
     108             :   nsJSON();
     109             : 
     110             : private:
     111             :   ~nsJSON();
     112             : 
     113             : protected:
     114             :   /* additional members */
     115             : };
     116             : 
     117             : /* Implementation file */
     118             : NS_IMPL_ISUPPORTS(nsJSON, nsIJSON)
     119             : 
     120             : nsJSON::nsJSON()
     121             : {
     122             :   /* member initializers and constructor code */
     123             : }
     124             : 
     125             : nsJSON::~nsJSON()
     126             : {
     127             :   /* destructor code */
     128             : }
     129             : 
     130             : /* [deprecated,implicit_jscontext,optional_argc] AString encode ([optional] in jsval value); */
     131             : NS_IMETHODIMP nsJSON::Encode(JS::HandleValue value, JSContext* cx, uint8_t _argc, nsAString & _retval)
     132             : {
     133             :     return NS_ERROR_NOT_IMPLEMENTED;
     134             : }
     135             : 
     136             : /* [deprecated,implicit_jscontext,optional_argc] void encodeToStream (in nsIOutputStream stream, in string charset, in boolean writeBOM, [optional] in jsval value); */
     137             : NS_IMETHODIMP nsJSON::EncodeToStream(nsIOutputStream *stream, const char * charset, bool writeBOM, JS::HandleValue value, JSContext* cx, uint8_t _argc)
     138             : {
     139             :     return NS_ERROR_NOT_IMPLEMENTED;
     140             : }
     141             : 
     142             : /* [deprecated,implicit_jscontext] jsval decode (in AString str); */
     143             : NS_IMETHODIMP nsJSON::Decode(const nsAString & str, JSContext* cx, JS::MutableHandleValue _retval)
     144             : {
     145             :     return NS_ERROR_NOT_IMPLEMENTED;
     146             : }
     147             : 
     148             : /* [implicit_jscontext] jsval decodeFromStream (in nsIInputStream stream, in long contentLength); */
     149             : NS_IMETHODIMP nsJSON::DecodeFromStream(nsIInputStream *stream, int32_t contentLength, JSContext* cx, JS::MutableHandleValue _retval)
     150             : {
     151             :     return NS_ERROR_NOT_IMPLEMENTED;
     152             : }
     153             : 
     154             : /* [noscript] AString encodeFromJSVal (in JSValPtr value, in JSContext cx); */
     155             : NS_IMETHODIMP nsJSON::EncodeFromJSVal(JS::Value *value, JSContext *cx, nsAString & _retval)
     156             : {
     157             :     return NS_ERROR_NOT_IMPLEMENTED;
     158             : }
     159             : 
     160             : /* [noscript] jsval decodeToJSVal (in AString str, in JSContext cx); */
     161             : NS_IMETHODIMP nsJSON::DecodeToJSVal(const nsAString & str, JSContext *cx, JS::MutableHandleValue _retval)
     162             : {
     163             :     return NS_ERROR_NOT_IMPLEMENTED;
     164             : }
     165             : 
     166             : /* End of implementation class template. */
     167             : #endif
     168             : 
     169             : 
     170             : #endif /* __gen_nsIJSON_h__ */

Generated by: LCOV version 1.13