Andreas Huber | 413f523 | 2009-12-03 11:31:19 -0800 | [diff] [blame] | 1 | /* |
| 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 | |
Marco Nelissen | 544ad2b | 2013-11-13 14:18:21 -0800 | [diff] [blame] | 17 | //#define LOG_NDEBUG 0 |
| 18 | #define LOG_TAG "MediaScannerClient" |
| 19 | #include <utils/Log.h> |
| 20 | |
Andreas Huber | 413f523 | 2009-12-03 11:31:19 -0800 | [diff] [blame] | 21 | #include <media/mediascanner.h> |
| 22 | |
Pawin Vongmasa | 255735a | 2017-07-19 11:24:56 -0700 | [diff] [blame] | 23 | #include <media/CharacterEncodingDetector.h> |
| 24 | #include <media/StringArray.h> |
Andreas Huber | 413f523 | 2009-12-03 11:31:19 -0800 | [diff] [blame] | 25 | |
Andreas Huber | 413f523 | 2009-12-03 11:31:19 -0800 | [diff] [blame] | 26 | namespace android { |
| 27 | |
Marco Nelissen | 34581f4 | 2014-08-29 16:00:28 -0700 | [diff] [blame] | 28 | MediaScannerClient::MediaScannerClient() { |
Andreas Huber | 413f523 | 2009-12-03 11:31:19 -0800 | [diff] [blame] | 29 | } |
| 30 | |
Marco Nelissen | 34581f4 | 2014-08-29 16:00:28 -0700 | [diff] [blame] | 31 | MediaScannerClient::~MediaScannerClient() { |
Andreas Huber | 413f523 | 2009-12-03 11:31:19 -0800 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | void MediaScannerClient::setLocale(const char* locale) |
| 35 | { |
Marco Nelissen | 544ad2b | 2013-11-13 14:18:21 -0800 | [diff] [blame] | 36 | mLocale = locale; // not currently used |
Andreas Huber | 413f523 | 2009-12-03 11:31:19 -0800 | [diff] [blame] | 37 | } |
| 38 | |
Marco Nelissen | 34581f4 | 2014-08-29 16:00:28 -0700 | [diff] [blame] | 39 | void MediaScannerClient::beginFile() { |
Andreas Huber | 413f523 | 2009-12-03 11:31:19 -0800 | [diff] [blame] | 40 | } |
| 41 | |
Jeff Brown | 7188e55 | 2011-07-20 16:38:43 -0700 | [diff] [blame] | 42 | status_t MediaScannerClient::addStringTag(const char* name, const char* value) |
Andreas Huber | 413f523 | 2009-12-03 11:31:19 -0800 | [diff] [blame] | 43 | { |
Marco Nelissen | 34581f4 | 2014-08-29 16:00:28 -0700 | [diff] [blame] | 44 | handleStringTag(name, value); |
Marco Nelissen | 544ad2b | 2013-11-13 14:18:21 -0800 | [diff] [blame] | 45 | return OK; |
Andreas Huber | 413f523 | 2009-12-03 11:31:19 -0800 | [diff] [blame] | 46 | } |
| 47 | |
Marco Nelissen | 34581f4 | 2014-08-29 16:00:28 -0700 | [diff] [blame] | 48 | void MediaScannerClient::endFile() { |
Andreas Huber | 413f523 | 2009-12-03 11:31:19 -0800 | [diff] [blame] | 49 | } |
| 50 | |
| 51 | } // namespace android |