123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499 |
- /***************************************************************************
- * Copyright ?2007 TWAIN Working Group:
- * Adobe Systems Incorporated, AnyDoc Software Inc., Eastman Kodak Company,
- * Fujitsu Computer Products of America, JFL Peripheral Solutions Inc.,
- * Ricoh Corporation, and Xerox Corporation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the TWAIN Working Group nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY TWAIN Working Group ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL TWAIN Working Group BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- ***************************************************************************/
- /**
- * @file TwainString.h
- * Convert TWAIN Constants to Strings
- * @author JFL Peripheral Solutions Inc.
- * @date Dec 2008
- */
- #ifndef __TWAINSTRING_H__
- #define __TWAINSTRING_H__
- #pragma once
- #include "CommonTWAIN.h"
- typedef const char*(*pfnStringCvrtFuncType)(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP value into string form
- * @param[in] _unCap the cap
- * @return the equivalent cap string
- */
- const char* convertCAP_toString(const TW_UINT16 _unCap);
- /**
- * converts the integer CAP transfer method into string form
- * @param[in] _unCap the cap
- * @param[in] _unItem the value
- * @param[in] _unType the TWAIN Type of the item
- * @return the equivalent string
- */
- const char* convertCAP_Item_toString(const TW_UINT16 _unCap, const TW_UINT32 _unItem, const TW_UINT16 _unType);
- /**
- * converts the integer CAP transfer method into string form
- * @param[in] _unEI the ExtendedImageInfo
- * @param[in] _unItem the value
- * @return the equivalent string, or NULL if not found
- */
- const char* convertEI_Item_toString(const TW_UINT16 _unEI, const TW_UINT32 _unItem);
- /**
- * converts the integer CAP transfer method into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_XFERMECH_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP unit into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_UNITS_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Pixel type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_PIXELTYPE_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Pixel flavor value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_PIXELFLAVOR_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Image File format type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_IMAGEFILEFORMAT_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Image File format type value into .xxx extention string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_IMAGEFILEFORMAT_toExt(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Compression type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_COMPRESSION_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Alarms type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertCAP_ALARMS_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP AutoSize type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_AUTOSIZE_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer ICAP BarCode Search Mode type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_BARCODESEARCHMODE_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer ICAP Bit Order type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_BITORDER_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer ICAP Auto discard blank pages type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_AUTODISCARDBLANKPAGES_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer ICAP Bitdepth Reduction type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_BITDEPTHREDUCTION_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Supported Barcode Types type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_SUPPORTEDBARCODETYPES_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Cameraside type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertCAP_CAMERASIDE_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer TWEI Pageside type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertTWEI_PAGESIDE_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP ClearBuffers type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertCAP_CLEARBUFFERS_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Device Event type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertCAP_DEVICEEVENT_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Duplex type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertCAP_DUPLEX_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Feeder Alignment type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertCAP_FEEDERALIGNMENT_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Feeder Type type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_FEEDERTYPE_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Flash used2 type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_FLASHUSED2_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Feeder Order type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertCAP_FEEDERORDER_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Feeder Pocket type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertCAP_FEEDERPOCKET_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Flip Rotation type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_FLIPROTATION_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Filter type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_FILTER_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP ICC Profile type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_ICCPROFILE_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Image Filter type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_IMAGEFILTER_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Image Merge type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_IMAGEMERGE_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Job Control type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertCAP_JOBCONTROL_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP JPEG Quality type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_JPEGQUALITY_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Light Path type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_LIGHTPATH_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Light Source type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_LIGHTSOURCE_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Noise Filter type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_NOISEFILTER_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Orientation type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_ORIENTATION_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Overscan type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_OVERSCAN_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Planar Chunky type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_PLANARCHUNKY_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Printer Mode type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertCAP_PRINTERMODE_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Printer type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertCAP_PRINTER_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Power Supply type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertCAP_POWERSUPPLY_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Segmented type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertCAP_SEGMENTED_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer CAP Supported Sizes type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertICAP_SUPPORTEDSIZES_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer TWEI File System type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertTWEI_FILESYSTEM_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer TWEI Barcode Rotation type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertTWEI_BARCODEROTATION_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer TWEI Deskew Status type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertTWEI_DESKEWSTATUS_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer TWEI MAG Type type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertTWEI_MAGTYPE_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer TWEI Patch code type value into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertTWEI_PATCHCODE_toString(const TW_UINT16 _unItem);
- /**
- * converts the integer TWTY value into string form
- * @param[in] _unItem the TWTY value
- * @return the equivalent string
- */
- const char* convertTWTY_toString(const TW_UINT16 _unItem);
- /**
- * retrieve the extended image info name for a given Info ID for the current image
- * @param[in] InfoID the id to retrieve the info of
- * @return string of the extended image info
- */
- const char* convertExtImageInfoName_toString(int InfoID);
- /**
- * retrieve the extended image info value for a given Info
- * @param[in] ImgInfo the TW_INFO to retrieve the extended image info of
- * @return string of the extended image info value
- */
- const char* convertExtImageInfoItem_toString(const TW_INFO &ImgInfo);
- /**
- * converts the TWAIN Return Code into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertReturnCode_toString(const TW_UINT16 _unItem);
- /**
- * converts the TWAIN Condition Code into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertConditionCode_toString(const TW_UINT16 _unItem);
- /**
- * converts the TWAIN Message into string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertMessage_toString(const TW_UINT16 _unItem);
- /**
- * converts the TWAIN Data Group to string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertDataGroup_toString(const TW_UINT16 _unItem);
- /**
- * converts the TWAIN Data Argument Type to string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertDataArgType_toString(const TW_UINT16 _unItem);
- /**
- * converts the TWAIN Container Type to string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertContainerType_toString(const TW_UINT16 _unItem);
- /**
- * converts the TWAIN QuerySupport value to string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char* convertQuerySupport_toString(const TW_UINT32 _unItem);
- /**
- * converts a TWAIN TWFF_ to the corresponding extension
- * @param[in] _unItem the value
- * @return the corresponding file extension
- */
- const char* convertFileFmt_toExtension(const TW_UINT16 _unItem);
- /**
- * converts a TWAIN Capability Item value to string form
- * @param[in] twCapId the Id of the capability to convert
- * @param[in] twItemType the type of the capability item
- * @param[in] pValue a pointer to the item
- * @return the equivalent string
- */
- const char *CapabilityValueToString(TW_UINT16 twCapId, TW_UINT16 twItemType, const void *pValue);
- /**
- * converts the TWAIN TWFY_ value to string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char *convertFileType_toString(const TW_UINT16 _unItem);
- /**
- * converts the TWAIN TWFF_ value to string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char *convertFileFormat_toString(const TW_UINT16 _unItem);
- /**
- * converts the TWAIN TWEJ_ value to string form
- * @param[in] _unItem the value
- * @return the equivalent string
- */
- const char *convertEOJ_toString(const TW_UINT16 _unItem);
- #endif // __TWAINSTRING_H__
|