LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/ipc/ipdl - PDNSRequestParams.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 103 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 19 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //
       2             : // Automatically generated by ipdlc.
       3             : // Edit at your own risk
       4             : //
       5             : 
       6             : 
       7             : #include "mozilla/net/PDNSRequestParams.h"
       8             : 
       9             : 
      10             : //-----------------------------------------------------------------------------
      11             : // Method definitions for the IPDL type |struct DNSRecord|
      12             : //
      13             : namespace mozilla {
      14             : namespace net {
      15           0 : MOZ_IMPLICIT DNSRecord::DNSRecord() :
      16             :     canonicalName_(),
      17           0 :     addrs_()
      18             : {
      19           0 :     Init();
      20           0 : }
      21             : 
      22           0 : DNSRecord::~DNSRecord()
      23             : {
      24           0 : }
      25             : 
      26           0 : auto DNSRecord::operator==(const DNSRecord& _o) const -> bool
      27             : {
      28           0 :     if ((!((canonicalName()) == ((_o).canonicalName())))) {
      29           0 :         return false;
      30             :     }
      31           0 :     if ((!((addrs()) == ((_o).addrs())))) {
      32           0 :         return false;
      33             :     }
      34           0 :     return true;
      35             : }
      36             : 
      37           0 : auto DNSRecord::operator!=(const DNSRecord& _o) const -> bool
      38             : {
      39           0 :     return (!(operator==(_o)));
      40             : }
      41             : 
      42           0 : auto DNSRecord::Init() -> void
      43             : {
      44           0 : }
      45             : 
      46           0 : auto DNSRecord::Assign(
      47             :         const nsCString& _canonicalName,
      48             :         const NetAddrArray& _addrs) -> void
      49             : {
      50           0 :     canonicalName_ = _canonicalName;
      51           0 :     addrs_ = _addrs;
      52           0 : }
      53             : 
      54             : } // namespace net
      55             : } // namespace mozilla
      56             : 
      57             : //-----------------------------------------------------------------------------
      58             : // Method definitions for the IPDL type |union DNSRequestResponse|
      59             : //
      60             : namespace mozilla {
      61             : namespace net {
      62           0 : auto DNSRequestResponse::MaybeDestroy(Type aNewType) -> bool
      63             : {
      64           0 :     if ((mType) == (T__None)) {
      65           0 :         return true;
      66             :     }
      67           0 :     if ((mType) == (aNewType)) {
      68           0 :         return false;
      69             :     }
      70           0 :     switch (mType) {
      71             :     case TDNSRecord:
      72             :         {
      73           0 :             (ptr_DNSRecord())->~DNSRecord__tdef();
      74           0 :             break;
      75             :         }
      76             :     case Tnsresult:
      77             :         {
      78           0 :             (ptr_nsresult())->~nsresult__tdef();
      79           0 :             break;
      80             :         }
      81             :     default:
      82             :         {
      83           0 :             mozilla::ipc::LogicError("not reached");
      84           0 :             break;
      85             :         }
      86             :     }
      87           0 :     return true;
      88             : }
      89             : 
      90           0 : MOZ_IMPLICIT DNSRequestResponse::DNSRequestResponse(const DNSRecord& aOther)
      91             : {
      92           0 :     new (mozilla::KnownNotNull, ptr_DNSRecord()) DNSRecord(aOther);
      93           0 :     mType = TDNSRecord;
      94           0 : }
      95             : 
      96           0 : MOZ_IMPLICIT DNSRequestResponse::DNSRequestResponse(const nsresult& aOther)
      97             : {
      98           0 :     new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(aOther);
      99           0 :     mType = Tnsresult;
     100           0 : }
     101             : 
     102           0 : MOZ_IMPLICIT DNSRequestResponse::DNSRequestResponse(const DNSRequestResponse& aOther)
     103             : {
     104           0 :     (aOther).AssertSanity();
     105           0 :     switch ((aOther).type()) {
     106             :     case TDNSRecord:
     107             :         {
     108           0 :             new (mozilla::KnownNotNull, ptr_DNSRecord()) DNSRecord((aOther).get_DNSRecord());
     109           0 :             break;
     110             :         }
     111             :     case Tnsresult:
     112             :         {
     113           0 :             new (mozilla::KnownNotNull, ptr_nsresult()) nsresult((aOther).get_nsresult());
     114           0 :             break;
     115             :         }
     116             :     case T__None:
     117             :         {
     118           0 :             break;
     119             :         }
     120             :     default:
     121             :         {
     122           0 :             mozilla::ipc::LogicError("unreached");
     123           0 :             return;
     124             :         }
     125             :     }
     126           0 :     mType = (aOther).type();
     127             : }
     128             : 
     129           0 : DNSRequestResponse::~DNSRequestResponse()
     130             : {
     131           0 :     static_cast<void>(MaybeDestroy(T__None));
     132           0 : }
     133             : 
     134           0 : auto DNSRequestResponse::operator=(const DNSRecord& aRhs) -> DNSRequestResponse&
     135             : {
     136           0 :     if (MaybeDestroy(TDNSRecord)) {
     137           0 :         new (mozilla::KnownNotNull, ptr_DNSRecord()) DNSRecord;
     138             :     }
     139           0 :     (*(ptr_DNSRecord())) = aRhs;
     140           0 :     mType = TDNSRecord;
     141           0 :     return (*(this));
     142             : }
     143             : 
     144           0 : auto DNSRequestResponse::operator=(const nsresult& aRhs) -> DNSRequestResponse&
     145             : {
     146           0 :     if (MaybeDestroy(Tnsresult)) {
     147           0 :         new (mozilla::KnownNotNull, ptr_nsresult()) nsresult;
     148             :     }
     149           0 :     (*(ptr_nsresult())) = aRhs;
     150           0 :     mType = Tnsresult;
     151           0 :     return (*(this));
     152             : }
     153             : 
     154           0 : auto DNSRequestResponse::operator=(const DNSRequestResponse& aRhs) -> DNSRequestResponse&
     155             : {
     156           0 :     (aRhs).AssertSanity();
     157           0 :     Type t = (aRhs).type();
     158           0 :     switch (t) {
     159             :     case TDNSRecord:
     160             :         {
     161           0 :             if (MaybeDestroy(t)) {
     162           0 :                 new (mozilla::KnownNotNull, ptr_DNSRecord()) DNSRecord;
     163             :             }
     164           0 :             (*(ptr_DNSRecord())) = (aRhs).get_DNSRecord();
     165           0 :             break;
     166             :         }
     167             :     case Tnsresult:
     168             :         {
     169           0 :             if (MaybeDestroy(t)) {
     170           0 :                 new (mozilla::KnownNotNull, ptr_nsresult()) nsresult;
     171             :             }
     172           0 :             (*(ptr_nsresult())) = (aRhs).get_nsresult();
     173           0 :             break;
     174             :         }
     175             :     case T__None:
     176             :         {
     177           0 :             static_cast<void>(MaybeDestroy(t));
     178           0 :             break;
     179             :         }
     180             :     default:
     181             :         {
     182           0 :             mozilla::ipc::LogicError("unreached");
     183           0 :             break;
     184             :         }
     185             :     }
     186           0 :     mType = t;
     187           0 :     return (*(this));
     188             : }
     189             : 
     190           0 : auto DNSRequestResponse::operator==(const DNSRecord& aRhs) const -> bool
     191             : {
     192           0 :     return (get_DNSRecord()) == (aRhs);
     193             : }
     194             : 
     195           0 : auto DNSRequestResponse::operator==(const nsresult& aRhs) const -> bool
     196             : {
     197           0 :     return (get_nsresult()) == (aRhs);
     198             : }
     199             : 
     200           0 : auto DNSRequestResponse::operator==(const DNSRequestResponse& aRhs) const -> bool
     201             : {
     202           0 :     if ((type()) != ((aRhs).type())) {
     203           0 :         return false;
     204             :     }
     205             : 
     206           0 :     switch (type()) {
     207             :     case TDNSRecord:
     208             :         {
     209           0 :             return (get_DNSRecord()) == ((aRhs).get_DNSRecord());
     210             :         }
     211             :     case Tnsresult:
     212             :         {
     213           0 :             return (get_nsresult()) == ((aRhs).get_nsresult());
     214             :         }
     215             :     default:
     216             :         {
     217           0 :             mozilla::ipc::LogicError("unreached");
     218           0 :             return false;
     219             :         }
     220             :     }
     221             : }
     222             : 
     223           0 : auto DNSRequestResponse::get(DNSRecord* aOutValue) const -> void
     224             : {
     225           0 :     (*(aOutValue)) = get_DNSRecord();
     226           0 : }
     227             : 
     228           0 : auto DNSRequestResponse::get(nsresult* aOutValue) const -> void
     229             : {
     230           0 :     (*(aOutValue)) = get_nsresult();
     231           0 : }
     232             : 
     233             : } // namespace net
     234             : } // namespace mozilla

Generated by: LCOV version 1.13