1 /*
2  * Copyright (C) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef MESSAGE_H
17 #define MESSAGE_H
18 
19 namespace utility {
20 struct Message {
21 public:
22     /**
23      * @brief Construct a new Message object.
24      *
25      * @param what Message Identifier.
26      * @param arg1 Message first arg.
27      * @param arg2 Message second arg.
28      * @since 6
29      */
30     Message(int what, int arg1 = 0, void *arg2 = nullptr) : what_(what), arg1_(arg1), arg2_(arg2){};
31 
32     /**
33      * @brief Construct a new Message object.
34      *
35      * @since 6
36      */
37     Message() = default;
38 
39     /**
40      * @brief Destroy the Message object.
41      *
42      * @since 6
43      */
44     ~Message() = default;
45 
46     int what_ = 0;
47     int arg1_ = 0;
48     void *arg2_ = nullptr;
49 };
50 }  // namespace utility
51 
52 #endif  // MESSAGE_H