Repair Doxygen build infrastructure
[vpp.git] / vpp-api / java / jvpp-core / io / fd / vpp / jvpp / core / test / NotificationUtils.java
1 /*
2  * Copyright (c) 2016 Cisco and/or its affiliates.
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 package io.fd.vpp.jvpp.core.test;
18
19 import java.io.PrintStream;
20 import io.fd.vpp.jvpp.core.dto.SwInterfaceSetFlags;
21 import io.fd.vpp.jvpp.core.dto.SwInterfaceSetFlagsNotification;
22 import io.fd.vpp.jvpp.core.dto.WantInterfaceEvents;
23
24 final class NotificationUtils {
25
26     private NotificationUtils() {}
27
28     static PrintStream printNotification(final SwInterfaceSetFlagsNotification msg) {
29         return System.out.printf("Received interface notification: ifc: %s%n", msg);
30     }
31
32     static SwInterfaceSetFlags getChangeInterfaceState() {
33         final SwInterfaceSetFlags swInterfaceSetFlags = new SwInterfaceSetFlags();
34         swInterfaceSetFlags.swIfIndex = 0;
35         swInterfaceSetFlags.adminUpDown = 1;
36         swInterfaceSetFlags.deleted = 0;
37         return swInterfaceSetFlags;
38     }
39
40     static WantInterfaceEvents getEnableInterfaceNotificationsReq() {
41         WantInterfaceEvents wantInterfaceEvents = new WantInterfaceEvents();
42         wantInterfaceEvents.pid = 1;
43         wantInterfaceEvents.enableDisable = 1;
44         return wantInterfaceEvents;
45     }
46
47     static WantInterfaceEvents getDisableInterfaceNotificationsReq() {
48         WantInterfaceEvents wantInterfaceEvents = new WantInterfaceEvents();
49         wantInterfaceEvents.pid = 1;
50         wantInterfaceEvents.enableDisable = 0;
51         return wantInterfaceEvents;
52     }
53 }