LCOV - code coverage report
Current view: directory - objdir/ipc/ipdl - PHal.cpp (source / functions) Found Hit Coverage
Test: app.info Lines: 116 14 12.1 %
Date: 2012-06-02 Functions: 26 6 23.1 %

       1                 : //
       2                 : // Automatically generated by ipdlc.
       3                 : // Edit at your own risk
       4                 : //
       5                 : 
       6                 : 
       7                 : #include "mozilla/hal_sandbox/PHal.h"
       8                 : 
       9                 : namespace mozilla {
      10                 : namespace hal_sandbox {
      11                 : namespace PHal {
      12                 : 
      13                 : bool
      14               0 : Transition(
      15                 :         State from,
      16                 :         mozilla::ipc::Trigger trigger,
      17                 :         State* next)
      18                 : {
      19               0 :     switch (from) {
      20                 :     case __Null:
      21                 :     case __Error:
      22               0 :         if ((Msg___delete____ID) == ((trigger).mMsg)) {
      23               0 :             (*(next)) = __Dead;
      24               0 :             return true;
      25                 :         }
      26               0 :         return (__Null) == (from);
      27                 :     case __Dead:
      28               0 :         NS_RUNTIMEABORT("__delete__()d actor");
      29               0 :         return false;
      30                 :     default:
      31               0 :         NS_RUNTIMEABORT("corrupted actor state");
      32               0 :         return false;
      33                 :     }
      34                 :     (*(next)) = __Error;
      35                 :     return false;
      36                 : }
      37                 : 
      38                 : } // namespace PHal
      39                 : } // namespace hal_sandbox
      40                 : } // namespace mozilla
      41                 : 
      42                 : //-----------------------------------------------------------------------------
      43                 : // Method definitions for the IPDL type |struct BatteryInformation|
      44                 : //
      45                 : namespace mozilla {
      46                 : namespace hal {
      47            1464 : BatteryInformation::BatteryInformation()
      48                 : {
      49            1464 :     Init();
      50            1464 : }
      51                 : 
      52            1487 : BatteryInformation::~BatteryInformation()
      53                 : {
      54            1487 : }
      55                 : 
      56                 : bool
      57               0 : BatteryInformation::operator==(const BatteryInformation& _o) const
      58                 : {
      59               0 :     if ((!((level()) == ((_o).level())))) {
      60               0 :         return false;
      61                 :     }
      62               0 :     if ((!((charging()) == ((_o).charging())))) {
      63               0 :         return false;
      64                 :     }
      65               0 :     if ((!((remainingTime()) == ((_o).remainingTime())))) {
      66               0 :         return false;
      67                 :     }
      68               0 :     return true;
      69                 : }
      70                 : 
      71                 : void
      72            1464 : BatteryInformation::Init()
      73                 : {
      74            1464 : }
      75                 : 
      76                 : void
      77               0 : BatteryInformation::Assign(
      78                 :         const double& _level,
      79                 :         const bool& _charging,
      80                 :         const double& _remainingTime)
      81                 : {
      82               0 :     level_ = _level;
      83               0 :     charging_ = _charging;
      84               0 :     remainingTime_ = _remainingTime;
      85               0 : }
      86                 : 
      87                 : } // namespace hal
      88                 : } // namespace mozilla
      89                 : 
      90                 : //-----------------------------------------------------------------------------
      91                 : // Method definitions for the IPDL type |struct LightConfiguration|
      92                 : //
      93                 : namespace mozilla {
      94                 : namespace hal {
      95               0 : LightConfiguration::LightConfiguration()
      96                 : {
      97               0 :     Init();
      98               0 : }
      99                 : 
     100               0 : LightConfiguration::~LightConfiguration()
     101                 : {
     102               0 : }
     103                 : 
     104                 : bool
     105               0 : LightConfiguration::operator==(const LightConfiguration& _o) const
     106                 : {
     107               0 :     if ((!((light()) == ((_o).light())))) {
     108               0 :         return false;
     109                 :     }
     110               0 :     if ((!((mode()) == ((_o).mode())))) {
     111               0 :         return false;
     112                 :     }
     113               0 :     if ((!((flash()) == ((_o).flash())))) {
     114               0 :         return false;
     115                 :     }
     116               0 :     if ((!((flashOnMS()) == ((_o).flashOnMS())))) {
     117               0 :         return false;
     118                 :     }
     119               0 :     if ((!((flashOffMS()) == ((_o).flashOffMS())))) {
     120               0 :         return false;
     121                 :     }
     122               0 :     if ((!((color()) == ((_o).color())))) {
     123               0 :         return false;
     124                 :     }
     125               0 :     return true;
     126                 : }
     127                 : 
     128                 : void
     129               0 : LightConfiguration::Init()
     130                 : {
     131               0 : }
     132                 : 
     133                 : void
     134               0 : LightConfiguration::Assign(
     135                 :         const LightType& _light,
     136                 :         const LightMode& _mode,
     137                 :         const FlashMode& _flash,
     138                 :         const uint32_t& _flashOnMS,
     139                 :         const uint32_t& _flashOffMS,
     140                 :         const uint32_t& _color)
     141                 : {
     142               0 :     light_ = _light;
     143               0 :     mode_ = _mode;
     144               0 :     flash_ = _flash;
     145               0 :     flashOnMS_ = _flashOnMS;
     146               0 :     flashOffMS_ = _flashOffMS;
     147               0 :     color_ = _color;
     148               0 : }
     149                 : 
     150                 : } // namespace hal
     151                 : } // namespace mozilla
     152                 : 
     153                 : //-----------------------------------------------------------------------------
     154                 : // Method definitions for the IPDL type |struct SensorData|
     155                 : //
     156                 : namespace mozilla {
     157                 : namespace hal {
     158               0 : SensorData::SensorData()
     159                 : {
     160               0 :     Init();
     161               0 : }
     162                 : 
     163               0 : SensorData::~SensorData()
     164                 : {
     165               0 : }
     166                 : 
     167                 : bool
     168               0 : SensorData::operator==(const SensorData& _o) const
     169                 : {
     170               0 :     if ((!((sensor()) == ((_o).sensor())))) {
     171               0 :         return false;
     172                 :     }
     173               0 :     if ((!((timestamp()) == ((_o).timestamp())))) {
     174               0 :         return false;
     175                 :     }
     176               0 :     if ((!((values()) == ((_o).values())))) {
     177               0 :         return false;
     178                 :     }
     179               0 :     return true;
     180                 : }
     181                 : 
     182                 : void
     183               0 : SensorData::Init()
     184                 : {
     185               0 : }
     186                 : 
     187                 : void
     188               0 : SensorData::Assign(
     189                 :         const SensorType& _sensor,
     190                 :         const PRTime& _timestamp,
     191                 :         const InfallibleTArray<float>& _values)
     192                 : {
     193               0 :     sensor_ = _sensor;
     194               0 :     timestamp_ = _timestamp;
     195               0 :     values_ = _values;
     196               0 : }
     197                 : 
     198                 : } // namespace hal
     199                 : } // namespace mozilla
     200                 : 
     201                 : //-----------------------------------------------------------------------------
     202                 : // Method definitions for the IPDL type |struct NetworkInformation|
     203                 : //
     204                 : namespace mozilla {
     205                 : namespace hal {
     206            1464 : NetworkInformation::NetworkInformation()
     207                 : {
     208            1464 :     Init();
     209            1464 : }
     210                 : 
     211            1487 : NetworkInformation::~NetworkInformation()
     212                 : {
     213            1487 : }
     214                 : 
     215                 : bool
     216               0 : NetworkInformation::operator==(const NetworkInformation& _o) const
     217                 : {
     218               0 :     if ((!((bandwidth()) == ((_o).bandwidth())))) {
     219               0 :         return false;
     220                 :     }
     221               0 :     if ((!((canBeMetered()) == ((_o).canBeMetered())))) {
     222               0 :         return false;
     223                 :     }
     224               0 :     return true;
     225                 : }
     226                 : 
     227                 : void
     228            1464 : NetworkInformation::Init()
     229                 : {
     230            1464 : }
     231                 : 
     232                 : void
     233               0 : NetworkInformation::Assign(
     234                 :         const double& _bandwidth,
     235                 :         const bool& _canBeMetered)
     236                 : {
     237               0 :     bandwidth_ = _bandwidth;
     238               0 :     canBeMetered_ = _canBeMetered;
     239               0 : }
     240                 : 
     241                 : } // namespace hal
     242                 : } // namespace mozilla
     243                 : 
     244                 : //-----------------------------------------------------------------------------
     245                 : // Method definitions for the IPDL type |struct WakeLockInformation|
     246                 : //
     247                 : namespace mozilla {
     248                 : namespace hal {
     249               0 : WakeLockInformation::WakeLockInformation()
     250                 : {
     251               0 :     Init();
     252               0 : }
     253                 : 
     254               0 : WakeLockInformation::~WakeLockInformation()
     255                 : {
     256               0 : }
     257                 : 
     258                 : bool
     259               0 : WakeLockInformation::operator==(const WakeLockInformation& _o) const
     260                 : {
     261               0 :     if ((!((numLocks()) == ((_o).numLocks())))) {
     262               0 :         return false;
     263                 :     }
     264               0 :     if ((!((numHidden()) == ((_o).numHidden())))) {
     265               0 :         return false;
     266                 :     }
     267               0 :     if ((!((topic()) == ((_o).topic())))) {
     268               0 :         return false;
     269                 :     }
     270               0 :     return true;
     271                 : }
     272                 : 
     273                 : void
     274               0 : WakeLockInformation::Init()
     275                 : {
     276               0 : }
     277                 : 
     278                 : void
     279               0 : WakeLockInformation::Assign(
     280                 :         const uint32_t& _numLocks,
     281                 :         const uint32_t& _numHidden,
     282                 :         const nsString& _topic)
     283                 : {
     284               0 :     numLocks_ = _numLocks;
     285               0 :     numHidden_ = _numHidden;
     286               0 :     topic_ = _topic;
     287               0 : }
     288                 : 
     289                 : } // namespace hal
     290                 : } // namespace mozilla

Generated by: LCOV version 1.7