Fix logical dead code issue
[platform/core/connectivity/wifi-direct-manager.git] / unittest / event_injector.h
1 /*
2  * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
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
17 #ifndef __EVENT_INJECTOR_H__
18 #define __EVENT_INJECTOR_H__
19
20 class EventInjector {
21 private:
22         static const int mac_addr_len;
23         static const char *local_mac_str;
24         static const char *peer_device_addr_str;
25         static const char *peer_iface_addr_str;
26         static const char *legacy_peer_iface_addr_str;
27         static const char *peer_go_addr_str;
28         static const char *peer_device_name;
29         static const int peer_config_methods;
30         static const int peer_dev_flag;
31         static const int peer_group_flag;
32         static const int peer_dev_role;
33         static const unsigned char peer_pri_dev_type;
34         static const unsigned char peer_sec_dev_type;
35         static const char *pin_str;
36         static const unsigned char ip_addr[4];
37         static const unsigned char ip_addr_mask[4];
38         static const unsigned char ip_addr_go[4];
39         static const int group_freq;
40         static const char *group_pass;
41
42         void *event_data;
43         int txt_to_mac(const char *txt, unsigned char *mac);
44         void InitData();
45 public:
46         EventInjector();
47         ~EventInjector();
48         void *GetData();
49         void *Deactivated();
50         void *PeerFound();
51         void *GoFound();
52         void *PeerJoined();
53         void *PeerJoinedwithIP();
54         void *PeerDisconnected();
55         void *LegacyPeerJoined();
56         void *LegacyPeerDisconnected();
57         void *DeviceLost();
58         void *FindStopped();
59         void *ProvReqDisplayPin(bool from_go);
60         void *ProvRespDisplayPin(bool from_go);
61         void *ProvReqEnterPin(bool from_go);
62         void *ProvRespEnterPin(bool from_go);
63         void *ProvPbcReq(bool from_go);
64         void *ProvPbcResp(bool from_go);
65         void *ProvFailure();
66         void *GroupStartedGO();
67         void *GroupStartedGOPersistent();
68         void *GroupStartedGC();
69         void *GroupStartedGCPersistent();
70         void *GroupStartedGCwithoutIP();
71         void *GoNegSuccessGo();
72         void *GoNegSuccessGc();
73         void *GoNegFailure();
74         void *GoNegRequestPbc();
75         void *GoNegRequestDisplay();
76         void *GoNegRequestKeypad();
77         void *InvitationReceived();
78         void *GroupFinished();
79         void *KeyNegFailed();
80         void *WpsFailed();
81         void *GroupFormationFailed();
82         void *InvitationAccepted();
83         void *ServDiscResp();
84         void *AspPeerFound();
85         void *AspServiceFound();
86         void *AspProvStart(int wps_mode, int network_role);
87         void *AspProvDone(int status, int wps_mode, int network_role, int persist, int persist_id);
88         void *AspProvFail(int status);
89 };
90
91 #endif