Matter SDK Coverage Report
Current view: top level - app/server - TermsAndConditionsManager.cpp (source / functions) Coverage Total Hit
Test: SHA:f84fe08d06f240e801b5d923f8a938a9938ca110 Lines: 0.0 % 22 0
Test Date: 2025-02-22 08:08:07 Functions: 0.0 % 10 0

            Line data    Source code
       1              : /*
       2              :  *
       3              :  *    Copyright (c) 2024 Project CHIP Authors
       4              :  *    All rights reserved.
       5              :  *
       6              :  *    Licensed under the Apache License, Version 2.0 (the "License");
       7              :  *    you may not use this file except in compliance with the License.
       8              :  *    You may obtain a copy of the License at
       9              :  *
      10              :  *        http://www.apache.org/licenses/LICENSE-2.0
      11              :  *
      12              :  *    Unless required by applicable law or agreed to in writing, software
      13              :  *    distributed under the License is distributed on an "AS IS" BASIS,
      14              :  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      15              :  *    See the License for the specific language governing permissions and
      16              :  *    limitations under the License.
      17              :  */
      18              : 
      19              : #include "TermsAndConditionsManager.h"
      20              : 
      21              : #include "DefaultTermsAndConditionsProvider.h"
      22              : 
      23              : static chip::app::TermsAndConditionsManager sTermsAndConditionsManager;
      24              : static chip::app::DefaultTermsAndConditionsProvider sTermsAndConditionsProviderInstance;
      25              : static chip::app::DefaultTermsAndConditionsStorageDelegate sTermsAndConditionsStorageDelegateInstance;
      26              : 
      27            0 : chip::app::TermsAndConditionsManager * chip::app::TermsAndConditionsManager::GetInstance()
      28              : {
      29            0 :     return &sTermsAndConditionsManager;
      30              : }
      31              : 
      32            0 : CHIP_ERROR chip::app::TermsAndConditionsManager::Init(chip::PersistentStorageDelegate * inPersistentStorageDelegate,
      33              :                                                       const Optional<TermsAndConditions> & inRequiredTermsAndConditions)
      34              : {
      35            0 :     ReturnErrorOnFailure(sTermsAndConditionsStorageDelegateInstance.Init(inPersistentStorageDelegate));
      36            0 :     ReturnErrorOnFailure(
      37              :         sTermsAndConditionsProviderInstance.Init(&sTermsAndConditionsStorageDelegateInstance, inRequiredTermsAndConditions));
      38              : 
      39            0 :     return CHIP_NO_ERROR;
      40              : }
      41              : 
      42            0 : CHIP_ERROR chip::app::TermsAndConditionsManager::CommitAcceptance()
      43              : {
      44            0 :     return sTermsAndConditionsProviderInstance.CommitAcceptance();
      45              : }
      46              : 
      47            0 : CHIP_ERROR chip::app::TermsAndConditionsManager::GetAcceptance(Optional<TermsAndConditions> & outTermsAndConditions) const
      48              : {
      49            0 :     return sTermsAndConditionsProviderInstance.GetAcceptance(outTermsAndConditions);
      50              : }
      51              : 
      52            0 : CHIP_ERROR chip::app::TermsAndConditionsManager::GetAcknowledgementsRequired(bool & outAcknowledgementsRequired) const
      53              : {
      54            0 :     return sTermsAndConditionsProviderInstance.GetAcknowledgementsRequired(outAcknowledgementsRequired);
      55              : }
      56              : 
      57            0 : CHIP_ERROR chip::app::TermsAndConditionsManager::GetRequirements(Optional<TermsAndConditions> & outTermsAndConditions) const
      58              : {
      59            0 :     return sTermsAndConditionsProviderInstance.GetRequirements(outTermsAndConditions);
      60              : }
      61              : 
      62            0 : CHIP_ERROR chip::app::TermsAndConditionsManager::GetUpdateAcceptanceDeadline(Optional<uint32_t> & outUpdateAcceptanceDeadline) const
      63              : {
      64            0 :     return sTermsAndConditionsProviderInstance.GetUpdateAcceptanceDeadline(outUpdateAcceptanceDeadline);
      65              : }
      66              : 
      67            0 : CHIP_ERROR chip::app::TermsAndConditionsManager::ResetAcceptance()
      68              : {
      69            0 :     return sTermsAndConditionsProviderInstance.ResetAcceptance();
      70              : }
      71              : 
      72            0 : CHIP_ERROR chip::app::TermsAndConditionsManager::RevertAcceptance()
      73              : {
      74            0 :     return sTermsAndConditionsProviderInstance.RevertAcceptance();
      75              : }
      76              : 
      77            0 : CHIP_ERROR chip::app::TermsAndConditionsManager::SetAcceptance(const Optional<TermsAndConditions> & inTermsAndConditions)
      78              : {
      79            0 :     return sTermsAndConditionsProviderInstance.SetAcceptance(inTermsAndConditions);
      80              : }
        

Generated by: LCOV version 2.0-1