blob: f9492491d5f0e8424bd1823904fbb4a516b33df6 [file] [log] [blame]
Xavier Ducroheta09fbd12009-05-20 17:33:53 -07001/*
2 * Copyright (C) 2009 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#include "usb_vendors.h"
18
19#include "sysdeps.h"
20#include <stdio.h>
21#include "adb.h"
22
23int* vendorIds = NULL;
24unsigned vendorIdCount = 0;
25
26void usb_vendors_init(void) {
27 /* for now, only put the built-in VENDOR_ID_* */
28 vendorIdCount = 2;
29 vendorIds = (int*)malloc(vendorIdCount * sizeof(int));
30 vendorIds[0] = VENDOR_ID_GOOGLE;
31 vendorIds[1] = VENDOR_ID_HTC;
32}
33
34void usb_vendors_cleanup(void) {
35 if (vendorIds != NULL) {
36 free(vendorIds);
37 vendorIds = NULL;
38 vendorIdCount = 0;
39 }
40}