1 /* 2 * Copyright 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 #ifndef IMG_UTILS_STRIP_SOURCE_H 18 #define IMG_UTILS_STRIP_SOURCE_H 19 20 #include <img_utils/Output.h> 21 22 #include <cutils/compiler.h> 23 #include <utils/Errors.h> 24 25 #include <stdint.h> 26 27 namespace android { 28 namespace img_utils { 29 30 /** 31 * This class acts as a data source for strips set in a TiffIfd. 32 */ 33 class ANDROID_API StripSource { 34 public: 35 virtual ~StripSource(); 36 37 /** 38 * Write count bytes to the stream. 39 * 40 * Returns OK on success, or a negative error code. 41 */ 42 virtual status_t writeToStream(Output& stream, uint32_t count) = 0; 43 44 /** 45 * Return the source IFD. 46 */ 47 virtual uint32_t getIfd() const = 0; 48 }; 49 50 } /*namespace img_utils*/ 51 } /*namespace android*/ 52 53 #endif /*IMG_UTILS_STRIP_SOURCE_H*/ 54