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

       1                 : /*
       2                 :  * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/storage/public/mozIStorageValueArray.idl
       3                 :  */
       4                 : 
       5                 : #ifndef __gen_mozIStorageValueArray_h__
       6                 : #define __gen_mozIStorageValueArray_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:    mozIStorageValueArray */
      19                 : #define MOZISTORAGEVALUEARRAY_IID_STR "07b5b93e-113c-4150-863c-d247b003a55d"
      20                 : 
      21                 : #define MOZISTORAGEVALUEARRAY_IID \
      22                 :   {0x07b5b93e, 0x113c, 0x4150, \
      23                 :     { 0x86, 0x3c, 0xd2, 0x47, 0xb0, 0x03, 0xa5, 0x5d }}
      24                 : 
      25          106571 : class NS_SCRIPTABLE mozIStorageValueArray : public nsISupports {
      26                 :  public: 
      27                 : 
      28                 :   NS_DECLARE_STATIC_IID_ACCESSOR(MOZISTORAGEVALUEARRAY_IID)
      29                 : 
      30                 :   enum {
      31                 :     VALUE_TYPE_NULL = 0,
      32                 :     VALUE_TYPE_INTEGER = 1,
      33                 :     VALUE_TYPE_FLOAT = 2,
      34                 :     VALUE_TYPE_TEXT = 3,
      35                 :     VALUE_TYPE_BLOB = 4
      36                 :   };
      37                 : 
      38                 :   /* readonly attribute unsigned long numEntries; */
      39                 :   NS_SCRIPTABLE NS_IMETHOD GetNumEntries(PRUint32 *aNumEntries) = 0;
      40                 : 
      41                 :   /* long getTypeOfIndex (in unsigned long aIndex); */
      42                 :   NS_SCRIPTABLE NS_IMETHOD GetTypeOfIndex(PRUint32 aIndex, PRInt32 *_retval NS_OUTPARAM) = 0;
      43                 : 
      44                 :   /* long getInt32 (in unsigned long aIndex); */
      45                 :   NS_SCRIPTABLE NS_IMETHOD GetInt32(PRUint32 aIndex, PRInt32 *_retval NS_OUTPARAM) = 0;
      46                 : 
      47                 :   /* long long getInt64 (in unsigned long aIndex); */
      48                 :   NS_SCRIPTABLE NS_IMETHOD GetInt64(PRUint32 aIndex, PRInt64 *_retval NS_OUTPARAM) = 0;
      49                 : 
      50                 :   /* double getDouble (in unsigned long aIndex); */
      51                 :   NS_SCRIPTABLE NS_IMETHOD GetDouble(PRUint32 aIndex, double *_retval NS_OUTPARAM) = 0;
      52                 : 
      53                 :   /* AUTF8String getUTF8String (in unsigned long aIndex); */
      54                 :   NS_SCRIPTABLE NS_IMETHOD GetUTF8String(PRUint32 aIndex, nsACString & _retval NS_OUTPARAM) = 0;
      55                 : 
      56                 :   /* AString getString (in unsigned long aIndex); */
      57                 :   NS_SCRIPTABLE NS_IMETHOD GetString(PRUint32 aIndex, nsAString & _retval NS_OUTPARAM) = 0;
      58                 : 
      59                 :   /* void getBlob (in unsigned long aIndex, out unsigned long aDataSize, [array, size_is (aDataSize)] out octet aData); */
      60                 :   NS_SCRIPTABLE NS_IMETHOD GetBlob(PRUint32 aIndex, PRUint32 *aDataSize NS_OUTPARAM, PRUint8 **aData NS_OUTPARAM) = 0;
      61                 : 
      62                 :   /* boolean getIsNull (in unsigned long aIndex); */
      63                 :   NS_SCRIPTABLE NS_IMETHOD GetIsNull(PRUint32 aIndex, bool *_retval NS_OUTPARAM) = 0;
      64                 : 
      65                 :   /* [noscript] void getSharedUTF8String (in unsigned long aIndex, out unsigned long aLength, [shared, retval] out string aResult); */
      66                 :   NS_IMETHOD GetSharedUTF8String(PRUint32 aIndex, PRUint32 *aLength NS_OUTPARAM, const char * *aResult NS_OUTPARAM) = 0;
      67                 : 
      68                 :   /* [noscript] void getSharedString (in unsigned long aIndex, out unsigned long aLength, [shared, retval] out wstring aResult); */
      69                 :   NS_IMETHOD GetSharedString(PRUint32 aIndex, PRUint32 *aLength NS_OUTPARAM, const PRUnichar * *aResult NS_OUTPARAM) = 0;
      70                 : 
      71                 :   /* [noscript] void getSharedBlob (in unsigned long aIndex, out unsigned long aLength, [shared, retval] out octetPtr aResult); */
      72                 :   NS_IMETHOD GetSharedBlob(PRUint32 aIndex, PRUint32 *aLength NS_OUTPARAM, const PRUint8 **aResult NS_OUTPARAM) = 0;
      73                 : 
      74                 :    /**
      75                 :    * Getters for native code that return their values as
      76                 :    * the return type, for convenience and sanity.
      77                 :    *
      78                 :    * Not virtual; no vtable bloat.
      79                 :    */
      80           37925 :   inline PRInt32 AsInt32(PRUint32 idx) {
      81           37925 :     PRInt32 v = 0;
      82                 : #ifdef DEBUG
      83                 :     nsresult rv =
      84                 : #endif
      85           37925 :       GetInt32(idx, &v);
      86           37925 :     NS_ABORT_IF_FALSE(NS_SUCCEEDED(rv) || IsNull(idx),
      87                 :                       "Getting value failed, wrong column index?");
      88           37925 :     return v;
      89                 :   }
      90           48158 :   inline PRInt64 AsInt64(PRUint32 idx) {
      91           48158 :     PRInt64 v = 0;
      92                 : #ifdef DEBUG
      93                 :     nsresult rv =
      94                 : #endif
      95           48158 :       GetInt64(idx, &v);
      96           48158 :     NS_ABORT_IF_FALSE(NS_SUCCEEDED(rv) || IsNull(idx),
      97                 :                       "Getting value failed, wrong column index?");
      98           48158 :     return v;
      99                 :   }
     100               1 :   inline double AsDouble(PRUint32 idx) {
     101               1 :     double v = 0.0;
     102                 : #ifdef DEBUG
     103                 :     nsresult rv =
     104                 : #endif
     105               1 :       GetDouble(idx, &v);
     106               1 :     NS_ABORT_IF_FALSE(NS_SUCCEEDED(rv) || IsNull(idx),
     107                 :                       "Getting value failed, wrong column index?");
     108               1 :     return v;
     109                 :   }
     110               2 :   inline const char* AsSharedUTF8String(PRUint32 idx, PRUint32 *len) {
     111               2 :     const char *str = nsnull;
     112               2 :     *len = 0;
     113                 : #ifdef DEBUG
     114                 :     nsresult rv =
     115                 : #endif
     116               2 :       GetSharedUTF8String(idx, len, &str);
     117               2 :     NS_ABORT_IF_FALSE(NS_SUCCEEDED(rv) || IsNull(idx),
     118                 :                       "Getting value failed, wrong column index?");
     119               2 :     return str;
     120                 :   }
     121               1 :   inline const PRUnichar* AsSharedWString(PRUint32 idx, PRUint32 *len) {
     122               1 :     const PRUnichar *str = nsnull;
     123               1 :     *len = 0;
     124                 : #ifdef DEBUG
     125                 :     nsresult rv =
     126                 : #endif
     127               1 :       GetSharedString(idx, len, &str);
     128               1 :     NS_ABORT_IF_FALSE(NS_SUCCEEDED(rv) || IsNull(idx),
     129                 :                       "Getting value failed, wrong column index?");
     130               1 :     return str;
     131                 :   }
     132               1 :   inline const PRUint8* AsSharedBlob(PRUint32 idx, PRUint32 *len) {
     133               1 :     const PRUint8 *blob = nsnull;
     134               1 :     *len = 0;
     135                 : #ifdef DEBUG
     136                 :     nsresult rv =
     137                 : #endif
     138               1 :       GetSharedBlob(idx, len, &blob);
     139               1 :     NS_ABORT_IF_FALSE(NS_SUCCEEDED(rv) || IsNull(idx),
     140                 :                       "Getting value failed, wrong column index?");
     141               1 :     return blob;
     142                 :   }
     143              25 :   inline bool IsNull(PRUint32 idx) {
     144              25 :     bool b = PR_FALSE;
     145                 : #ifdef DEBUG
     146                 :     nsresult rv =
     147                 : #endif
     148              25 :       GetIsNull(idx, &b);
     149              25 :     NS_ABORT_IF_FALSE(NS_SUCCEEDED(rv),
     150                 :                       "Getting value failed, wrong column index?");
     151              25 :     return b;
     152                 :   }
     153                 : };
     154                 : 
     155                 :   NS_DEFINE_STATIC_IID_ACCESSOR(mozIStorageValueArray, MOZISTORAGEVALUEARRAY_IID)
     156                 : 
     157                 : /* Use this macro when declaring classes that implement this interface. */
     158                 : #define NS_DECL_MOZISTORAGEVALUEARRAY \
     159                 :   NS_SCRIPTABLE NS_IMETHOD GetNumEntries(PRUint32 *aNumEntries); \
     160                 :   NS_SCRIPTABLE NS_IMETHOD GetTypeOfIndex(PRUint32 aIndex, PRInt32 *_retval NS_OUTPARAM); \
     161                 :   NS_SCRIPTABLE NS_IMETHOD GetInt32(PRUint32 aIndex, PRInt32 *_retval NS_OUTPARAM); \
     162                 :   NS_SCRIPTABLE NS_IMETHOD GetInt64(PRUint32 aIndex, PRInt64 *_retval NS_OUTPARAM); \
     163                 :   NS_SCRIPTABLE NS_IMETHOD GetDouble(PRUint32 aIndex, double *_retval NS_OUTPARAM); \
     164                 :   NS_SCRIPTABLE NS_IMETHOD GetUTF8String(PRUint32 aIndex, nsACString & _retval NS_OUTPARAM); \
     165                 :   NS_SCRIPTABLE NS_IMETHOD GetString(PRUint32 aIndex, nsAString & _retval NS_OUTPARAM); \
     166                 :   NS_SCRIPTABLE NS_IMETHOD GetBlob(PRUint32 aIndex, PRUint32 *aDataSize NS_OUTPARAM, PRUint8 **aData NS_OUTPARAM); \
     167                 :   NS_SCRIPTABLE NS_IMETHOD GetIsNull(PRUint32 aIndex, bool *_retval NS_OUTPARAM); \
     168                 :   NS_IMETHOD GetSharedUTF8String(PRUint32 aIndex, PRUint32 *aLength NS_OUTPARAM, const char * *aResult NS_OUTPARAM); \
     169                 :   NS_IMETHOD GetSharedString(PRUint32 aIndex, PRUint32 *aLength NS_OUTPARAM, const PRUnichar * *aResult NS_OUTPARAM); \
     170                 :   NS_IMETHOD GetSharedBlob(PRUint32 aIndex, PRUint32 *aLength NS_OUTPARAM, const PRUint8 **aResult NS_OUTPARAM); \
     171                 : 
     172                 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
     173                 : #define NS_FORWARD_MOZISTORAGEVALUEARRAY(_to) \
     174                 :   NS_SCRIPTABLE NS_IMETHOD GetNumEntries(PRUint32 *aNumEntries) { return _to GetNumEntries(aNumEntries); } \
     175                 :   NS_SCRIPTABLE NS_IMETHOD GetTypeOfIndex(PRUint32 aIndex, PRInt32 *_retval NS_OUTPARAM) { return _to GetTypeOfIndex(aIndex, _retval); } \
     176                 :   NS_SCRIPTABLE NS_IMETHOD GetInt32(PRUint32 aIndex, PRInt32 *_retval NS_OUTPARAM) { return _to GetInt32(aIndex, _retval); } \
     177                 :   NS_SCRIPTABLE NS_IMETHOD GetInt64(PRUint32 aIndex, PRInt64 *_retval NS_OUTPARAM) { return _to GetInt64(aIndex, _retval); } \
     178                 :   NS_SCRIPTABLE NS_IMETHOD GetDouble(PRUint32 aIndex, double *_retval NS_OUTPARAM) { return _to GetDouble(aIndex, _retval); } \
     179                 :   NS_SCRIPTABLE NS_IMETHOD GetUTF8String(PRUint32 aIndex, nsACString & _retval NS_OUTPARAM) { return _to GetUTF8String(aIndex, _retval); } \
     180                 :   NS_SCRIPTABLE NS_IMETHOD GetString(PRUint32 aIndex, nsAString & _retval NS_OUTPARAM) { return _to GetString(aIndex, _retval); } \
     181                 :   NS_SCRIPTABLE NS_IMETHOD GetBlob(PRUint32 aIndex, PRUint32 *aDataSize NS_OUTPARAM, PRUint8 **aData NS_OUTPARAM) { return _to GetBlob(aIndex, aDataSize, aData); } \
     182                 :   NS_SCRIPTABLE NS_IMETHOD GetIsNull(PRUint32 aIndex, bool *_retval NS_OUTPARAM) { return _to GetIsNull(aIndex, _retval); } \
     183                 :   NS_IMETHOD GetSharedUTF8String(PRUint32 aIndex, PRUint32 *aLength NS_OUTPARAM, const char * *aResult NS_OUTPARAM) { return _to GetSharedUTF8String(aIndex, aLength, aResult); } \
     184                 :   NS_IMETHOD GetSharedString(PRUint32 aIndex, PRUint32 *aLength NS_OUTPARAM, const PRUnichar * *aResult NS_OUTPARAM) { return _to GetSharedString(aIndex, aLength, aResult); } \
     185                 :   NS_IMETHOD GetSharedBlob(PRUint32 aIndex, PRUint32 *aLength NS_OUTPARAM, const PRUint8 **aResult NS_OUTPARAM) { return _to GetSharedBlob(aIndex, aLength, aResult); } \
     186                 : 
     187                 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
     188                 : #define NS_FORWARD_SAFE_MOZISTORAGEVALUEARRAY(_to) \
     189                 :   NS_SCRIPTABLE NS_IMETHOD GetNumEntries(PRUint32 *aNumEntries) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNumEntries(aNumEntries); } \
     190                 :   NS_SCRIPTABLE NS_IMETHOD GetTypeOfIndex(PRUint32 aIndex, PRInt32 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTypeOfIndex(aIndex, _retval); } \
     191                 :   NS_SCRIPTABLE NS_IMETHOD GetInt32(PRUint32 aIndex, PRInt32 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInt32(aIndex, _retval); } \
     192                 :   NS_SCRIPTABLE NS_IMETHOD GetInt64(PRUint32 aIndex, PRInt64 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInt64(aIndex, _retval); } \
     193                 :   NS_SCRIPTABLE NS_IMETHOD GetDouble(PRUint32 aIndex, double *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDouble(aIndex, _retval); } \
     194                 :   NS_SCRIPTABLE NS_IMETHOD GetUTF8String(PRUint32 aIndex, nsACString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUTF8String(aIndex, _retval); } \
     195                 :   NS_SCRIPTABLE NS_IMETHOD GetString(PRUint32 aIndex, nsAString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetString(aIndex, _retval); } \
     196                 :   NS_SCRIPTABLE NS_IMETHOD GetBlob(PRUint32 aIndex, PRUint32 *aDataSize NS_OUTPARAM, PRUint8 **aData NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBlob(aIndex, aDataSize, aData); } \
     197                 :   NS_SCRIPTABLE NS_IMETHOD GetIsNull(PRUint32 aIndex, bool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsNull(aIndex, _retval); } \
     198                 :   NS_IMETHOD GetSharedUTF8String(PRUint32 aIndex, PRUint32 *aLength NS_OUTPARAM, const char * *aResult NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSharedUTF8String(aIndex, aLength, aResult); } \
     199                 :   NS_IMETHOD GetSharedString(PRUint32 aIndex, PRUint32 *aLength NS_OUTPARAM, const PRUnichar * *aResult NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSharedString(aIndex, aLength, aResult); } \
     200                 :   NS_IMETHOD GetSharedBlob(PRUint32 aIndex, PRUint32 *aLength NS_OUTPARAM, const PRUint8 **aResult NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSharedBlob(aIndex, aLength, aResult); } \
     201                 : 
     202                 : #if 0
     203                 : /* Use the code below as a template for the implementation class for this interface. */
     204                 : 
     205                 : /* Header file */
     206                 : class _MYCLASS_ : public mozIStorageValueArray
     207                 : {
     208                 : public:
     209                 :   NS_DECL_ISUPPORTS
     210                 :   NS_DECL_MOZISTORAGEVALUEARRAY
     211                 : 
     212                 :   _MYCLASS_();
     213                 : 
     214                 : private:
     215                 :   ~_MYCLASS_();
     216                 : 
     217                 : protected:
     218                 :   /* additional members */
     219                 : };
     220                 : 
     221                 : /* Implementation file */
     222                 : NS_IMPL_ISUPPORTS1(_MYCLASS_, mozIStorageValueArray)
     223                 : 
     224                 : _MYCLASS_::_MYCLASS_()
     225                 : {
     226                 :   /* member initializers and constructor code */
     227                 : }
     228                 : 
     229                 : _MYCLASS_::~_MYCLASS_()
     230                 : {
     231                 :   /* destructor code */
     232                 : }
     233                 : 
     234                 : /* readonly attribute unsigned long numEntries; */
     235                 : NS_IMETHODIMP _MYCLASS_::GetNumEntries(PRUint32 *aNumEntries)
     236                 : {
     237                 :     return NS_ERROR_NOT_IMPLEMENTED;
     238                 : }
     239                 : 
     240                 : /* long getTypeOfIndex (in unsigned long aIndex); */
     241                 : NS_IMETHODIMP _MYCLASS_::GetTypeOfIndex(PRUint32 aIndex, PRInt32 *_retval NS_OUTPARAM)
     242                 : {
     243                 :     return NS_ERROR_NOT_IMPLEMENTED;
     244                 : }
     245                 : 
     246                 : /* long getInt32 (in unsigned long aIndex); */
     247                 : NS_IMETHODIMP _MYCLASS_::GetInt32(PRUint32 aIndex, PRInt32 *_retval NS_OUTPARAM)
     248                 : {
     249                 :     return NS_ERROR_NOT_IMPLEMENTED;
     250                 : }
     251                 : 
     252                 : /* long long getInt64 (in unsigned long aIndex); */
     253                 : NS_IMETHODIMP _MYCLASS_::GetInt64(PRUint32 aIndex, PRInt64 *_retval NS_OUTPARAM)
     254                 : {
     255                 :     return NS_ERROR_NOT_IMPLEMENTED;
     256                 : }
     257                 : 
     258                 : /* double getDouble (in unsigned long aIndex); */
     259                 : NS_IMETHODIMP _MYCLASS_::GetDouble(PRUint32 aIndex, double *_retval NS_OUTPARAM)
     260                 : {
     261                 :     return NS_ERROR_NOT_IMPLEMENTED;
     262                 : }
     263                 : 
     264                 : /* AUTF8String getUTF8String (in unsigned long aIndex); */
     265                 : NS_IMETHODIMP _MYCLASS_::GetUTF8String(PRUint32 aIndex, nsACString & _retval NS_OUTPARAM)
     266                 : {
     267                 :     return NS_ERROR_NOT_IMPLEMENTED;
     268                 : }
     269                 : 
     270                 : /* AString getString (in unsigned long aIndex); */
     271                 : NS_IMETHODIMP _MYCLASS_::GetString(PRUint32 aIndex, nsAString & _retval NS_OUTPARAM)
     272                 : {
     273                 :     return NS_ERROR_NOT_IMPLEMENTED;
     274                 : }
     275                 : 
     276                 : /* void getBlob (in unsigned long aIndex, out unsigned long aDataSize, [array, size_is (aDataSize)] out octet aData); */
     277                 : NS_IMETHODIMP _MYCLASS_::GetBlob(PRUint32 aIndex, PRUint32 *aDataSize NS_OUTPARAM, PRUint8 **aData NS_OUTPARAM)
     278                 : {
     279                 :     return NS_ERROR_NOT_IMPLEMENTED;
     280                 : }
     281                 : 
     282                 : /* boolean getIsNull (in unsigned long aIndex); */
     283                 : NS_IMETHODIMP _MYCLASS_::GetIsNull(PRUint32 aIndex, bool *_retval NS_OUTPARAM)
     284                 : {
     285                 :     return NS_ERROR_NOT_IMPLEMENTED;
     286                 : }
     287                 : 
     288                 : /* [noscript] void getSharedUTF8String (in unsigned long aIndex, out unsigned long aLength, [shared, retval] out string aResult); */
     289                 : NS_IMETHODIMP _MYCLASS_::GetSharedUTF8String(PRUint32 aIndex, PRUint32 *aLength NS_OUTPARAM, const char * *aResult NS_OUTPARAM)
     290                 : {
     291                 :     return NS_ERROR_NOT_IMPLEMENTED;
     292                 : }
     293                 : 
     294                 : /* [noscript] void getSharedString (in unsigned long aIndex, out unsigned long aLength, [shared, retval] out wstring aResult); */
     295                 : NS_IMETHODIMP _MYCLASS_::GetSharedString(PRUint32 aIndex, PRUint32 *aLength NS_OUTPARAM, const PRUnichar * *aResult NS_OUTPARAM)
     296                 : {
     297                 :     return NS_ERROR_NOT_IMPLEMENTED;
     298                 : }
     299                 : 
     300                 : /* [noscript] void getSharedBlob (in unsigned long aIndex, out unsigned long aLength, [shared, retval] out octetPtr aResult); */
     301                 : NS_IMETHODIMP _MYCLASS_::GetSharedBlob(PRUint32 aIndex, PRUint32 *aLength NS_OUTPARAM, const PRUint8 **aResult NS_OUTPARAM)
     302                 : {
     303                 :     return NS_ERROR_NOT_IMPLEMENTED;
     304                 : }
     305                 : 
     306                 : /* End of implementation class template. */
     307                 : #endif
     308                 : 
     309                 : 
     310                 : #endif /* __gen_mozIStorageValueArray_h__ */

Generated by: LCOV version 1.7