2 * Copyright (C) 2016 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 import android.app.PendingIntent;
20 import android.net.ConnectivityMetricsEvent;
23 interface IConnectivityMetricsLogger {
26 * @return 0 on success
27 * <0 if error happened
28 * >0 timestamp after which new events will be accepted
30 long logEvent(in ConnectivityMetricsEvent event);
31 long logEvents(in ConnectivityMetricsEvent[] events);
34 * @param reference of the last event previously returned. The function will return
35 * events following it.
36 * If 0 then all events will be returned.
37 * After the function call it will contain reference of the last event.
39 ConnectivityMetricsEvent[] getEvents(inout ConnectivityMetricsEvent.Reference reference);
41 boolean register(in PendingIntent newEventsIntent);
42 void unregister(in PendingIntent newEventsIntent);