Zang MingJie | 117aae3 | 2021-10-27 10:02:06 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2021 Project CHIP Authors |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | #pragma once |
| 17 | |
| 18 | #include <messaging/tests/MessagingContext.h> |
Zang MingJie | 117aae3 | 2021-10-27 10:02:06 +0800 | [diff] [blame] | 19 | |
Zang MingJie | 117aae3 | 2021-10-27 10:02:06 +0800 | [diff] [blame] | 20 | namespace chip { |
| 21 | namespace Test { |
| 22 | |
| 23 | /** |
| 24 | * @brief The context of test cases for messaging layer. It wil initialize network layer and system layer, and create |
| 25 | * two secure sessions, connected with each other. Exchanges can be created for each secure session. |
| 26 | */ |
Zang MingJie | 4aa0d5f | 2022-04-22 21:22:42 +0800 | [diff] [blame] | 27 | class AppContext : public LoopbackMessagingContext |
Zang MingJie | 117aae3 | 2021-10-27 10:02:06 +0800 | [diff] [blame] | 28 | { |
Zang MingJie | 4aa0d5f | 2022-04-22 21:22:42 +0800 | [diff] [blame] | 29 | typedef LoopbackMessagingContext Super; |
Boris Zbarsky | af77cc9 | 2021-12-02 16:31:09 -0500 | [diff] [blame] | 30 | |
Zang MingJie | 117aae3 | 2021-10-27 10:02:06 +0800 | [diff] [blame] | 31 | public: |
Boris Zbarsky | af77cc9 | 2021-12-02 16:31:09 -0500 | [diff] [blame] | 32 | /// Initialize the underlying layers. |
| 33 | CHIP_ERROR Init() override; |
Zang MingJie | 117aae3 | 2021-10-27 10:02:06 +0800 | [diff] [blame] | 34 | |
| 35 | // Shutdown all layers, finalize operations |
Boris Zbarsky | af77cc9 | 2021-12-02 16:31:09 -0500 | [diff] [blame] | 36 | CHIP_ERROR Shutdown() override; |
Zang MingJie | 117aae3 | 2021-10-27 10:02:06 +0800 | [diff] [blame] | 37 | }; |
| 38 | |
| 39 | } // namespace Test |
| 40 | } // namespace chip |