1/*
2 * Copyright (C) 2014 The Android Open Source Project
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
17package android.bluetooth.le;
18
19import android.annotation.SystemApi;
20import android.os.Parcel;
21import android.os.Parcelable;
22
23import java.util.List;
24
25/**
26 * A special scan filter that lets the client decide how the scan record should be stored.
27 *
28 * @hide
29 */
30@SystemApi
31public final class TruncatedFilter {
32    private final ScanFilter mFilter;
33    private final List<ResultStorageDescriptor> mStorageDescriptors;
34
35    /**
36     * Constructor for {@link TruncatedFilter}.
37     *
38     * @param filter Scan filter of the truncated filter.
39     * @param storageDescriptors Describes how the scan should be stored.
40     */
41    public TruncatedFilter(ScanFilter filter, List<ResultStorageDescriptor> storageDescriptors) {
42        mFilter = filter;
43        mStorageDescriptors = storageDescriptors;
44    }
45
46    /**
47     * Returns the scan filter.
48     */
49    public ScanFilter getFilter() {
50        return mFilter;
51    }
52
53    /**
54     * Returns a list of descriptor for scan result storage.
55     */
56    public List<ResultStorageDescriptor> getStorageDescriptors() {
57        return mStorageDescriptors;
58    }
59
60
61}
62