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