TwainString.cpp 156 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978
  1. /***************************************************************************
  2. * Copyright ?2007 TWAIN Working Group:
  3. * Adobe Systems Incorporated, AnyDoc Software Inc., Eastman Kodak Company,
  4. * Fujitsu Computer Products of America, JFL Peripheral Solutions Inc.,
  5. * Ricoh Corporation, and Xerox Corporation.
  6. * All rights reserved.
  7. *
  8. * Redistribution and use in source and binary forms, with or without
  9. * modification, are permitted provided that the following conditions are met:
  10. * * Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. * * Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. * * Neither the name of the TWAIN Working Group nor the
  16. * names of its contributors may be used to endorse or promote products
  17. * derived from this software without specific prior written permission.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY TWAIN Working Group ``AS IS'' AND ANY
  20. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  21. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  22. * DISCLAIMED. IN NO EVENT SHALL TWAIN Working Group BE LIABLE FOR ANY
  23. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  24. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  25. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  26. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  27. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  28. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  29. *
  30. ***************************************************************************/
  31. /**
  32. * @file TwainString.cpp
  33. * Convert TWAIN Constants to Strings
  34. * @author JFL Peripheral Solutions Inc.
  35. * @date Dec 2008
  36. */
  37. #include "TwainString.h"
  38. extern TW_HANDLE _DSM_Alloc(TW_UINT32 _size);
  39. extern void _DSM_Free(TW_HANDLE _hMemory);
  40. extern TW_MEMREF _DSM_LockMemory(TW_HANDLE _hMemory);
  41. extern void _DSM_UnlockMemory(TW_HANDLE _hMemory);
  42. /** the size of the temp buffer */
  43. #define TEMPBUFSIZE 1024
  44. /**
  45. * return a temp buffer from an array. Rotating through the queue.
  46. * @return pointer to the buffer to use.
  47. */
  48. char * nextTempBuffer()
  49. {
  50. static char szTempBuffer[3][TEMPBUFSIZE];
  51. static int nTempBuffer = 0;
  52. if(++nTempBuffer >= 3)
  53. {
  54. nTempBuffer = 0;
  55. }
  56. szTempBuffer[nTempBuffer][0] = '\0';
  57. return szTempBuffer[nTempBuffer];
  58. }
  59. //////////////////////////////////////////////////////////////////////////////
  60. const char* convertCAP_Item_toString(const TW_UINT16 _unCap, const TW_UINT32 _unItem, const TW_UINT16 _unType)
  61. {
  62. const char* pszString = "Unknown capability";
  63. switch(_unCap)
  64. {
  65. case CAP_ALARMS:
  66. pszString = convertCAP_ALARMS_toString((TW_UINT16)_unItem);
  67. break;
  68. case ICAP_AUTOSIZE:
  69. pszString = convertICAP_AUTOSIZE_toString((TW_UINT16)_unItem);
  70. break;
  71. case ICAP_COMPRESSION:
  72. pszString = convertICAP_COMPRESSION_toString((TW_UINT16)_unItem);
  73. break;
  74. case ICAP_BARCODESEARCHMODE:
  75. pszString = convertICAP_BARCODESEARCHMODE_toString((TW_UINT16)_unItem);
  76. break;
  77. case ICAP_BITORDER:
  78. pszString = convertICAP_BITORDER_toString((TW_UINT16)_unItem);
  79. break;
  80. case ICAP_AUTODISCARDBLANKPAGES:
  81. pszString = convertICAP_AUTODISCARDBLANKPAGES_toString((TW_UINT16)_unItem);
  82. break;
  83. case ICAP_BITDEPTH:
  84. {
  85. char *buff = nextTempBuffer();
  86. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "%u", _unItem);
  87. pszString = buff;
  88. }
  89. break;
  90. case ICAP_BITDEPTHREDUCTION:
  91. pszString = convertICAP_BITDEPTHREDUCTION_toString((TW_UINT16)_unItem);
  92. break;
  93. case ICAP_SUPPORTEDBARCODETYPES:
  94. pszString = convertICAP_SUPPORTEDBARCODETYPES_toString((TW_UINT16)_unItem);
  95. break;
  96. case CAP_CAMERASIDE:
  97. pszString = convertCAP_CAMERASIDE_toString((TW_UINT16)_unItem);
  98. break;
  99. case CAP_CLEARBUFFERS:
  100. pszString = convertCAP_CLEARBUFFERS_toString((TW_UINT16)_unItem);
  101. break;
  102. case CAP_DEVICEEVENT:
  103. pszString = convertCAP_DEVICEEVENT_toString((TW_UINT16)_unItem);
  104. break;
  105. case CAP_DUPLEX:
  106. pszString = convertCAP_DUPLEX_toString((TW_UINT16)_unItem);
  107. break;
  108. case CAP_EXTENDEDCAPS:
  109. pszString = convertCAP_toString((TW_UINT16)_unItem);
  110. break;
  111. case CAP_FEEDERALIGNMENT:
  112. pszString = convertCAP_FEEDERALIGNMENT_toString((TW_UINT16)_unItem);
  113. break;
  114. case ICAP_FEEDERTYPE:
  115. pszString = convertICAP_FEEDERTYPE_toString((TW_UINT16)_unItem);
  116. break;
  117. case ICAP_IMAGEFILEFORMAT:
  118. pszString = convertICAP_IMAGEFILEFORMAT_toString((TW_UINT16)_unItem);
  119. break;
  120. case ICAP_FLASHUSED2:
  121. pszString = convertICAP_FLASHUSED2_toString((TW_UINT16)_unItem);
  122. break;
  123. case CAP_FEEDERORDER:
  124. pszString = convertCAP_FEEDERORDER_toString((TW_UINT16)_unItem);
  125. break;
  126. case CAP_FEEDERPOCKET:
  127. pszString = convertCAP_FEEDERPOCKET_toString((TW_UINT16)_unItem);
  128. break;
  129. case ICAP_FLIPROTATION:
  130. pszString = convertICAP_FLIPROTATION_toString((TW_UINT16)_unItem);
  131. break;
  132. case ICAP_FILTER:
  133. pszString = convertICAP_FILTER_toString((TW_UINT16)_unItem);
  134. break;
  135. case ICAP_ICCPROFILE:
  136. pszString = convertICAP_ICCPROFILE_toString((TW_UINT16)_unItem);
  137. break;
  138. case ICAP_IMAGEFILTER:
  139. pszString = convertICAP_IMAGEFILTER_toString((TW_UINT16)_unItem);
  140. break;
  141. case ICAP_IMAGEMERGE:
  142. pszString = convertICAP_IMAGEMERGE_toString((TW_UINT16)_unItem);
  143. break;
  144. case CAP_JOBCONTROL:
  145. pszString = convertCAP_JOBCONTROL_toString((TW_UINT16)_unItem);
  146. break;
  147. case ICAP_JPEGQUALITY:
  148. pszString = convertICAP_JPEGQUALITY_toString((TW_UINT16)_unItem);
  149. break;
  150. case ICAP_LIGHTPATH:
  151. pszString = convertICAP_LIGHTPATH_toString((TW_UINT16)_unItem);
  152. break;
  153. case ICAP_LIGHTSOURCE:
  154. pszString = convertICAP_LIGHTSOURCE_toString((TW_UINT16)_unItem);
  155. break;
  156. case ICAP_NOISEFILTER:
  157. pszString = convertICAP_NOISEFILTER_toString((TW_UINT16)_unItem);
  158. break;
  159. case ICAP_ORIENTATION:
  160. pszString = convertICAP_ORIENTATION_toString((TW_UINT16)_unItem);
  161. break;
  162. case ICAP_OVERSCAN:
  163. pszString = convertICAP_OVERSCAN_toString((TW_UINT16)_unItem);
  164. break;
  165. case ICAP_PLANARCHUNKY:
  166. pszString = convertICAP_PLANARCHUNKY_toString((TW_UINT16)_unItem);
  167. break;
  168. case ICAP_PIXELFLAVOR:
  169. pszString = convertICAP_PIXELFLAVOR_toString((TW_UINT16)_unItem);
  170. break;
  171. case CAP_PRINTERMODE:
  172. pszString = convertCAP_PRINTERMODE_toString((TW_UINT16)_unItem);
  173. break;
  174. case CAP_PRINTER:
  175. pszString = convertCAP_PRINTER_toString((TW_UINT16)_unItem);
  176. break;
  177. case CAP_POWERSUPPLY:
  178. pszString = convertCAP_POWERSUPPLY_toString((TW_UINT16)_unItem);
  179. break;
  180. case ICAP_PIXELTYPE:
  181. pszString = convertICAP_PIXELTYPE_toString((TW_UINT16)_unItem);
  182. break;
  183. case CAP_SEGMENTED:
  184. pszString = convertCAP_SEGMENTED_toString((TW_UINT16)_unItem);
  185. break;
  186. case ICAP_SUPPORTEDEXTIMAGEINFO:
  187. pszString = convertExtImageInfoName_toString((TW_UINT16)_unItem);
  188. break;
  189. case ICAP_SUPPORTEDSIZES:
  190. pszString = convertICAP_SUPPORTEDSIZES_toString((TW_UINT16)_unItem);
  191. break;
  192. case ICAP_XFERMECH:
  193. pszString = convertICAP_XFERMECH_toString((TW_UINT16)_unItem);
  194. break;
  195. case ICAP_UNITS:
  196. pszString = convertICAP_UNITS_toString((TW_UINT16)_unItem);
  197. break;
  198. default:
  199. {
  200. char *buff = nextTempBuffer();
  201. switch(_unType)
  202. {
  203. case TWTY_UINT8:
  204. case TWTY_UINT16:
  205. case TWTY_UINT32:
  206. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "%u [0x%x]", _unItem, _unItem);
  207. break;
  208. case TWTY_INT8:
  209. case TWTY_INT16:
  210. case TWTY_INT32:
  211. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "%d", _unItem);
  212. break;
  213. case TWTY_BOOL:
  214. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "%s", (TW_BOOL)_unItem? "True" : "False");
  215. break;
  216. }
  217. pszString = buff;
  218. }
  219. break;
  220. }
  221. return pszString;
  222. }
  223. //////////////////////////////////////////////////////////////////////////////
  224. const char* convertEI_Item_toString(const TW_UINT16 _unEI, const TW_UINT32 _unItem)
  225. {
  226. const char* pszString = NULL;
  227. TW_UINT16 twItem = (TW_UINT16)_unItem;
  228. switch(_unEI)
  229. {
  230. case TWEI_BARCODEROTATION:
  231. pszString = convertTWEI_BARCODEROTATION_toString((TW_UINT16)_unItem);
  232. break;
  233. case TWEI_BARCODETYPE:
  234. pszString = CapabilityValueToString(ICAP_SUPPORTEDBARCODETYPES, TWTY_UINT16, &twItem);//convertICAP_SUPPORTEDBARCODETYPES_toString((TW_UINT16)_unItem);
  235. break;
  236. case TWEI_PAGESIDE: //CAP_CAMERASIDE
  237. pszString = CapabilityValueToString(CAP_CAMERASIDE, TWTY_UINT16, &twItem);//convertTWEI_PAGESIDE_toString((TW_UINT16)_unItem);
  238. break;
  239. case TWEI_DESKEWSTATUS:
  240. pszString = convertTWEI_DESKEWSTATUS_toString((TW_UINT16)_unItem);
  241. break;
  242. case TWEI_FILESYSTEMSOURCE:
  243. pszString = convertFileType_toString((TW_UINT16)_unItem);
  244. break;
  245. case TWEI_PIXELFLAVOR:
  246. pszString = CapabilityValueToString(ICAP_PIXELFLAVOR, TWTY_UINT16, &twItem);//convertICAP_PIXELFLAVOR_toString((TW_UINT16)_unItem);
  247. break;
  248. case TWEI_MAGTYPE:
  249. pszString = convertTWEI_MAGTYPE_toString((TW_UINT16)_unItem);
  250. break;
  251. case TWEI_PATCHCODE:
  252. pszString = convertTWEI_PATCHCODE_toString((TW_UINT16)_unItem);
  253. break;
  254. }
  255. return pszString;
  256. }
  257. //////////////////////////////////////////////////////////////////////////////
  258. const char* convertCAP_toString(const TW_UINT16 _unCap)
  259. {
  260. const char* text;
  261. switch(_unCap)
  262. {
  263. case ICAP_AUTODISCARDBLANKPAGES:
  264. text = "ICAP_AUTODISCARDBLANKPAGES";
  265. break;
  266. case CAP_CUSTOMBASE:
  267. text = "CAP_CUSTOMBASE";
  268. break;
  269. case CAP_XFERCOUNT:
  270. text = "CAP_XFERCOUNT";
  271. break;
  272. case ICAP_COMPRESSION:
  273. text = "ICAP_COMPRESSION";
  274. break;
  275. case ICAP_PIXELTYPE:
  276. text = "ICAP_PIXELTYPE";
  277. break;
  278. case ICAP_UNITS:
  279. text = "ICAP_UNITS";
  280. break;
  281. case ICAP_XFERMECH:
  282. text = "ICAP_XFERMECH";
  283. break;
  284. case CAP_AUTHOR:
  285. text = "CAP_AUTHOR";
  286. break;
  287. case CAP_CAPTION:
  288. text = "CAP_CAPTION";
  289. break;
  290. case CAP_FEEDERENABLED:
  291. text = "CAP_FEEDERENABLED";
  292. break;
  293. case CAP_FEEDERLOADED:
  294. text = "CAP_FEEDERLOADED";
  295. break;
  296. case CAP_TIMEDATE:
  297. text = "CAP_TIMEDATE";
  298. break;
  299. case CAP_SUPPORTEDCAPS:
  300. text = "CAP_SUPPORTEDCAPS";
  301. break;
  302. case CAP_EXTENDEDCAPS:
  303. text = "CAP_EXTENDEDCAPS";
  304. break;
  305. case CAP_AUTOFEED:
  306. text = "CAP_AUTOFEED";
  307. break;
  308. case CAP_CLEARPAGE:
  309. text = "CAP_CLEARPAGE";
  310. break;
  311. case CAP_FEEDPAGE:
  312. text = "CAP_FEEDPAGE";
  313. break;
  314. case CAP_REWINDPAGE:
  315. text = "CAP_REWINDPAGE";
  316. break;
  317. case CAP_INDICATORS:
  318. text = "CAP_INDICATORS";
  319. break;
  320. case CAP_SUPPORTEDCAPSEXT:
  321. text = "CAP_SUPPORTEDCAPSEXT";
  322. break;
  323. case CAP_PAPERDETECTABLE:
  324. text = "CAP_PAPERDETECTABLE";
  325. break;
  326. case CAP_UICONTROLLABLE:
  327. text = "CAP_UICONTROLLABLE";
  328. break;
  329. case CAP_DEVICEONLINE:
  330. text = "CAP_DEVICEONLINE";
  331. break;
  332. case CAP_AUTOSCAN:
  333. text = "CAP_AUTOSCAN";
  334. break;
  335. case CAP_THUMBNAILSENABLED:
  336. text = "CAP_THUMBNAILSENABLED";
  337. break;
  338. case CAP_DUPLEX:
  339. text = "CAP_DUPLEX";
  340. break;
  341. case CAP_DUPLEXENABLED:
  342. text = "CAP_DUPLEXENABLED";
  343. break;
  344. case CAP_ENABLEDSUIONLY:
  345. text = "CAP_ENABLEDSUIONLY";
  346. break;
  347. case CAP_CUSTOMDSDATA:
  348. text = "CAP_CUSTOMDSDATA";
  349. break;
  350. case CAP_ENDORSER:
  351. text = "CAP_ENDORSER";
  352. break;
  353. case CAP_JOBCONTROL:
  354. text = "CAP_JOBCONTROL";
  355. break;
  356. case CAP_ALARMS:
  357. text = "CAP_ALARMS";
  358. break;
  359. case CAP_ALARMVOLUME:
  360. text = "CAP_ALARMVOLUME";
  361. break;
  362. case CAP_AUTOMATICCAPTURE:
  363. text = "CAP_AUTOMATICCAPTURE";
  364. break;
  365. case CAP_TIMEBEFOREFIRSTCAPTURE:
  366. text = "CAP_TIMEBEFOREFIRSTCAPTURE";
  367. break;
  368. case CAP_TIMEBETWEENCAPTURES:
  369. text = "CAP_TIMEBETWEENCAPTURES";
  370. break;
  371. case CAP_CLEARBUFFERS:
  372. text = "CAP_CLEARBUFFERS";
  373. break;
  374. case CAP_MAXBATCHBUFFERS:
  375. text = "CAP_MAXBATCHBUFFERS";
  376. break;
  377. case CAP_DEVICETIMEDATE:
  378. text = "CAP_DEVICETIMEDATE";
  379. break;
  380. case CAP_POWERSUPPLY:
  381. text = "CAP_POWERSUPPLY";
  382. break;
  383. case CAP_CAMERAPREVIEWUI:
  384. text = "CAP_CAMERAPREVIEWUI";
  385. break;
  386. case CAP_DEVICEEVENT:
  387. text = "CAP_DEVICEEVENT";
  388. break;
  389. case CAP_SERIALNUMBER:
  390. text = "CAP_SERIALNUMBER";
  391. break;
  392. case CAP_PRINTER:
  393. text = "CAP_PRINTER";
  394. break;
  395. case CAP_PRINTERENABLED:
  396. text = "CAP_PRINTERENABLED";
  397. break;
  398. case CAP_PRINTERINDEX:
  399. text = "CAP_PRINTERINDEX";
  400. break;
  401. case CAP_PRINTERMODE:
  402. text = "CAP_PRINTERMODE";
  403. break;
  404. case CAP_PRINTERSTRING:
  405. text = "CAP_PRINTERSTRING";
  406. break;
  407. case CAP_PRINTERSUFFIX:
  408. text = "CAP_PRINTERSUFFIX";
  409. break;
  410. case CAP_LANGUAGE:
  411. text = "CAP_LANGUAGE";
  412. break;
  413. case CAP_FEEDERALIGNMENT:
  414. text = "CAP_FEEDERALIGNMENT";
  415. break;
  416. case CAP_FEEDERORDER:
  417. text = "CAP_FEEDERORDER";
  418. break;
  419. case CAP_REACQUIREALLOWED:
  420. text = "CAP_REACQUIREALLOWED";
  421. break;
  422. case CAP_BATTERYMINUTES:
  423. text = "CAP_BATTERYMINUTES";
  424. break;
  425. case CAP_BATTERYPERCENTAGE:
  426. text = "CAP_BATTERYPERCENTAGE";
  427. break;
  428. case CAP_CAMERASIDE:
  429. text = "CAP_CAMERASIDE";
  430. break;
  431. case CAP_SEGMENTED:
  432. text = "CAP_SEGMENTED";
  433. break;
  434. case CAP_CAMERAENABLED:
  435. text = "CAP_CAMERAENABLED";
  436. break;
  437. case CAP_CAMERAORDER:
  438. text = "CAP_CAMERAORDER";
  439. break;
  440. case CAP_MICRENABLED:
  441. text = "CAP_MICRENABLED";
  442. break;
  443. case CAP_FEEDERPREP:
  444. text = "CAP_FEEDERPREP";
  445. break;
  446. case CAP_FEEDERPOCKET:
  447. text = "CAP_FEEDERPOCKET";
  448. break;
  449. case CAP_AUTOMATICSENSEMEDIUM:
  450. text = "CAP_AUTOMATICSENSEMEDIUM";
  451. break;
  452. case CAP_CUSTOMINTERFACEGUID:
  453. text = "CAP_CUSTOMINTERFACEGUID";
  454. break;
  455. case ICAP_AUTOBRIGHT:
  456. text = "ICAP_AUTOBRIGHT";
  457. break;
  458. case ICAP_BRIGHTNESS:
  459. text = "ICAP_BRIGHTNESS";
  460. break;
  461. case ICAP_CONTRAST:
  462. text = "ICAP_CONTRAST";
  463. break;
  464. case ICAP_CUSTHALFTONE:
  465. text = "ICAP_CUSTHALFTONE";
  466. break;
  467. case ICAP_EXPOSURETIME:
  468. text = "ICAP_EXPOSURETIME";
  469. break;
  470. case ICAP_FILTER:
  471. text = "ICAP_FILTER";
  472. break;
  473. case ICAP_FLASHUSED:
  474. text = "ICAP_FLASHUSED";
  475. break;
  476. case ICAP_GAMMA:
  477. text = "ICAP_GAMMA";
  478. break;
  479. case ICAP_HALFTONES:
  480. text = "ICAP_HALFTONES";
  481. break;
  482. case ICAP_HIGHLIGHT:
  483. text = "ICAP_HIGHLIGHT";
  484. break;
  485. case ICAP_IMAGEFILEFORMAT:
  486. text = "ICAP_IMAGEFILEFORMAT";
  487. break;
  488. case ICAP_LAMPSTATE:
  489. text = "ICAP_LAMPSTATE";
  490. break;
  491. case ICAP_LIGHTSOURCE:
  492. text = "ICAP_LIGHTSOURCE";
  493. break;
  494. case ICAP_ORIENTATION:
  495. text = "ICAP_ORIENTATION";
  496. break;
  497. case ICAP_PHYSICALWIDTH:
  498. text = "ICAP_PHYSICALWIDTH";
  499. break;
  500. case ICAP_PHYSICALHEIGHT:
  501. text = "ICAP_PHYSICALHEIGHT";
  502. break;
  503. case ICAP_SHADOW:
  504. text = "ICAP_SHADOW";
  505. break;
  506. case ICAP_FRAMES:
  507. text = "ICAP_FRAMES";
  508. break;
  509. case ICAP_XNATIVERESOLUTION:
  510. text = "ICAP_XNATIVERESOLUTION";
  511. break;
  512. case ICAP_YNATIVERESOLUTION:
  513. text = "ICAP_YNATIVERESOLUTION";
  514. break;
  515. case ICAP_XRESOLUTION:
  516. text = "ICAP_XRESOLUTION";
  517. break;
  518. case ICAP_YRESOLUTION:
  519. text = "ICAP_YRESOLUTION";
  520. break;
  521. case ICAP_MAXFRAMES:
  522. text = "ICAP_MAXFRAMES";
  523. break;
  524. case ICAP_TILES:
  525. text = "ICAP_TILES";
  526. break;
  527. case ICAP_BITORDER:
  528. text = "ICAP_BITORDER";
  529. break;
  530. case ICAP_CCITTKFACTOR:
  531. text = "ICAP_CCITTKFACTOR";
  532. break;
  533. case ICAP_LIGHTPATH:
  534. text = "ICAP_LIGHTPATH";
  535. break;
  536. case ICAP_PIXELFLAVOR:
  537. text = "ICAP_PIXELFLAVOR";
  538. break;
  539. case ICAP_PLANARCHUNKY:
  540. text = "ICAP_PLANARCHUNKY";
  541. break;
  542. case ICAP_ROTATION:
  543. text = "ICAP_ROTATION";
  544. break;
  545. case ICAP_SUPPORTEDSIZES:
  546. text = "ICAP_SUPPORTEDSIZES";
  547. break;
  548. case ICAP_THRESHOLD:
  549. text = "ICAP_THRESHOLD";
  550. break;
  551. case ICAP_XSCALING:
  552. text = "ICAP_XSCALING";
  553. break;
  554. case ICAP_YSCALING:
  555. text = "ICAP_YSCALING";
  556. break;
  557. case ICAP_BITORDERCODES:
  558. text = "ICAP_BITORDERCODES";
  559. break;
  560. case ICAP_PIXELFLAVORCODES:
  561. text = "ICAP_PIXELFLAVORCODES";
  562. break;
  563. case ICAP_JPEGPIXELTYPE:
  564. text = "ICAP_JPEGPIXELTYPE";
  565. break;
  566. case ICAP_TIMEFILL:
  567. text = "ICAP_TIMEFILL";
  568. break;
  569. case ICAP_BITDEPTH:
  570. text = "ICAP_BITDEPTH";
  571. break;
  572. case ICAP_BITDEPTHREDUCTION:
  573. text = "ICAP_BITDEPTHREDUCTION";
  574. break;
  575. case ICAP_UNDEFINEDIMAGESIZE:
  576. text = "ICAP_UNDEFINEDIMAGESIZE";
  577. break;
  578. case ICAP_IMAGEDATASET:
  579. text = "ICAP_IMAGEDATASET";
  580. break;
  581. case ICAP_EXTIMAGEINFO:
  582. text = "ICAP_EXTIMAGEINFO";
  583. break;
  584. case ICAP_MINIMUMHEIGHT:
  585. text = "ICAP_MINIMUMHEIGHT";
  586. break;
  587. case ICAP_MINIMUMWIDTH:
  588. text = "ICAP_MINIMUMWIDTH";
  589. break;
  590. case ICAP_FLIPROTATION:
  591. text = "ICAP_FLIPROTATION";
  592. break;
  593. case ICAP_BARCODEDETECTIONENABLED:
  594. text = "ICAP_BARCODEDETECTIONENABLED";
  595. break;
  596. case ICAP_SUPPORTEDBARCODETYPES:
  597. text = "ICAP_SUPPORTEDBARCODETYPES";
  598. break;
  599. case ICAP_BARCODEMAXSEARCHPRIORITIES:
  600. text = "ICAP_BARCODEMAXSEARCHPRIORITIES";
  601. break;
  602. case ICAP_BARCODESEARCHPRIORITIES:
  603. text = "ICAP_BARCODESEARCHPRIORITIES";
  604. break;
  605. case ICAP_BARCODESEARCHMODE:
  606. text = "ICAP_BARCODESEARCHMODE";
  607. break;
  608. case ICAP_BARCODEMAXRETRIES:
  609. text = "ICAP_BARCODEMAXRETRIES";
  610. break;
  611. case ICAP_BARCODETIMEOUT:
  612. text = "ICAP_BARCODETIMEOUT";
  613. break;
  614. case ICAP_ZOOMFACTOR:
  615. text = "ICAP_ZOOMFACTOR";
  616. break;
  617. case ICAP_PATCHCODEDETECTIONENABLED:
  618. text = "ICAP_PATCHCODEDETECTIONENABLED";
  619. break;
  620. case ICAP_SUPPORTEDPATCHCODETYPES:
  621. text = "ICAP_SUPPORTEDPATCHCODETYPES";
  622. break;
  623. case ICAP_PATCHCODEMAXSEARCHPRIORITIES:
  624. text = "ICAP_PATCHCODEMAXSEARCHPRIORITIES";
  625. break;
  626. case ICAP_PATCHCODESEARCHPRIORITIES:
  627. text = "ICAP_PATCHCODESEARCHPRIORITIES";
  628. break;
  629. case ICAP_PATCHCODESEARCHMODE:
  630. text = "ICAP_PATCHCODESEARCHMODE";
  631. break;
  632. case ICAP_PATCHCODEMAXRETRIES:
  633. text = "ICAP_PATCHCODEMAXRETRIES";
  634. break;
  635. case ICAP_PATCHCODETIMEOUT:
  636. text = "ICAP_PATCHCODETIMEOUT";
  637. break;
  638. case ICAP_FLASHUSED2:
  639. text = "ICAP_FLASHUSED2";
  640. break;
  641. case ICAP_IMAGEFILTER:
  642. text = "ICAP_IMAGEFILTER";
  643. break;
  644. case ICAP_NOISEFILTER:
  645. text = "ICAP_NOISEFILTER";
  646. break;
  647. case ICAP_OVERSCAN:
  648. text = "ICAP_OVERSCAN";
  649. break;
  650. case ICAP_AUTOMATICBORDERDETECTION:
  651. text = "ICAP_AUTOMATICBORDERDETECTION";
  652. break;
  653. case ICAP_AUTOMATICDESKEW:
  654. text = "ICAP_AUTOMATICDESKEW";
  655. break;
  656. case ICAP_AUTOMATICROTATE:
  657. text = "ICAP_AUTOMATICROTATE";
  658. break;
  659. case ICAP_JPEGQUALITY:
  660. text = "ICAP_JPEGQUALITY";
  661. break;
  662. case ICAP_FEEDERTYPE:
  663. text = "ICAP_FEEDERTYPE";
  664. break;
  665. case ICAP_ICCPROFILE:
  666. text = "ICAP_ICCPROFILE";
  667. break;
  668. case ICAP_AUTOSIZE:
  669. text = "ICAP_AUTOSIZE";
  670. break;
  671. case ICAP_AUTOMATICCROPUSESFRAME:
  672. text = "ICAP_AUTOMATICCROPUSESFRAME";
  673. break;
  674. case ICAP_AUTOMATICLENGTHDETECTION:
  675. text = "ICAP_AUTOMATICLENGTHDETECTION";
  676. break;
  677. case ICAP_AUTOMATICCOLORENABLED:
  678. text = "ICAP_AUTOMATICCOLORENABLED";
  679. break;
  680. case ICAP_AUTOMATICCOLORNONCOLORPIXELTYPE:
  681. text = "ICAP_AUTOMATICCOLORNONCOLORPIXELTYPE";
  682. break;
  683. case ICAP_COLORMANAGEMENTENABLED:
  684. text = "ICAP_COLORMANAGEMENTENABLED";
  685. break;
  686. case ICAP_IMAGEMERGE:
  687. text = "ICAP_IMAGEMERGE";
  688. break;
  689. case ICAP_IMAGEMERGEHEIGHTTHRESHOLD:
  690. text = "ICAP_IMAGEMERGEHEIGHTTHRESHOLD";
  691. break;
  692. case ICAP_SUPPORTEDEXTIMAGEINFO:
  693. text = "ICAP_SUPPORTEDEXTIMAGEINFO";
  694. break;
  695. case ACAP_AUDIOFILEFORMAT:
  696. text = "ACAP_AUDIOFILEFORMAT";
  697. break;
  698. case ACAP_XFERMECH:
  699. text = "ACAP_XFERMECH";
  700. break;
  701. default:
  702. {
  703. char * buff = nextTempBuffer();
  704. if(_unCap < CAP_CUSTOMBASE)
  705. {
  706. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown CAP 0x:%04X", _unCap);
  707. }
  708. else if (_unCap > CAP_CUSTOMBASE)
  709. {
  710. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Custom CAP 0x:%04X", _unCap);
  711. }
  712. else // == CAP_CUSTOMBASE
  713. {
  714. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Invalid CAP 0x:%04X", _unCap);
  715. }
  716. text = buff;
  717. }
  718. break;
  719. }
  720. return text;
  721. }
  722. //////////////////////////////////////////////////////////////////////////////
  723. const char* convertTWTY_toString(const TW_UINT16 _unItem)
  724. {
  725. const char* text;
  726. switch(_unItem)
  727. {
  728. case TWTY_INT8:
  729. text = "TWTY_INT8";
  730. break;
  731. case TWTY_INT16:
  732. text = "TWTY_INT16";
  733. break;
  734. case TWTY_INT32:
  735. text = "TWTY_INT32";
  736. break;
  737. case TWTY_UINT8:
  738. text = "TWTY_UINT8";
  739. break;
  740. case TWTY_UINT16:
  741. text = "TWTY_UINT16";
  742. break;
  743. case TWTY_UINT32:
  744. text = "TWTY_UINT32";
  745. break;
  746. case TWTY_BOOL:
  747. text = "TWTY_BOOL";
  748. break;
  749. case TWTY_FIX32:
  750. text = "TWTY_FIX32";
  751. break;
  752. case TWTY_FRAME:
  753. text = "TWTY_FRAME";
  754. break;
  755. case TWTY_STR32:
  756. text = "TWTY_STR32";
  757. break;
  758. case TWTY_STR64:
  759. text = "TWTY_STR64";
  760. break;
  761. case TWTY_STR128:
  762. text = "TWTY_STR128";
  763. break;
  764. case TWTY_STR255:
  765. text = "TWTY_STR255";
  766. break;
  767. case TWTY_STR1024:
  768. text = "TWTY_STR1024";
  769. break;
  770. case TWTY_UNI512:
  771. text = "TWTY_UNI512";
  772. break;
  773. case TWTY_HANDLE:
  774. text = "TWTY_HANDLE";
  775. break;
  776. default:
  777. {
  778. char * buff = nextTempBuffer();
  779. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWTY 0x:%04X", _unItem);
  780. text = buff;
  781. }
  782. break;
  783. }
  784. return text;
  785. }
  786. //////////////////////////////////////////////////////////////////////////////
  787. // Convert Extended Image Info Attributes to String
  788. const char* convertExtImageInfoName_toString(int InfoID)
  789. {
  790. const char* text;
  791. switch(InfoID)
  792. {
  793. case TWEI_BARCODEX:
  794. text = "TWEI_BARCODEX";
  795. break;
  796. case TWEI_BARCODEY:
  797. text = "TWEI_BARCODEY";
  798. break;
  799. case TWEI_BARCODETEXT:
  800. text = "TWEI_BARCODETEXT";
  801. break;
  802. case TWEI_BARCODETYPE:
  803. text = "TWEI_BARCODETYPE";
  804. break;
  805. case TWEI_DESHADETOP:
  806. text = "TWEI_DESHADETOP";
  807. break;
  808. case TWEI_DESHADELEFT:
  809. text = "TWEI_DESHADELEFT";
  810. break;
  811. case TWEI_DESHADEHEIGHT:
  812. text = "TWEI_DESHADEHEIGHT";
  813. break;
  814. case TWEI_DESHADEWIDTH:
  815. text = "TWEI_DESHADEWIDTH";
  816. break;
  817. case TWEI_DESHADESIZE:
  818. text = "TWEI_DESHADESIZE";
  819. break;
  820. case TWEI_SPECKLESREMOVED:
  821. text = "TWEI_SPECKLESREMOVED";
  822. break;
  823. case TWEI_HORZLINEXCOORD:
  824. text = "TWEI_HORZLINEXCOORD";
  825. break;
  826. case TWEI_HORZLINEYCOORD:
  827. text = "TWEI_HORZLINEYCOORD";
  828. break;
  829. case TWEI_HORZLINELENGTH:
  830. text = "TWEI_HORZLINELENGTH";
  831. break;
  832. case TWEI_HORZLINETHICKNESS:
  833. text = "TWEI_HORZLINETHICKNESS";
  834. break;
  835. case TWEI_VERTLINEXCOORD:
  836. text = "TWEI_VERTLINEXCOORD";
  837. break;
  838. case TWEI_VERTLINEYCOORD:
  839. text = "TWEI_VERTLINEYCOORD";
  840. break;
  841. case TWEI_VERTLINELENGTH:
  842. text = "TWEI_VERTLINELENGTH";
  843. break;
  844. case TWEI_VERTLINETHICKNESS:
  845. text = "TWEI_VERTLINETHICKNESS";
  846. break;
  847. case TWEI_PATCHCODE:
  848. text = "TWEI_PATCHCODE";
  849. break;
  850. case TWEI_ENDORSEDTEXT:
  851. text = "TWEI_ENDORSEDTEXT";
  852. break;
  853. case TWEI_FORMCONFIDENCE:
  854. text = "TWEI_FORMCONFIDENCE";
  855. break;
  856. case TWEI_FORMTEMPLATEMATCH:
  857. text = "TWEI_FORMTEMPLATEMATCH";
  858. break;
  859. case TWEI_FORMTEMPLATEPAGEMATCH:
  860. text = "TWEI_FORMTEMPLATEPAGEMATCH";
  861. break;
  862. case TWEI_FORMHORZDOCOFFSET:
  863. text = "TWEI_FORMHORZDOCOFFSET";
  864. break;
  865. case TWEI_FORMVERTDOCOFFSET:
  866. text = "TWEI_FORMVERTDOCOFFSET";
  867. break;
  868. case TWEI_BARCODECOUNT:
  869. text = "TWEI_BARCODECOUNT";
  870. break;
  871. case TWEI_BARCODECONFIDENCE:
  872. text = "TWEI_BARCODECONFIDENCE";
  873. break;
  874. case TWEI_BARCODEROTATION:
  875. text = "TWEI_BARCODEROTATION";
  876. break;
  877. case TWEI_BARCODETEXTLENGTH:
  878. text = "TWEI_BARCODETEXTLENGTH";
  879. break;
  880. case TWEI_DESHADECOUNT:
  881. text = "TWEI_DESHADECOUNT";
  882. break;
  883. case TWEI_DESHADEBLACKCOUNTOLD:
  884. text = "TWEI_DESHADEBLACKCOUNTOLD";
  885. break;
  886. case TWEI_DESHADEBLACKCOUNTNEW:
  887. text = "TWEI_DESHADEBLACKCOUNTNEW";
  888. break;
  889. case TWEI_DESHADEBLACKRLMIN:
  890. text = "TWEI_DESHADEBLACKRLMIN";
  891. break;
  892. case TWEI_DESHADEBLACKRLMAX:
  893. text = "TWEI_DESHADEBLACKRLMAX";
  894. break;
  895. case TWEI_DESHADEWHITECOUNTOLD:
  896. text = "TWEI_DESHADEWHITECOUNTOLD";
  897. break;
  898. case TWEI_DESHADEWHITECOUNTNEW:
  899. text = "TWEI_DESHADEWHITECOUNTNEW";
  900. break;
  901. case TWEI_DESHADEWHITERLMIN:
  902. text = "TWEI_DESHADEWHITERLMIN";
  903. break;
  904. case TWEI_DESHADEWHITERLAVE:
  905. text = "TWEI_DESHADEWHITERLAVE";
  906. break;
  907. case TWEI_DESHADEWHITERLMAX:
  908. text = "TWEI_DESHADEWHITERLMAX";
  909. break;
  910. case TWEI_BLACKSPECKLESREMOVED:
  911. text = "TWEI_BLACKSPECKLESREMOVED";
  912. break;
  913. case TWEI_WHITESPECKLESREMOVED:
  914. text = "TWEI_WHITESPECKLESREMOVED";
  915. break;
  916. case TWEI_HORZLINECOUNT:
  917. text = "TWEI_HORZLINECOUNT";
  918. break;
  919. case TWEI_VERTLINECOUNT:
  920. text = "TWEI_VERTLINECOUNT";
  921. break;
  922. case TWEI_DESKEWSTATUS:
  923. text = "TWEI_DESKEWSTATUS";
  924. break;
  925. case TWEI_SKEWORIGINALANGLE:
  926. text = "TWEI_SKEWORIGINALANGLE";
  927. break;
  928. case TWEI_SKEWFINALANGLE:
  929. text = "TWEI_SKEWFINALANGLE";
  930. break;
  931. case TWEI_SKEWCONFIDENCE:
  932. text = "TWEI_SKEWCONFIDENCE";
  933. break;
  934. case TWEI_SKEWWINDOWX1:
  935. text = "TWEI_SKEWWINDOWX1";
  936. break;
  937. case TWEI_SKEWWINDOWY1:
  938. text = "TWEI_SKEWWINDOWY1";
  939. break;
  940. case TWEI_SKEWWINDOWX2:
  941. text = "TWEI_SKEWWINDOWX2";
  942. break;
  943. case TWEI_SKEWWINDOWY2:
  944. text = "TWEI_SKEWWINDOWY2";
  945. break;
  946. case TWEI_SKEWWINDOWX3:
  947. text = "TWEI_SKEWWINDOWX3";
  948. break;
  949. case TWEI_SKEWWINDOWY3:
  950. text = "TWEI_SKEWWINDOWY3";
  951. break;
  952. case TWEI_SKEWWINDOWX4:
  953. text = "TWEI_SKEWWINDOWX4";
  954. break;
  955. case TWEI_SKEWWINDOWY4:
  956. text = "TWEI_SKEWWINDOWY4";
  957. break;
  958. case TWEI_BOOKNAME:
  959. text = "TWEI_BOOKNAME";
  960. break;
  961. case TWEI_CHAPTERNUMBER:
  962. text = "TWEI_CHAPTERNUMBER";
  963. break;
  964. case TWEI_DOCUMENTNUMBER:
  965. text = "TWEI_DOCUMENTNUMBER";
  966. break;
  967. case TWEI_PAGENUMBER:
  968. text = "TWEI_PAGENUMBER";
  969. break;
  970. case TWEI_CAMERA:
  971. text = "TWEI_CAMERA";
  972. break;
  973. case TWEI_FRAMENUMBER:
  974. text = "TWEI_FRAMENUMBER";
  975. break;
  976. case TWEI_FRAME:
  977. text = "TWEI_FRAME";
  978. break;
  979. case TWEI_PIXELFLAVOR:
  980. text = "TWEI_PIXELFLAVOR";
  981. break;
  982. case TWEI_PAGESIDE:
  983. text = "TWEI_PAGESIDE";
  984. break;
  985. case TWEI_MAGDATA:
  986. text = "TWEI_MAGDATA";
  987. break;
  988. case TWEI_MAGTYPE:
  989. text = "TWEI_MAGTYPE";
  990. break;
  991. default:
  992. {
  993. char * buff = nextTempBuffer();
  994. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "ExtImageInfo ID 0x:%04X",InfoID);
  995. text = buff;
  996. }
  997. break;
  998. }
  999. return text;
  1000. }
  1001. //////////////////////////////////////////////////////////////////////////////
  1002. // Convert CAP_ALARMS values to String
  1003. const char* convertCAP_ALARMS_toString(const TW_UINT16 InfoID)
  1004. {
  1005. const char* text;
  1006. switch(InfoID)
  1007. {
  1008. case TWAL_ALARM:
  1009. text = "Alarm";
  1010. break;
  1011. case TWAL_FEEDERERROR:
  1012. text = "Feeder Error";
  1013. break;
  1014. case TWAL_FEEDERWARNING:
  1015. text = "Feeder Warning";
  1016. break;
  1017. case TWAL_BARCODE:
  1018. text = "Barcode";
  1019. break;
  1020. case TWAL_DOUBLEFEED:
  1021. text = "Double Feed";
  1022. break;
  1023. case TWAL_JAM:
  1024. text = "Paper Jam";
  1025. break;
  1026. case TWAL_PATCHCODE:
  1027. text = "Patch Code";
  1028. break;
  1029. case TWAL_POWER:
  1030. text = "Power";
  1031. break;
  1032. case TWAL_SKEW:
  1033. text = "Skew";
  1034. break;
  1035. default:
  1036. {
  1037. char * buff = nextTempBuffer();
  1038. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWAL 0x:%04X", InfoID);
  1039. text = buff;
  1040. }
  1041. break;
  1042. }
  1043. return text;
  1044. }
  1045. //////////////////////////////////////////////////////////////////////////////
  1046. // Convert ICAP_AUTOSIZE values to String
  1047. const char* convertICAP_AUTOSIZE_toString(const TW_UINT16 InfoID)
  1048. {
  1049. const char* text;
  1050. switch(InfoID)
  1051. {
  1052. case TWAS_NONE:
  1053. text = "None";
  1054. break;
  1055. case TWAS_AUTO:
  1056. text = "Auto";
  1057. break;
  1058. case TWAS_CURRENT:
  1059. text = "Current";
  1060. break;
  1061. default:
  1062. {
  1063. char * buff = nextTempBuffer();
  1064. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWAS 0x:%04X", InfoID);
  1065. text = buff;
  1066. }
  1067. break;
  1068. }
  1069. return text;
  1070. }
  1071. //////////////////////////////////////////////////////////////////////////////
  1072. // Convert TWEI_BARCODEROTATION values to String
  1073. const char* convertTWEI_BARCODEROTATION_toString(const TW_UINT16 InfoID)
  1074. {
  1075. const char* text;
  1076. switch(InfoID)
  1077. {
  1078. case TWBCOR_ROT0:
  1079. text = "TWBCOR_ROT0";
  1080. break;
  1081. case TWBCOR_ROT90:
  1082. text = "TWBCOR_ROT90";
  1083. break;
  1084. case TWBCOR_ROT180:
  1085. text = "TWBCOR_ROT180";
  1086. break;
  1087. case TWBCOR_ROT270:
  1088. text = "TWBCOR_ROT270";
  1089. break;
  1090. case TWBCOR_ROTX:
  1091. text = "TWBCOR_ROTX";
  1092. break;
  1093. default:
  1094. {
  1095. char * buff = nextTempBuffer();
  1096. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWBCOR 0x:%04X", InfoID);
  1097. text = buff;
  1098. }
  1099. break;
  1100. }
  1101. return text;
  1102. }
  1103. //////////////////////////////////////////////////////////////////////////////
  1104. // Convert ICAP_BARCODESEARCHMODE values to String
  1105. const char* convertICAP_BARCODESEARCHMODE_toString(const TW_UINT16 InfoID)
  1106. {
  1107. const char* text;
  1108. switch(InfoID)
  1109. {
  1110. case TWBD_HORZ:
  1111. text = "Horizontal";
  1112. break;
  1113. case TWBD_VERT:
  1114. text = "Vertical";
  1115. break;
  1116. case TWBD_HORZVERT:
  1117. text = "Horz Vert";
  1118. break;
  1119. case TWBD_VERTHORZ:
  1120. text = "Vert Horz";
  1121. break;
  1122. default:
  1123. {
  1124. char * buff = nextTempBuffer();
  1125. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWBD 0x:%04X", InfoID);
  1126. text = buff;
  1127. }
  1128. break;
  1129. }
  1130. return text;
  1131. }
  1132. //////////////////////////////////////////////////////////////////////////////
  1133. // Convert ICAP_BITORDER values to String
  1134. const char* convertICAP_BITORDER_toString(const TW_UINT16 InfoID)
  1135. {
  1136. const char* text;
  1137. switch(InfoID)
  1138. {
  1139. case TWBO_LSBFIRST:
  1140. text = "LSB first";
  1141. break;
  1142. case TWBO_MSBFIRST:
  1143. text = "MSB first";
  1144. break;
  1145. default:
  1146. {
  1147. char * buff = nextTempBuffer();
  1148. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWBO 0x:%04X", InfoID);
  1149. text = buff;
  1150. }
  1151. break;
  1152. }
  1153. return text;
  1154. }
  1155. //////////////////////////////////////////////////////////////////////////////
  1156. // Convert ICAP_AUTODISCARDBLANKPAGES values to String
  1157. const char* convertICAP_AUTODISCARDBLANKPAGES_toString(const TW_UINT16 InfoID)
  1158. {
  1159. const char* text;
  1160. switch(InfoID)
  1161. {
  1162. case TWBP_DISABLE:
  1163. text = "Disable";
  1164. break;
  1165. case TWBP_AUTO:
  1166. text = "Auto";
  1167. break;
  1168. default:
  1169. {
  1170. char * buff = nextTempBuffer();
  1171. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWBP 0x:%04X", InfoID);
  1172. text = buff;
  1173. }
  1174. break;
  1175. }
  1176. return text;
  1177. }
  1178. //////////////////////////////////////////////////////////////////////////////
  1179. // Convert ICAP_BITDEPTHREDUCTION values to String
  1180. const char* convertICAP_BITDEPTHREDUCTION_toString(const TW_UINT16 InfoID)
  1181. {
  1182. const char* text;
  1183. switch(InfoID)
  1184. {
  1185. case TWBR_THRESHOLD:
  1186. text = "Threshold";
  1187. break;
  1188. case TWBR_HALFTONE:
  1189. text = "Halftone";
  1190. break;
  1191. case TWBR_CUSTHALFTONE:
  1192. text = "Custom Halftone";
  1193. break;
  1194. case TWBR_DIFFUSION:
  1195. text = "Diffusion";
  1196. break;
  1197. default:
  1198. {
  1199. char * buff = nextTempBuffer();
  1200. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWBR 0x:%04X", InfoID);
  1201. text = buff;
  1202. }
  1203. break;
  1204. }
  1205. return text;
  1206. }
  1207. //////////////////////////////////////////////////////////////////////////////
  1208. // Convert ICAP_SUPPORTEDBARCODETYPES and TWEI_BARCODETYPE values to String
  1209. const char* convertICAP_SUPPORTEDBARCODETYPES_toString(const TW_UINT16 InfoID)
  1210. {
  1211. const char* text;
  1212. switch(InfoID)
  1213. {
  1214. case TWBT_3OF9:
  1215. text = "3of9";
  1216. break;
  1217. case TWBT_2OF5INTERLEAVED:
  1218. text = "2of5 interleaved";
  1219. break;
  1220. case TWBT_2OF5NONINTERLEAVED:
  1221. text = "2of5 noninterleaved";
  1222. break;
  1223. case TWBT_CODE93:
  1224. text = "code93";
  1225. break;
  1226. case TWBT_CODE128:
  1227. text = "code128";
  1228. break;
  1229. case TWBT_UCC128:
  1230. text = "UCC128";
  1231. break;
  1232. case TWBT_CODABAR:
  1233. text = "Codebar";
  1234. break;
  1235. case TWBT_UPCA:
  1236. text = "UPCA";
  1237. break;
  1238. case TWBT_UPCE:
  1239. text = "UPCE";
  1240. break;
  1241. case TWBT_EAN8:
  1242. text = "EAN8";
  1243. break;
  1244. case TWBT_EAN13:
  1245. text = "EAN13";
  1246. break;
  1247. case TWBT_POSTNET:
  1248. text = "POSTNET";
  1249. break;
  1250. case TWBT_PDF417:
  1251. text = "PDF417";
  1252. break;
  1253. case TWBT_2OF5INDUSTRIAL:
  1254. text = "2of5 industrial";
  1255. break;
  1256. case TWBT_2OF5MATRIX:
  1257. text = "2of5 matrix";
  1258. break;
  1259. case TWBT_2OF5DATALOGIC:
  1260. text = "2of5 datalogic";
  1261. break;
  1262. case TWBT_2OF5IATA:
  1263. text = "2of5 IATA";
  1264. break;
  1265. case TWBT_3OF9FULLASCII:
  1266. text = "3of9 fullASCII";
  1267. break;
  1268. case TWBT_CODABARWITHSTARTSTOP:
  1269. text = "Codabar with start stop";
  1270. break;
  1271. case TWBT_MAXICODE:
  1272. text = "MAXICODE";
  1273. break;
  1274. default:
  1275. {
  1276. char * buff = nextTempBuffer();
  1277. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWBT 0x:%04X", InfoID);
  1278. text = buff;
  1279. }
  1280. break;
  1281. }
  1282. return text;
  1283. }
  1284. //////////////////////////////////////////////////////////////////////////////
  1285. // Convert ICAP_COMPRESSION values to String
  1286. const char* convertICAP_COMPRESSION_toString(const TW_UINT16 _unItem)
  1287. {
  1288. const char* text;
  1289. switch(_unItem)
  1290. {
  1291. case TWCP_NONE:
  1292. text = "None";
  1293. break;
  1294. case TWCP_PACKBITS:
  1295. text = "PACKBITS";
  1296. break;
  1297. case TWCP_GROUP31D:
  1298. text = "GROUP31D";
  1299. break;
  1300. case TWCP_GROUP31DEOL:
  1301. text = "GROUP31DEOL";
  1302. break;
  1303. case TWCP_GROUP32D:
  1304. text = "GROUP32D";
  1305. break;
  1306. case TWCP_GROUP4:
  1307. text = "GROUP4";
  1308. break;
  1309. case TWCP_JPEG:
  1310. text = "JPEG";
  1311. break;
  1312. case TWCP_LZW:
  1313. text = "LZW";
  1314. break;
  1315. case TWCP_JBIG:
  1316. text = "JBIG";
  1317. break;
  1318. case TWCP_PNG:
  1319. text = "PNG";
  1320. break;
  1321. case TWCP_RLE4:
  1322. text = "RLE4";
  1323. break;
  1324. case TWCP_RLE8:
  1325. text = "RLE8";
  1326. break;
  1327. case TWCP_BITFIELDS:
  1328. text = "BITFIELDS";
  1329. break;
  1330. default:
  1331. {
  1332. char * buff = nextTempBuffer();
  1333. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWCP 0x:%04X", _unItem);
  1334. text = buff;
  1335. }
  1336. break;
  1337. }
  1338. return text;
  1339. }
  1340. //////////////////////////////////////////////////////////////////////////////
  1341. // Convert CAP_CAMERASIDE values to String
  1342. const char* convertCAP_CAMERASIDE_toString(const TW_UINT16 InfoID)
  1343. {
  1344. const char* text;
  1345. switch(InfoID)
  1346. {
  1347. case TWCS_BOTH:
  1348. text = "Both";
  1349. break;
  1350. case TWCS_TOP:
  1351. text = "Top";
  1352. break;
  1353. case TWCS_BOTTOM:
  1354. text = "Bottom";
  1355. break;
  1356. default:
  1357. {
  1358. char * buff = nextTempBuffer();
  1359. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWCS 0x:%04X", InfoID);
  1360. text = buff;
  1361. }
  1362. break;
  1363. }
  1364. return text;
  1365. }
  1366. //////////////////////////////////////////////////////////////////////////////
  1367. // Convert TWEI_PAGESIDE values to String
  1368. const char* convertTWEI_PAGESIDE_toString(const TW_UINT16 InfoID)
  1369. {
  1370. const char* text;
  1371. switch(InfoID)
  1372. {
  1373. case TWCS_TOP:
  1374. text = "TWCS_TOP";
  1375. break;
  1376. case TWCS_BOTTOM:
  1377. text = "TWCS_BOTTOM";
  1378. break;
  1379. default:
  1380. {
  1381. char * buff = nextTempBuffer();
  1382. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWCS 0x:%04X", InfoID);
  1383. text = buff;
  1384. }
  1385. break;
  1386. }
  1387. return text;
  1388. }
  1389. //////////////////////////////////////////////////////////////////////////////
  1390. // Convert CAP_CLEARBUFFERS values to String
  1391. const char* convertCAP_CLEARBUFFERS_toString(const TW_UINT16 InfoID)
  1392. {
  1393. const char* text;
  1394. switch(InfoID)
  1395. {
  1396. case TWCB_AUTO:
  1397. text = "Auto";
  1398. break;
  1399. case TWCB_CLEAR:
  1400. text = "Clear";
  1401. break;
  1402. case TWCB_NOCLEAR:
  1403. text = "No Clear";
  1404. break;
  1405. default:
  1406. {
  1407. char * buff = nextTempBuffer();
  1408. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWCB 0x:%04X", InfoID);
  1409. text = buff;
  1410. }
  1411. break;
  1412. }
  1413. return text;
  1414. }
  1415. //////////////////////////////////////////////////////////////////////////////
  1416. // Convert CAP_DEVICEEVENT values to String
  1417. const char* convertCAP_DEVICEEVENT_toString(const TW_UINT16 InfoID)
  1418. {
  1419. const char* text;
  1420. switch(InfoID)
  1421. {
  1422. case TWDE_CUSTOMEVENTS:
  1423. text = "Custom Events";
  1424. break;
  1425. case TWDE_CHECKAUTOMATICCAPTURE:
  1426. text = "Check Automatic Capture";
  1427. break;
  1428. case TWDE_CHECKBATTERY:
  1429. text = "Check Battery";
  1430. break;
  1431. case TWDE_CHECKDEVICEONLINE:
  1432. text = "Check Device Online";
  1433. break;
  1434. case TWDE_CHECKFLASH:
  1435. text = "Check Flash";
  1436. break;
  1437. case TWDE_CHECKPOWERSUPPLY:
  1438. text = "Check Power Supply";
  1439. break;
  1440. case TWDE_CHECKRESOLUTION:
  1441. text = "Check Resolution";
  1442. break;
  1443. case TWDE_DEVICEADDED:
  1444. text = "Device Added";
  1445. break;
  1446. case TWDE_DEVICEOFFLINE:
  1447. text = "Device Offline";
  1448. break;
  1449. case TWDE_DEVICEREADY:
  1450. text = "Device Ready";
  1451. break;
  1452. case TWDE_DEVICEREMOVED:
  1453. text = "Device Removed";
  1454. break;
  1455. case TWDE_IMAGECAPTURED:
  1456. text = "Image Captured";
  1457. break;
  1458. case TWDE_IMAGEDELETED:
  1459. text = "Image Deleted";
  1460. break;
  1461. case TWDE_PAPERDOUBLEFEED:
  1462. text = "Paper Doublefeed";
  1463. break;
  1464. case TWDE_PAPERJAM:
  1465. text = "Paperjam";
  1466. break;
  1467. case TWDE_LAMPFAILURE:
  1468. text = "Lamp Failure";
  1469. break;
  1470. case TWDE_POWERSAVE:
  1471. text = "Power Save";
  1472. break;
  1473. case TWDE_POWERSAVENOTIFY:
  1474. text = "Power Save Notify";
  1475. break;
  1476. default:
  1477. {
  1478. char * buff = nextTempBuffer();
  1479. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWDE 0x:%04X", InfoID);
  1480. text = buff;
  1481. }
  1482. break;
  1483. }
  1484. return text;
  1485. }
  1486. //////////////////////////////////////////////////////////////////////////////
  1487. // Convert TWEI_DESKEWSTATUS values to String
  1488. const char* convertTWEI_DESKEWSTATUS_toString(const TW_UINT16 InfoID)
  1489. {
  1490. const char* text;
  1491. switch(InfoID)
  1492. {
  1493. case TWDSK_SUCCESS:
  1494. text = "TWDSK_SUCCESS";
  1495. break;
  1496. case TWDSK_REPORTONLY:
  1497. text = "TWDSK_REPORTONLY";
  1498. break;
  1499. case TWDSK_FAIL:
  1500. text = "TWDSK_FAIL";
  1501. break;
  1502. case TWDSK_DISABLED:
  1503. text = "TWDSK_DISABLED";
  1504. break;
  1505. default:
  1506. {
  1507. char * buff = nextTempBuffer();
  1508. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWDSK 0x:%04X", InfoID);
  1509. text = buff;
  1510. }
  1511. break;
  1512. }
  1513. return text;
  1514. }
  1515. //////////////////////////////////////////////////////////////////////////////
  1516. // Convert CAP_DUPLEX values to String
  1517. const char* convertCAP_DUPLEX_toString(const TW_UINT16 InfoID)
  1518. {
  1519. const char* text;
  1520. switch(InfoID)
  1521. {
  1522. case TWDX_NONE:
  1523. text = "None";
  1524. break;
  1525. case TWDX_1PASSDUPLEX:
  1526. text = "1 Pass Duplex";
  1527. break;
  1528. case TWDX_2PASSDUPLEX:
  1529. text = "2 Pass Duplex";
  1530. break;
  1531. default:
  1532. {
  1533. char * buff = nextTempBuffer();
  1534. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWDX 0x:%04X", InfoID);
  1535. text = buff;
  1536. }
  1537. break;
  1538. }
  1539. return text;
  1540. }
  1541. //////////////////////////////////////////////////////////////////////////////
  1542. // Convert CAP_FEEDERALIGNMENT values to String
  1543. const char* convertCAP_FEEDERALIGNMENT_toString(const TW_UINT16 InfoID)
  1544. {
  1545. const char* text;
  1546. switch(InfoID)
  1547. {
  1548. case TWFA_NONE:
  1549. text = "None";
  1550. break;
  1551. case TWFA_LEFT:
  1552. text = "Left";
  1553. break;
  1554. case TWFA_CENTER:
  1555. text = "Center";
  1556. break;
  1557. case TWFA_RIGHT:
  1558. text = "Right";
  1559. break;
  1560. default:
  1561. {
  1562. char * buff = nextTempBuffer();
  1563. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWFA 0x:%04X", InfoID);
  1564. text = buff;
  1565. }
  1566. break;
  1567. }
  1568. return text;
  1569. }
  1570. //////////////////////////////////////////////////////////////////////////////
  1571. // Convert ICAP_FEEDERTYPE values to String
  1572. const char* convertICAP_FEEDERTYPE_toString(const TW_UINT16 InfoID)
  1573. {
  1574. const char* text;
  1575. switch(InfoID)
  1576. {
  1577. case TWFE_GENERAL:
  1578. text = "General";
  1579. break;
  1580. case TWFE_PHOTO:
  1581. text = "Photo";
  1582. break;
  1583. default:
  1584. {
  1585. char * buff = nextTempBuffer();
  1586. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWFE 0x:%04X", InfoID);
  1587. text = buff;
  1588. }
  1589. break;
  1590. }
  1591. return text;
  1592. }
  1593. //////////////////////////////////////////////////////////////////////////////
  1594. // Cover ICAP_IMAGEFILEFORMAT values to String
  1595. const char* convertICAP_IMAGEFILEFORMAT_toString(const TW_UINT16 _unItem)
  1596. {
  1597. const char* text;
  1598. switch(_unItem)
  1599. {
  1600. case TWFF_TIFF:
  1601. text = "tiff";
  1602. break;
  1603. case TWFF_PICT:
  1604. text = "pict";
  1605. break;
  1606. case TWFF_BMP:
  1607. text = "bmp";
  1608. break;
  1609. case TWFF_XBM:
  1610. text = "xbm";
  1611. break;
  1612. case TWFF_JFIF:
  1613. text = "jpeg";
  1614. break;
  1615. case TWFF_FPX:
  1616. text = "fpx";
  1617. break;
  1618. case TWFF_TIFFMULTI:
  1619. text = "multi image tiff";
  1620. break;
  1621. case TWFF_PNG:
  1622. text = "png";
  1623. break;
  1624. case TWFF_SPIFF:
  1625. text = "spiff";
  1626. break;
  1627. case TWFF_EXIF:
  1628. text = "exif";
  1629. break;
  1630. case TWFF_PDF:
  1631. text = "PDF";
  1632. break;
  1633. case TWFF_JP2:
  1634. text = "JP2";
  1635. break;
  1636. case TWFF_JPN:
  1637. text = "JPN";
  1638. break;
  1639. case TWFF_JPX:
  1640. text = "JPX";
  1641. break;
  1642. case TWFF_DEJAVU:
  1643. text = "DEJAVU";
  1644. break;
  1645. case TWFF_PDFA:
  1646. text = "PDF-A1";/* 2.0 Adobe PDF/A, Version 1*/
  1647. break;
  1648. case TWFF_PDFA2:
  1649. text = "PDF-A2";/* 2.1 Adobe PDF/A, Version 2*/
  1650. break;
  1651. default:
  1652. {
  1653. char * buff = nextTempBuffer();
  1654. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWFF 0x:%04X", _unItem);
  1655. text = buff;
  1656. }
  1657. break;
  1658. }
  1659. return text;
  1660. }
  1661. //////////////////////////////////////////////////////////////////////////////
  1662. // Cover ICAP_IMAGEFILEFORMAT values to String
  1663. const char* convertICAP_IMAGEFILEFORMAT_toExt(const TW_UINT16 _unItem)
  1664. {
  1665. const char* text;
  1666. switch(_unItem)
  1667. {
  1668. case TWFF_PICT:
  1669. text = ".pict";
  1670. break;
  1671. case TWFF_BMP:
  1672. text = ".bmp";
  1673. break;
  1674. case TWFF_XBM:
  1675. text = ".xbm";
  1676. break;
  1677. case TWFF_JFIF:
  1678. text = ".jpeg";
  1679. break;
  1680. case TWFF_FPX:
  1681. text = ".fpx";
  1682. break;
  1683. case TWFF_TIFF:
  1684. case TWFF_TIFFMULTI:
  1685. text = ".tiff";
  1686. break;
  1687. case TWFF_PNG:
  1688. text = ".png";
  1689. break;
  1690. case TWFF_SPIFF:
  1691. text = ".spiff";
  1692. break;
  1693. case TWFF_EXIF:
  1694. text = ".exif";
  1695. break;
  1696. case TWFF_JP2:
  1697. text = ".jp2";
  1698. break;
  1699. case TWFF_JPN:
  1700. text = ".jpn";
  1701. break;
  1702. case TWFF_JPX:
  1703. text = ".jpx";
  1704. break;
  1705. case TWFF_DEJAVU:
  1706. text = ".dejavu";
  1707. break;
  1708. case TWFF_PDF:
  1709. case TWFF_PDFA:
  1710. case TWFF_PDFA2:
  1711. text = ".pdf";
  1712. break;
  1713. default:
  1714. {
  1715. char * buff = nextTempBuffer();
  1716. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, ".0x:%04X", _unItem);//Unknown TWFF
  1717. text = buff;
  1718. }
  1719. break;
  1720. }
  1721. return text;
  1722. }
  1723. //////////////////////////////////////////////////////////////////////////////
  1724. // Convert ICAP_FLASHUSED2 values to String
  1725. const char* convertICAP_FLASHUSED2_toString(const TW_UINT16 InfoID)
  1726. {
  1727. const char* text;
  1728. switch(InfoID)
  1729. {
  1730. case TWFL_NONE:
  1731. text = "None";
  1732. break;
  1733. case TWFL_OFF:
  1734. text = "Off";
  1735. break;
  1736. case TWFL_ON:
  1737. text = "On";
  1738. break;
  1739. case TWFL_AUTO:
  1740. text = "Auto";
  1741. break;
  1742. case TWFL_REDEYE:
  1743. text = "Redeye";
  1744. break;
  1745. default:
  1746. {
  1747. char * buff = nextTempBuffer();
  1748. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWFL 0x:%04X", InfoID);
  1749. text = buff;
  1750. }
  1751. break;
  1752. }
  1753. return text;
  1754. }
  1755. //////////////////////////////////////////////////////////////////////////////
  1756. // Convert CAP_FEEDERORDER values to String
  1757. const char* convertCAP_FEEDERORDER_toString(const TW_UINT16 InfoID)
  1758. {
  1759. const char* text;
  1760. switch(InfoID)
  1761. {
  1762. case TWFO_FIRSTPAGEFIRST:
  1763. text = "First Page First";
  1764. break;
  1765. case TWFO_LASTPAGEFIRST:
  1766. text = "Last Page First";
  1767. break;
  1768. default:
  1769. {
  1770. char * buff = nextTempBuffer();
  1771. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWFO 0x:%04X", InfoID);
  1772. text = buff;
  1773. }
  1774. break;
  1775. }
  1776. return text;
  1777. }
  1778. //////////////////////////////////////////////////////////////////////////////
  1779. // Convert CAP_FEEDERPOCKET values to String
  1780. const char* convertCAP_FEEDERPOCKET_toString(const TW_UINT16 InfoID)
  1781. {
  1782. const char* text;
  1783. switch(InfoID)
  1784. {
  1785. case TWFP_POCKETERROR:
  1786. text = "Pocket Error";
  1787. break;
  1788. case TWFP_POCKET1:
  1789. text = "Pocket 1";
  1790. break;
  1791. case TWFP_POCKET2:
  1792. text = "Pocket 2";
  1793. break;
  1794. case TWFP_POCKET3:
  1795. text = "Pocket 3";
  1796. break;
  1797. case TWFP_POCKET4:
  1798. text = "Pocket 4";
  1799. break;
  1800. case TWFP_POCKET5:
  1801. text = "Pocket 5";
  1802. break;
  1803. case TWFP_POCKET6:
  1804. text = "Pocket 6";
  1805. break;
  1806. case TWFP_POCKET7:
  1807. text = "Pocket 7";
  1808. break;
  1809. case TWFP_POCKET8:
  1810. text = "Pocket 8";
  1811. break;
  1812. case TWFP_POCKET9:
  1813. text = "Pocket 9";
  1814. break;
  1815. case TWFP_POCKET10:
  1816. text = "Pocket 10";
  1817. break;
  1818. case TWFP_POCKET11:
  1819. text = "Pocket 11";
  1820. break;
  1821. case TWFP_POCKET12:
  1822. text = "Pocket 12";
  1823. break;
  1824. case TWFP_POCKET13:
  1825. text = "Pocket 13";
  1826. break;
  1827. case TWFP_POCKET14:
  1828. text = "Pocket 14";
  1829. break;
  1830. case TWFP_POCKET15:
  1831. text = "Pocket 15";
  1832. break;
  1833. case TWFP_POCKET16:
  1834. text = "Pocket 16";
  1835. break;
  1836. default:
  1837. {
  1838. char * buff = nextTempBuffer();
  1839. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWFP 0x:%04X", InfoID);
  1840. text = buff;
  1841. }
  1842. break;
  1843. }
  1844. return text;
  1845. }
  1846. //////////////////////////////////////////////////////////////////////////////
  1847. // Convert ICAP_FLIPROTATION values to String
  1848. const char* convertICAP_FLIPROTATION_toString(const TW_UINT16 InfoID)
  1849. {
  1850. const char* text;
  1851. switch(InfoID)
  1852. {
  1853. case TWFR_BOOK:
  1854. text = "Book";
  1855. break;
  1856. case TWFR_FANFOLD:
  1857. text = "Fanfold";
  1858. break;
  1859. default:
  1860. {
  1861. char * buff = nextTempBuffer();
  1862. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWFR 0x:%04X", InfoID);
  1863. text = buff;
  1864. }
  1865. break;
  1866. }
  1867. return text;
  1868. }
  1869. //////////////////////////////////////////////////////////////////////////////
  1870. // Convert ICAP_FILTER values to String
  1871. const char* convertICAP_FILTER_toString(const TW_UINT16 InfoID)
  1872. {
  1873. const char* text;
  1874. switch(InfoID)
  1875. {
  1876. case TWFT_RED:
  1877. text = "Red";
  1878. break;
  1879. case TWFT_GREEN:
  1880. text = "Green";
  1881. break;
  1882. case TWFT_BLUE:
  1883. text = "Blue";
  1884. break;
  1885. case TWFT_NONE:
  1886. text = "None";
  1887. break;
  1888. case TWFT_WHITE:
  1889. text = "White";
  1890. break;
  1891. case TWFT_CYAN:
  1892. text = "Cyan";
  1893. break;
  1894. case TWFT_MAGENTA:
  1895. text = "Magenta";
  1896. break;
  1897. case TWFT_YELLOW:
  1898. text = "Yellow";
  1899. break;
  1900. case TWFT_BLACK:
  1901. text = "Black";
  1902. break;
  1903. default:
  1904. {
  1905. char * buff = nextTempBuffer();
  1906. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWFT 0x:%04X", InfoID);
  1907. text = buff;
  1908. }
  1909. break;
  1910. }
  1911. return text;
  1912. }
  1913. //////////////////////////////////////////////////////////////////////////////
  1914. // Convert TW_FILESYSTEM values to String
  1915. const char* convertTWEI_FILESYSTEM_toString(const TW_UINT16 InfoID)
  1916. {
  1917. const char* text;
  1918. switch(InfoID)
  1919. {
  1920. case TWFY_CAMERA:
  1921. text = "Camera";
  1922. break;
  1923. case TWFY_CAMERATOP:
  1924. text = "Camera Top";
  1925. break;
  1926. case TWFY_CAMERABOTTOM:
  1927. text = "Camera Bottom";
  1928. break;
  1929. case TWFY_CAMERAPREVIEW:
  1930. text = "Camera Preview";
  1931. break;
  1932. case TWFY_DOMAIN:
  1933. text = "Domain";
  1934. break;
  1935. case TWFY_HOST:
  1936. text = "Host";
  1937. break;
  1938. case TWFY_DIRECTORY:
  1939. text = "Directory";
  1940. break;
  1941. case TWFY_IMAGE:
  1942. text = "Image";
  1943. break;
  1944. case TWFY_UNKNOWN:
  1945. text = "Unknown";
  1946. break;
  1947. default:
  1948. {
  1949. char * buff = nextTempBuffer();
  1950. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWFY 0x:%04X", InfoID);
  1951. text = buff;
  1952. }
  1953. break;
  1954. }
  1955. return text;
  1956. }
  1957. //////////////////////////////////////////////////////////////////////////////
  1958. // Convert ICAP_ICCPROFILE values to String
  1959. const char* convertICAP_ICCPROFILE_toString(const TW_UINT16 InfoID)
  1960. {
  1961. const char* text;
  1962. switch(InfoID)
  1963. {
  1964. case TWIC_NONE:
  1965. text = "None";
  1966. break;
  1967. case TWIC_LINK:
  1968. text = "Link";
  1969. break;
  1970. case TWIC_EMBED:
  1971. text = "Embed";
  1972. break;
  1973. default:
  1974. {
  1975. char * buff = nextTempBuffer();
  1976. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWIC 0x:%04X", InfoID);
  1977. text = buff;
  1978. }
  1979. break;
  1980. }
  1981. return text;
  1982. }
  1983. //////////////////////////////////////////////////////////////////////////////
  1984. // Convert ICAP_IMAGEFILTER values to String
  1985. const char* convertICAP_IMAGEFILTER_toString(const TW_UINT16 InfoID)
  1986. {
  1987. const char* text;
  1988. switch(InfoID)
  1989. {
  1990. case TWIF_NONE:
  1991. text = "None";
  1992. break;
  1993. case TWIF_AUTO:
  1994. text = "Auto";
  1995. break;
  1996. case TWIF_LOWPASS:
  1997. text = "Low Pass";
  1998. break;
  1999. case TWIF_BANDPASS:
  2000. text = "Band Pass";
  2001. break;
  2002. case TWIF_HIGHPASS:
  2003. text = "High Pass";
  2004. break;
  2005. default:
  2006. {
  2007. char * buff = nextTempBuffer();
  2008. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWIF 0x:%04X", InfoID);
  2009. text = buff;
  2010. }
  2011. break;
  2012. }
  2013. return text;
  2014. }
  2015. //////////////////////////////////////////////////////////////////////////////
  2016. // Convert ICAP_IMAGEMERGE values to String
  2017. const char* convertICAP_IMAGEMERGE_toString(const TW_UINT16 InfoID)
  2018. {
  2019. const char* text;
  2020. switch(InfoID)
  2021. {
  2022. case TWIM_NONE:
  2023. text = "None";
  2024. break;
  2025. case TWIM_FRONTONTOP:
  2026. text = "Front on Top";
  2027. break;
  2028. case TWIM_FRONTONBOTTOM:
  2029. text = "Front on Bottom";
  2030. break;
  2031. case TWIM_FRONTONLEFT:
  2032. text = "Front on Left";
  2033. break;
  2034. case TWIM_FRONTONRIGHT:
  2035. text = "Front on Right";
  2036. break;
  2037. default:
  2038. {
  2039. char * buff = nextTempBuffer();
  2040. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWIM 0x:%04X", InfoID);
  2041. text = buff;
  2042. }
  2043. break;
  2044. }
  2045. return text;
  2046. }
  2047. //////////////////////////////////////////////////////////////////////////////
  2048. // Convert CAP_JOBCONTROL values to String
  2049. const char* convertCAP_JOBCONTROL_toString(const TW_UINT16 InfoID)
  2050. {
  2051. const char* text;
  2052. switch(InfoID)
  2053. {
  2054. case TWJC_NONE:
  2055. text = "None";
  2056. break;
  2057. case TWJC_JSIC:
  2058. text = "JSIC";
  2059. break;
  2060. case TWJC_JSIS:
  2061. text = "JSIS";
  2062. break;
  2063. case TWJC_JSXC:
  2064. text = "JSXC";
  2065. break;
  2066. case TWJC_JSXS:
  2067. text = "JSXS";
  2068. break;
  2069. default:
  2070. {
  2071. char * buff = nextTempBuffer();
  2072. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWJC 0x:%04X", InfoID);
  2073. text = buff;
  2074. }
  2075. break;
  2076. }
  2077. return text;
  2078. }
  2079. //////////////////////////////////////////////////////////////////////////////
  2080. // Convert ICAP_JPEGQUALITY values to String
  2081. const char* convertICAP_JPEGQUALITY_toString(const TW_UINT16 InfoID)
  2082. {
  2083. const char* text;
  2084. switch(InfoID)
  2085. {
  2086. case TWJQ_UNKNOWN:
  2087. text = "Unknown";
  2088. break;
  2089. case TWJQ_LOW:
  2090. text = "Low";
  2091. break;
  2092. case TWJQ_MEDIUM:
  2093. text = "Medium";
  2094. break;
  2095. case TWJQ_HIGH:
  2096. text = "High";
  2097. break;
  2098. default:
  2099. {
  2100. char * buff = nextTempBuffer();
  2101. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "%d", InfoID);
  2102. text = buff;
  2103. }
  2104. break;
  2105. }
  2106. return text;
  2107. }
  2108. //////////////////////////////////////////////////////////////////////////////
  2109. // Convert ICAP_LIGHTPATH values to String
  2110. const char* convertICAP_LIGHTPATH_toString(const TW_UINT16 InfoID)
  2111. {
  2112. const char* text;
  2113. switch(InfoID)
  2114. {
  2115. case TWLP_REFLECTIVE:
  2116. text = "Reflective";
  2117. break;
  2118. case TWLP_TRANSMISSIVE:
  2119. text = "Transmissive";
  2120. break;
  2121. default:
  2122. {
  2123. char * buff = nextTempBuffer();
  2124. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWLP 0x:%04X", InfoID);
  2125. text = buff;
  2126. }
  2127. break;
  2128. }
  2129. return text;
  2130. }
  2131. //////////////////////////////////////////////////////////////////////////////
  2132. // Convert ICAP_LIGHTSOURCE values to String
  2133. const char* convertICAP_LIGHTSOURCE_toString(const TW_UINT16 InfoID)
  2134. {
  2135. const char* text;
  2136. switch(InfoID)
  2137. {
  2138. case TWLS_RED:
  2139. text = "Red";
  2140. break;
  2141. case TWLS_GREEN:
  2142. text = "Green";
  2143. break;
  2144. case TWLS_BLUE:
  2145. text = "Blue";
  2146. break;
  2147. case TWLS_NONE:
  2148. text = "None";
  2149. break;
  2150. case TWLS_WHITE:
  2151. text = "White";
  2152. break;
  2153. case TWLS_UV:
  2154. text = "UV";
  2155. break;
  2156. case TWLS_IR:
  2157. text = "IR";
  2158. break;
  2159. default:
  2160. {
  2161. char * buff = nextTempBuffer();
  2162. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWLS 0x:%04X", InfoID);
  2163. text = buff;
  2164. }
  2165. break;
  2166. }
  2167. return text;
  2168. }
  2169. //////////////////////////////////////////////////////////////////////////////
  2170. // Convert TWEI_MAGTYPE values to String
  2171. const char* convertTWEI_MAGTYPE_toString(const TW_UINT16 InfoID)
  2172. {
  2173. const char* text;
  2174. switch(InfoID)
  2175. {
  2176. case TWMD_MICR:
  2177. text = "TWMD_MICR";
  2178. break;
  2179. case TWMD_RAW:
  2180. text = "TWMD_RAW";
  2181. break;
  2182. case TWMD_INVALID:
  2183. text = "TWMD_INVALID";
  2184. break;
  2185. default:
  2186. {
  2187. char * buff = nextTempBuffer();
  2188. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWMD 0x:%04X", InfoID);
  2189. text = buff;
  2190. }
  2191. break;
  2192. }
  2193. return text;
  2194. }
  2195. //////////////////////////////////////////////////////////////////////////////
  2196. // Convert ICAP_NOISEFILTER values to String
  2197. const char* convertICAP_NOISEFILTER_toString(const TW_UINT16 InfoID)
  2198. {
  2199. const char* text;
  2200. switch(InfoID)
  2201. {
  2202. case TWNF_NONE:
  2203. text = "None";
  2204. break;
  2205. case TWNF_AUTO:
  2206. text = "Auto";
  2207. break;
  2208. case TWNF_LONEPIXEL:
  2209. text = "Low Pixel";
  2210. break;
  2211. case TWNF_MAJORITYRULE:
  2212. text = "Majoriry Rule";
  2213. break;
  2214. default:
  2215. {
  2216. char * buff = nextTempBuffer();
  2217. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWNF 0x:%04X", InfoID);
  2218. text = buff;
  2219. }
  2220. break;
  2221. }
  2222. return text;
  2223. }
  2224. //////////////////////////////////////////////////////////////////////////////
  2225. // Convert ICAP_ORIENTATION values to String
  2226. const char* convertICAP_ORIENTATION_toString(const TW_UINT16 InfoID)
  2227. {
  2228. const char* text;
  2229. switch(InfoID)
  2230. {
  2231. // case TWOR_ROT0:
  2232. // text = "";
  2233. // break;
  2234. case TWOR_ROT90:
  2235. text = "Orientation 90";
  2236. break;
  2237. case TWOR_ROT180:
  2238. text = "Orientation 180";
  2239. break;
  2240. // case TWOR_ROT270:
  2241. // text = "";
  2242. // break;
  2243. case TWOR_PORTRAIT:
  2244. text = "Portrait";
  2245. break;
  2246. case TWOR_LANDSCAPE:
  2247. text = "Landscape";
  2248. break;
  2249. case TWOR_AUTO:
  2250. text = "Auto";
  2251. break;
  2252. case TWOR_AUTOTEXT:
  2253. text = "Auto Text";
  2254. break;
  2255. case TWOR_AUTOPICTURE:
  2256. text = "Auto Picture";
  2257. break;
  2258. default:
  2259. {
  2260. char * buff = nextTempBuffer();
  2261. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWOR 0x:%04X", InfoID);
  2262. text = buff;
  2263. }
  2264. break;
  2265. }
  2266. return text;
  2267. }
  2268. //////////////////////////////////////////////////////////////////////////////
  2269. // Convert ICAP_OVERSCAN values to String
  2270. const char* convertICAP_OVERSCAN_toString(const TW_UINT16 InfoID)
  2271. {
  2272. const char* text;
  2273. switch(InfoID)
  2274. {
  2275. case TWOV_NONE:
  2276. text = "None";
  2277. break;
  2278. case TWOV_AUTO:
  2279. text = "Auto";
  2280. break;
  2281. case TWOV_TOPBOTTOM:
  2282. text = "Top Bottom";
  2283. break;
  2284. case TWOV_LEFTRIGHT:
  2285. text = "Left Right";
  2286. break;
  2287. case TWOV_ALL:
  2288. text = "All";
  2289. break;
  2290. default:
  2291. {
  2292. char * buff = nextTempBuffer();
  2293. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWOV 0x:%04X", InfoID);
  2294. text = buff;
  2295. }
  2296. break;
  2297. }
  2298. return text;
  2299. }
  2300. //////////////////////////////////////////////////////////////////////////////
  2301. // Convert ICAP_PLANARCHUNKY values to String
  2302. const char* convertICAP_PLANARCHUNKY_toString(const TW_UINT16 InfoID)
  2303. {
  2304. const char* text;
  2305. switch(InfoID)
  2306. {
  2307. case TWPC_CHUNKY:
  2308. text = "Chunky";
  2309. break;
  2310. case TWPC_PLANAR:
  2311. text = "Planar";
  2312. break;
  2313. default:
  2314. {
  2315. char * buff = nextTempBuffer();
  2316. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWPC 0x:%04X", InfoID);
  2317. text = buff;
  2318. }
  2319. break;
  2320. }
  2321. return text;
  2322. }
  2323. //////////////////////////////////////////////////////////////////////////////
  2324. // Convert TWEI_PATCHCODE values to String
  2325. const char* convertTWEI_PATCHCODE_toString(const TW_UINT16 InfoID)
  2326. {
  2327. const char* text;
  2328. switch(InfoID)
  2329. {
  2330. case TWPCH_PATCH1:
  2331. text = "TWPCH_PATCH1";
  2332. break;
  2333. case TWPCH_PATCH2:
  2334. text = "TWPCH_PATCH2";
  2335. break;
  2336. case TWPCH_PATCH3:
  2337. text = "TWPCH_PATCH3";
  2338. break;
  2339. case TWPCH_PATCH4:
  2340. text = "TWPCH_PATCH4";
  2341. break;
  2342. case TWPCH_PATCH6:
  2343. text = "TWPCH_PATCH6";
  2344. break;
  2345. case TWPCH_PATCHT:
  2346. text = "TWPCH_PATCHT";
  2347. break;
  2348. default:
  2349. {
  2350. char * buff = nextTempBuffer();
  2351. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWPCH 0x:%04X", InfoID);
  2352. text = buff;
  2353. }
  2354. break;
  2355. }
  2356. return text;
  2357. }
  2358. //////////////////////////////////////////////////////////////////////////////
  2359. // Convert ICAP_PIXELFLAVOR values to String
  2360. const char* convertICAP_PIXELFLAVOR_toString(const TW_UINT16 _unItem)
  2361. {
  2362. const char* text;
  2363. switch(_unItem)
  2364. {
  2365. case TWPF_CHOCOLATE:
  2366. text = "Chocolate";
  2367. break;
  2368. case TWPF_VANILLA:
  2369. text = "Vanilla";
  2370. break;
  2371. default:
  2372. {
  2373. char * buff = nextTempBuffer();
  2374. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWPF 0x:%04X", _unItem);
  2375. text = buff;
  2376. }
  2377. break;
  2378. }
  2379. return text;
  2380. }
  2381. //////////////////////////////////////////////////////////////////////////////
  2382. // Convert CAP_PRINTERMODE values to String
  2383. const char* convertCAP_PRINTERMODE_toString(const TW_UINT16 InfoID)
  2384. {
  2385. const char* text;
  2386. switch(InfoID)
  2387. {
  2388. case TWPM_SINGLESTRING:
  2389. text = "Single String";
  2390. break;
  2391. case TWPM_MULTISTRING:
  2392. text = "Multi String";
  2393. break;
  2394. case TWPM_COMPOUNDSTRING:
  2395. text = "Compound String";
  2396. break;
  2397. default:
  2398. {
  2399. char * buff = nextTempBuffer();
  2400. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWPM 0x:%04X", InfoID);
  2401. text = buff;
  2402. }
  2403. break;
  2404. }
  2405. return text;
  2406. }
  2407. //////////////////////////////////////////////////////////////////////////////
  2408. // Convert CAP_PRINTER values to String
  2409. const char* convertCAP_PRINTER_toString(const TW_UINT16 InfoID)
  2410. {
  2411. const char* text;
  2412. switch(InfoID)
  2413. {
  2414. case TWPR_IMPRINTERTOPBEFORE:
  2415. text = "Imprinter Top Before";
  2416. break;
  2417. case TWPR_IMPRINTERTOPAFTER:
  2418. text = "Imprinter Top After";
  2419. break;
  2420. case TWPR_IMPRINTERBOTTOMBEFORE:
  2421. text = "Imprinter Bottom Before";
  2422. break;
  2423. case TWPR_IMPRINTERBOTTOMAFTER:
  2424. text = "Imprinter Bottom After";
  2425. break;
  2426. case TWPR_ENDORSERTOPBEFORE:
  2427. text = "Endorser Top Before";
  2428. break;
  2429. case TWPR_ENDORSERTOPAFTER:
  2430. text = "Endorser Top After";
  2431. break;
  2432. case TWPR_ENDORSERBOTTOMBEFORE:
  2433. text = "Endorser Bottom Before";
  2434. break;
  2435. case TWPR_ENDORSERBOTTOMAFTER:
  2436. text = "Endorser Bottom After";
  2437. break;
  2438. default:
  2439. {
  2440. char * buff = nextTempBuffer();
  2441. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWPR 0x:%04X", InfoID);
  2442. text = buff;
  2443. }
  2444. break;
  2445. }
  2446. return text;
  2447. }
  2448. //////////////////////////////////////////////////////////////////////////////
  2449. // Convert CAP_POWERSUPPLY values to String
  2450. const char* convertCAP_POWERSUPPLY_toString(const TW_UINT16 InfoID)
  2451. {
  2452. const char* text;
  2453. switch(InfoID)
  2454. {
  2455. case TWPS_EXTERNAL:
  2456. text = "External";
  2457. break;
  2458. case TWPS_BATTERY:
  2459. text = "Battery";
  2460. break;
  2461. default:
  2462. {
  2463. char * buff = nextTempBuffer();
  2464. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWPS 0x:%04X", InfoID);
  2465. text = buff;
  2466. }
  2467. break;
  2468. }
  2469. return text;
  2470. }
  2471. //////////////////////////////////////////////////////////////////////////////
  2472. // Convert ICAP_PIXELTYPE values to String
  2473. const char* convertICAP_PIXELTYPE_toString(const TW_UINT16 _unItem)
  2474. {
  2475. const char* text;
  2476. switch(_unItem)
  2477. {
  2478. case TWPT_BW:
  2479. text = "BW";
  2480. break;
  2481. case TWPT_GRAY:
  2482. text = "GRAY";
  2483. break;
  2484. case TWPT_RGB:
  2485. text = "RGB";
  2486. break;
  2487. case TWPT_PALETTE:
  2488. text = "PALETTE";
  2489. break;
  2490. case TWPT_CMY:
  2491. text = "CMY";
  2492. break;
  2493. case TWPT_CMYK:
  2494. text = "CMYK";
  2495. break;
  2496. case TWPT_YUV:
  2497. text = "YUV";
  2498. break;
  2499. case TWPT_YUVK:
  2500. text = "YUVK";
  2501. break;
  2502. case TWPT_CIEXYZ:
  2503. text = "CIEXYZ";
  2504. break;
  2505. default:
  2506. {
  2507. char * buff = nextTempBuffer();
  2508. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWPT 0x:%04X", _unItem);
  2509. text = buff;
  2510. }
  2511. break;
  2512. }
  2513. return text;
  2514. }
  2515. //////////////////////////////////////////////////////////////////////////////
  2516. // Convert CAP_SEGMENTED values to String
  2517. const char* convertCAP_SEGMENTED_toString(const TW_UINT16 InfoID)
  2518. {
  2519. const char* text;
  2520. switch(InfoID)
  2521. {
  2522. case TWSG_NONE:
  2523. text = "None";
  2524. break;
  2525. case TWSG_AUTO:
  2526. text = "Auto";
  2527. break;
  2528. default:
  2529. {
  2530. char * buff = nextTempBuffer();
  2531. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWSG 0x:%04X", InfoID);
  2532. text = buff;
  2533. }
  2534. break;
  2535. }
  2536. return text;
  2537. }
  2538. //////////////////////////////////////////////////////////////////////////////
  2539. // Convert ICAP_SUPPORTEDSIZES values to String
  2540. const char* convertICAP_SUPPORTEDSIZES_toString(const TW_UINT16 InfoID)
  2541. {
  2542. const char* text;
  2543. switch(InfoID)
  2544. {
  2545. case TWSS_NONE:
  2546. text = "None";
  2547. break;
  2548. case TWSS_A4:
  2549. text = "A4";
  2550. break;
  2551. case TWSS_JISB5:
  2552. text = "JIS B5";
  2553. break;
  2554. case TWSS_USLETTER:
  2555. text = "US Letter";
  2556. break;
  2557. case TWSS_USLEGAL:
  2558. text = "US Legal";
  2559. break;
  2560. case TWSS_A5:
  2561. text = "A5";
  2562. break;
  2563. case TWSS_ISOB4:
  2564. text = "ISO B4";
  2565. break;
  2566. case TWSS_ISOB6:
  2567. text = "ISO B6";
  2568. break;
  2569. case TWSS_USLEDGER:
  2570. text = "US Ledger";
  2571. break;
  2572. case TWSS_USEXECUTIVE:
  2573. text = "US Executive";
  2574. break;
  2575. case TWSS_A3:
  2576. text = "A3";
  2577. break;
  2578. case TWSS_ISOB3:
  2579. text = "ISO B3";
  2580. break;
  2581. case TWSS_A6:
  2582. text = "A6";
  2583. break;
  2584. case TWSS_C4:
  2585. text = "C4";
  2586. break;
  2587. case TWSS_C5:
  2588. text = "C5";
  2589. break;
  2590. case TWSS_C6:
  2591. text = "C6";
  2592. break;
  2593. case TWSS_4A0:
  2594. text = "4A0";
  2595. break;
  2596. case TWSS_2A0:
  2597. text = "2A0";
  2598. break;
  2599. case TWSS_A0:
  2600. text = "A0";
  2601. break;
  2602. case TWSS_A1:
  2603. text = "A1";
  2604. break;
  2605. case TWSS_A2:
  2606. text = "A2";
  2607. break;
  2608. case TWSS_A7:
  2609. text = "A7";
  2610. break;
  2611. case TWSS_A8:
  2612. text = "A8";
  2613. break;
  2614. case TWSS_A9:
  2615. text = "A9";
  2616. break;
  2617. case TWSS_A10:
  2618. text = "A10";
  2619. break;
  2620. case TWSS_ISOB0:
  2621. text = "ISO B0";
  2622. break;
  2623. case TWSS_ISOB1:
  2624. text = "ISO B1";
  2625. break;
  2626. case TWSS_ISOB2:
  2627. text = "ISO B2";
  2628. break;
  2629. case TWSS_ISOB5:
  2630. text = "ISO B5";
  2631. break;
  2632. case TWSS_ISOB7:
  2633. text = "ISO B7";
  2634. break;
  2635. case TWSS_ISOB8:
  2636. text = "ISO B8";
  2637. break;
  2638. case TWSS_ISOB9:
  2639. text = "ISO B9";
  2640. break;
  2641. case TWSS_ISOB10:
  2642. text = "ISO B10";
  2643. break;
  2644. case TWSS_JISB0:
  2645. text = "JIS B0";
  2646. break;
  2647. case TWSS_JISB1:
  2648. text = "JIS B1";
  2649. break;
  2650. case TWSS_JISB2:
  2651. text = "JIS B2";
  2652. break;
  2653. case TWSS_JISB3:
  2654. text = "JIS B3";
  2655. break;
  2656. case TWSS_JISB4:
  2657. text = "JIS B4";
  2658. break;
  2659. case TWSS_JISB6:
  2660. text = "JIS B6";
  2661. break;
  2662. case TWSS_JISB7:
  2663. text = "JIS B7";
  2664. break;
  2665. case TWSS_JISB8:
  2666. text = "JIS B8";
  2667. break;
  2668. case TWSS_JISB9:
  2669. text = "JIS B9";
  2670. break;
  2671. case TWSS_JISB10:
  2672. text = "JIS B10";
  2673. break;
  2674. case TWSS_C0:
  2675. text = "C0";
  2676. break;
  2677. case TWSS_C1:
  2678. text = "C1";
  2679. break;
  2680. case TWSS_C2:
  2681. text = "C2";
  2682. break;
  2683. case TWSS_C3:
  2684. text = "C3";
  2685. break;
  2686. case TWSS_C7:
  2687. text = "C7";
  2688. break;
  2689. case TWSS_C8:
  2690. text = "C8";
  2691. break;
  2692. case TWSS_C9:
  2693. text = "C9";
  2694. break;
  2695. case TWSS_C10:
  2696. text = "C10";
  2697. break;
  2698. case TWSS_USSTATEMENT:
  2699. text = "US Statement";
  2700. break;
  2701. case TWSS_BUSINESSCARD:
  2702. text = "Business Card";
  2703. break;
  2704. case TWSS_MAXSIZE:
  2705. text = "MAX size";
  2706. break;
  2707. default:
  2708. {
  2709. char * buff = nextTempBuffer();
  2710. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWSS 0x:%04X", InfoID);
  2711. text = buff;
  2712. }
  2713. break;
  2714. }
  2715. return text;
  2716. }
  2717. //////////////////////////////////////////////////////////////////////////////
  2718. // Covert ICAP_XFERMECH values to String
  2719. const char* convertICAP_XFERMECH_toString(const TW_UINT16 _unItem)
  2720. {
  2721. const char* text;
  2722. switch(_unItem)
  2723. {
  2724. case TWSX_NATIVE:
  2725. text = "Native";
  2726. break;
  2727. case TWSX_FILE:
  2728. text = "File";
  2729. break;
  2730. case TWSX_MEMORY:
  2731. text = "Memory";
  2732. break;
  2733. case TWSX_MEMFILE:
  2734. text = "Memory of File";
  2735. break;
  2736. default:
  2737. {
  2738. char * buff = nextTempBuffer();
  2739. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWSX 0x:%04X", _unItem);
  2740. text = buff;
  2741. }
  2742. break;
  2743. }
  2744. return text;
  2745. }
  2746. //////////////////////////////////////////////////////////////////////////////
  2747. // Covert ICAP_UNITS values to String
  2748. const char* convertICAP_UNITS_toString(const TW_UINT16 _unItem)
  2749. {
  2750. const char* text;
  2751. switch(_unItem)
  2752. {
  2753. case TWUN_INCHES:
  2754. text = "Inches";
  2755. break;
  2756. case TWUN_CENTIMETERS:
  2757. text = "Centimeters";
  2758. break;
  2759. case TWUN_PICAS:
  2760. text = "Picas";
  2761. break;
  2762. case TWUN_POINTS:
  2763. text = "Points";
  2764. break;
  2765. case TWUN_TWIPS:
  2766. text = "Twips";
  2767. break;
  2768. case TWUN_PIXELS:
  2769. text = "Pixels";
  2770. break;
  2771. case TWUN_MILLIMETERS:
  2772. text = "Millimeters";
  2773. break;
  2774. default:
  2775. {
  2776. char * buff = nextTempBuffer();
  2777. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unknown TWUN 0x:%04X", _unItem);
  2778. text = buff;
  2779. }
  2780. break;
  2781. }
  2782. return text;
  2783. }
  2784. const char* convertExtImageInfoItem_toString(const TW_INFO &ImgInfo)
  2785. {
  2786. char * buff = nextTempBuffer();
  2787. if(TWRC_SUCCESS == ImgInfo.ReturnCode)
  2788. {
  2789. switch(ImgInfo.ItemType)
  2790. {
  2791. case TWTY_INT8:
  2792. case TWTY_INT16:
  2793. case TWTY_INT32:
  2794. case TWTY_UINT8:
  2795. case TWTY_UINT32:
  2796. case TWTY_UINT16:
  2797. case TWTY_BOOL:
  2798. // If the size of the data is larger than 4 bytes (regardless of 32bit or 64bit OS) then the data
  2799. // is no longer an array of data but a handle to the data.
  2800. // If the data does fit inside then it is possible to have an array of data.
  2801. if(getTWTYsize(ImgInfo.ItemType)*ImgInfo.NumItems <= sizeof(TW_UINT32))
  2802. {
  2803. char *pTemp = buff;
  2804. const char *pItem = NULL;
  2805. int TempSize = TEMPBUFSIZE;
  2806. for( int nItem=0; nItem<ImgInfo.NumItems; nItem++)
  2807. {
  2808. switch(ImgInfo.ItemType)
  2809. {
  2810. case TWTY_INT8:
  2811. SSNPRINTF(pTemp, TempSize, TempSize, "%d ", ((TW_INT8*)&ImgInfo.Item)[nItem]);
  2812. break;
  2813. case TWTY_INT16:
  2814. SSNPRINTF(pTemp, TempSize, TempSize, "%d ", ((TW_INT16*)&ImgInfo.Item)[nItem]);
  2815. break;
  2816. case TWTY_INT32:
  2817. SSNPRINTF(pTemp, TempSize, TempSize, "%d ", ((TW_INT32*)&ImgInfo.Item)[nItem]);
  2818. break;
  2819. case TWTY_UINT8:
  2820. SSNPRINTF(pTemp, TempSize, TempSize, "%u ", ((TW_UINT8*)&ImgInfo.Item)[nItem]);
  2821. break;
  2822. case TWTY_UINT32:
  2823. pItem = convertEI_Item_toString(ImgInfo.InfoID, ((TW_UINT32*)&ImgInfo.Item)[nItem]);
  2824. if(pItem)
  2825. {
  2826. SSNPRINTF(pTemp, TempSize, TempSize, "%s ", pItem);
  2827. }
  2828. else
  2829. {
  2830. SSNPRINTF(pTemp, TempSize, TempSize, "%u ", ((TW_UINT32*)&ImgInfo.Item)[nItem]);
  2831. }
  2832. break;
  2833. case TWTY_UINT16:
  2834. pItem = convertEI_Item_toString(ImgInfo.InfoID, ((TW_UINT16*)&ImgInfo.Item)[nItem]);
  2835. if(pItem)
  2836. {
  2837. SSNPRINTF(pTemp, TempSize, TempSize, "%s ", pItem);
  2838. }
  2839. else
  2840. {
  2841. SSNPRINTF(pTemp, TempSize, TempSize, "%u ", ((TW_UINT16*)&ImgInfo.Item)[nItem]);
  2842. }
  2843. break;
  2844. case TWTY_BOOL:
  2845. SSNPRINTF(pTemp, TempSize, TempSize, "%s ", ((TW_BOOL*)&ImgInfo.Item)[nItem]? "True" : "False");
  2846. break;
  2847. }
  2848. TempSize -= (int)strlen(pTemp);
  2849. pTemp += strlen(pTemp);
  2850. if(TempSize <= 0)
  2851. {
  2852. break;
  2853. }
  2854. }
  2855. }
  2856. else
  2857. {
  2858. //Did not fit into the INT32
  2859. char *pTemp = buff;
  2860. const char *pItem = NULL;
  2861. int TempSize = TEMPBUFSIZE;
  2862. BYTE * pBData = (BYTE *)_DSM_LockMemory((TW_HANDLE)ImgInfo.Item);
  2863. for( int nItem=0; nItem<ImgInfo.NumItems; nItem++)
  2864. {
  2865. switch(ImgInfo.ItemType)
  2866. {
  2867. case TWTY_INT8:
  2868. SSNPRINTF(pTemp, TempSize, TempSize, "%d ", ((TW_INT8*)pBData)[nItem]);
  2869. break;
  2870. case TWTY_INT16:
  2871. SSNPRINTF(pTemp, TempSize, TempSize, "%d ", ((TW_INT16*)pBData)[nItem]);
  2872. break;
  2873. case TWTY_INT32:
  2874. SSNPRINTF(pTemp, TempSize, TempSize, "%d ", ((TW_INT32*)pBData)[nItem]);
  2875. break;
  2876. case TWTY_UINT8:
  2877. SSNPRINTF(pTemp, TempSize, TempSize, "%u ", ((TW_UINT8*)pBData)[nItem]);
  2878. break;
  2879. case TWTY_UINT32:
  2880. pItem = convertEI_Item_toString(ImgInfo.InfoID, ((TW_UINT32*)pBData)[nItem]);
  2881. if(pItem)
  2882. {
  2883. SSNPRINTF(pTemp, TempSize, TempSize, "%s ", pItem);
  2884. }
  2885. else
  2886. {
  2887. SSNPRINTF(pTemp, TempSize, TempSize, "%u ", ((TW_UINT32*)pBData)[nItem]);
  2888. }
  2889. break;
  2890. case TWTY_UINT16:
  2891. pItem = convertEI_Item_toString(ImgInfo.InfoID, ((TW_UINT16*)pBData)[nItem]);
  2892. if(pItem)
  2893. {
  2894. SSNPRINTF(pTemp, TempSize, TempSize, "%s ", pItem);
  2895. }
  2896. else
  2897. {
  2898. SSNPRINTF(pTemp, TempSize, TempSize, "%u ", ((TW_UINT16*)pBData)[nItem]);
  2899. }
  2900. break;
  2901. case TWTY_BOOL:
  2902. SSNPRINTF(pTemp, TempSize, TempSize, "%s ", ((TW_BOOL*)pBData)[nItem]? "True" : "False");
  2903. break;
  2904. }
  2905. TempSize -= (int)strlen(pTemp);
  2906. pTemp += strlen(pTemp);
  2907. if(TempSize <= 0)
  2908. {
  2909. break;
  2910. }
  2911. }
  2912. _DSM_UnlockMemory((TW_HANDLE)ImgInfo.Item);
  2913. }
  2914. break;
  2915. case TWTY_STR32:
  2916. case TWTY_STR64:
  2917. case TWTY_STR128:
  2918. case TWTY_STR255:
  2919. case TWTY_STR1024:
  2920. {
  2921. char *chTest = (char *)_DSM_LockMemory((TW_HANDLE)ImgInfo.Item);
  2922. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "%.*s", getTWTYsize(ImgInfo.ItemType), chTest);
  2923. _DSM_UnlockMemory((TW_HANDLE)ImgInfo.Item);
  2924. }
  2925. break;
  2926. case TWTY_HANDLE:
  2927. {
  2928. // Need to look at the item to know how to handle :) this
  2929. // It might be a handle to a string or a handle to a chunk of memory
  2930. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Handle 0x:%8X", (TW_HANDLE)ImgInfo.Item);
  2931. }
  2932. break;
  2933. case TWTY_FRAME:
  2934. {
  2935. TW_FRAME *pFrame = (TW_FRAME *)_DSM_LockMemory((TW_HANDLE)ImgInfo.Item);
  2936. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "%0.2f %.2f %.2f %.2f",
  2937. FIX32ToFloat(pFrame->Left), FIX32ToFloat(pFrame->Top),
  2938. FIX32ToFloat(pFrame->Right), FIX32ToFloat(pFrame->Bottom));
  2939. _DSM_UnlockMemory((TW_HANDLE)ImgInfo.Item);
  2940. }
  2941. break;
  2942. default:
  2943. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unsupporetd Type 0x:%04X", ImgInfo.ItemType);
  2944. break;
  2945. }
  2946. }
  2947. else if(TWRC_INFONOTSUPPORTED == ImgInfo.CondCode)
  2948. {
  2949. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Unsupporetd");
  2950. }
  2951. else if(TWRC_DATANOTAVAILABLE == ImgInfo.CondCode)
  2952. {
  2953. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Data Not Available");
  2954. }
  2955. else
  2956. {
  2957. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "unknown failure %d", ImgInfo.CondCode);
  2958. }
  2959. return buff;
  2960. }
  2961. const char* convertReturnCode_toString(const TW_UINT16 _unItem)
  2962. {
  2963. const char* text;
  2964. switch(_unItem)
  2965. {
  2966. case TWRC_SUCCESS:
  2967. text = "TWRC_SUCCESS";
  2968. break;
  2969. case TWRC_FAILURE:
  2970. text = "TWRC_FAILURE";
  2971. break;
  2972. case TWRC_CHECKSTATUS:
  2973. text = "TWRC_CHECKSTATUS";
  2974. break;
  2975. case TWRC_CANCEL:
  2976. text = "TWRC_CANCEL";
  2977. break;
  2978. case TWRC_DSEVENT:
  2979. text = "TWRC_DSEVENT";
  2980. break;
  2981. case TWRC_NOTDSEVENT:
  2982. text = "TWRC_NOTDSEVENT";
  2983. break;
  2984. case TWRC_XFERDONE:
  2985. text = "TWRC_XFERDONE";
  2986. break;
  2987. case TWRC_ENDOFLIST:
  2988. text = "TWRC_ENDOFLIST";
  2989. break;
  2990. case TWRC_INFONOTSUPPORTED:
  2991. text = "TWRC_INFONOTSUPPORTED";
  2992. break;
  2993. case TWRC_DATANOTAVAILABLE:
  2994. text = "TWRC_DATANOTAVAILABLE";
  2995. break;
  2996. default:
  2997. {
  2998. char * buff = nextTempBuffer();
  2999. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "ReturnCode 0x:%04X",_unItem);
  3000. text = buff;
  3001. }
  3002. break;
  3003. }
  3004. return text;
  3005. }
  3006. const char* convertConditionCode_toString(const TW_UINT16 _unItem)
  3007. {
  3008. const char* text;
  3009. switch(_unItem)
  3010. {
  3011. case TWCC_SUCCESS:
  3012. text = "TWCC_SUCCESS";
  3013. break;
  3014. case TWCC_BUMMER:
  3015. text = "TWCC_BUMMER";
  3016. break;
  3017. case TWCC_LOWMEMORY:
  3018. text = "TWCC_LOWMEMORY";
  3019. break;
  3020. case TWCC_NODS:
  3021. text = "TWCC_NODS";
  3022. break;
  3023. case TWCC_MAXCONNECTIONS:
  3024. text = "TWCC_MAXCONNECTIONS";
  3025. break;
  3026. case TWCC_OPERATIONERROR:
  3027. text = "TWCC_OPERATIONERROR";
  3028. break;
  3029. case TWCC_BADCAP:
  3030. text = "TWCC_BADCAP";
  3031. break;
  3032. case TWCC_BADPROTOCOL:
  3033. text = "TWCC_BADPROTOCOL";
  3034. break;
  3035. case TWCC_BADVALUE:
  3036. text = "TWCC_BADVALUE";
  3037. break;
  3038. case TWCC_SEQERROR:
  3039. text = "TWCC_SEQERROR";
  3040. break;
  3041. case TWCC_BADDEST:
  3042. text = "TWCC_BADDEST";
  3043. break;
  3044. case TWCC_CAPUNSUPPORTED:
  3045. text = "TWCC_CAPUNSUPPORTED";
  3046. break;
  3047. case TWCC_CAPBADOPERATION:
  3048. text = "TWCC_CAPBADOPERATION";
  3049. break;
  3050. case TWCC_CAPSEQERROR:
  3051. text = "TWCC_CAPSEQERROR";
  3052. break;
  3053. case TWCC_DENIED:
  3054. text = "TWCC_DENIED";
  3055. break;
  3056. case TWCC_FILEEXISTS:
  3057. text = "TWCC_FILEEXISTS";
  3058. break;
  3059. case TWCC_FILENOTFOUND:
  3060. text = "TWCC_FILENOTFOUND";
  3061. break;
  3062. case TWCC_NOTEMPTY:
  3063. text = "TWCC_NOTEMPTY";
  3064. break;
  3065. case TWCC_PAPERJAM:
  3066. text = "TWCC_PAPERJAM";
  3067. break;
  3068. case TWCC_PAPERDOUBLEFEED:
  3069. text = "TWCC_PAPERDOUBLEFEED";
  3070. break;
  3071. case TWCC_FILEWRITEERROR:
  3072. text = "TWCC_FILEWRITEERROR";
  3073. break;
  3074. case TWCC_CHECKDEVICEONLINE:
  3075. text = "TWCC_CHECKDEVICEONLINE";
  3076. break;
  3077. case TWCC_INTERLOCK:
  3078. text = "TWCC_INTERLOCK";
  3079. break;
  3080. case TWCC_DAMAGEDCORNER:
  3081. text = "TWCC_DAMAGEDCORNER";
  3082. break;
  3083. case TWCC_FOCUSERROR:
  3084. text = "TWCC_FOCUSERROR";
  3085. break;
  3086. case TWCC_DOCTOOLIGHT:
  3087. text = "TWCC_DOCTOOLIGHT";
  3088. break;
  3089. case TWCC_DOCTOODARK:
  3090. text = "TWCC_DOCTOODARK";
  3091. break;
  3092. case TWCC_NOMEDIA:
  3093. text = "TWCC_NOMEDIA";
  3094. break;
  3095. default:
  3096. {
  3097. char * buff = nextTempBuffer();
  3098. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "ConditionCode 0x:%04X",_unItem);
  3099. text = buff;
  3100. }
  3101. break;
  3102. }
  3103. return text;
  3104. }
  3105. const char* convertMessage_toString(const TW_UINT16 _unItem)
  3106. {
  3107. const char* strRet;
  3108. switch(_unItem)
  3109. {
  3110. case MSG_GET:
  3111. strRet = "MSG_GET";
  3112. break;
  3113. case MSG_GETCURRENT:
  3114. strRet = "MSG_GETCURRENT";
  3115. break;
  3116. case MSG_GETDEFAULT:
  3117. strRet = "MSG_GETDEFAULT";
  3118. break;
  3119. case MSG_GETFIRST:
  3120. strRet = "MSG_GETFIRST";
  3121. break;
  3122. case MSG_GETNEXT:
  3123. strRet = "MSG_GETNEXT";
  3124. break;
  3125. case MSG_SET:
  3126. strRet = "MSG_SET";
  3127. break;
  3128. case MSG_RESET:
  3129. strRet = "MSG_RESET";
  3130. break;
  3131. case MSG_QUERYSUPPORT:
  3132. strRet = "MSG_QUERYSUPPORT";
  3133. break;
  3134. case MSG_GETHELP:
  3135. strRet = "MSG_GETHELP";
  3136. break;
  3137. case MSG_GETLABEL:
  3138. strRet = "MSG_GETLABEL";
  3139. break;
  3140. case MSG_GETLABELENUM:
  3141. strRet = "MSG_GETLABELENUM";
  3142. break;
  3143. case MSG_XFERREADY:
  3144. strRet = "MSG_XFERREADY";
  3145. break;
  3146. case MSG_CLOSEDSREQ:
  3147. strRet = "MSG_CLOSEDSREQ";
  3148. break;
  3149. case MSG_CLOSEDSOK:
  3150. strRet = "MSG_CLOSEDSOK";
  3151. break;
  3152. case MSG_DEVICEEVENT:
  3153. strRet = "MSG_DEVICEEVENT";
  3154. break;
  3155. case MSG_OPENDSM:
  3156. strRet = "MSG_OPENDSM";
  3157. break;
  3158. case MSG_CLOSEDSM:
  3159. strRet = "MSG_CLOSEDSM";
  3160. break;
  3161. case MSG_OPENDS:
  3162. strRet = "MSG_OPENDS";
  3163. break;
  3164. case MSG_CLOSEDS:
  3165. strRet = "MSG_CLOSEDS";
  3166. break;
  3167. case MSG_USERSELECT:
  3168. strRet = "MSG_USERSELECT";
  3169. break;
  3170. case MSG_DISABLEDS:
  3171. strRet = "MSG_DISABLEDS";
  3172. break;
  3173. case MSG_ENABLEDS:
  3174. strRet = "MSG_ENABLEDS";
  3175. break;
  3176. case MSG_ENABLEDSUIONLY:
  3177. strRet = "MSG_ENABLEDSUIONLY";
  3178. break;
  3179. case MSG_PROCESSEVENT:
  3180. strRet = "MSG_PROCESSEVENT";
  3181. break;
  3182. case MSG_ENDXFER:
  3183. strRet = "MSG_ENDXFER";
  3184. break;
  3185. case MSG_STOPFEEDER:
  3186. strRet = "MSG_STOPFEEDER";
  3187. break;
  3188. case MSG_CHANGEDIRECTORY:
  3189. strRet = "MSG_CHANGEDIRECTORY";
  3190. break;
  3191. case MSG_CREATEDIRECTORY:
  3192. strRet = "MSG_CREATEDIRECTORY";
  3193. break;
  3194. case MSG_DELETE:
  3195. strRet = "MSG_DELETE";
  3196. break;
  3197. case MSG_FORMATMEDIA:
  3198. strRet = "MSG_FORMATMEDIA";
  3199. break;
  3200. case MSG_GETCLOSE:
  3201. strRet = "MSG_GETCLOSE";
  3202. break;
  3203. case MSG_GETFIRSTFILE:
  3204. strRet = "MSG_GETFIRSTFILE";
  3205. break;
  3206. case MSG_GETINFO:
  3207. strRet = "MSG_GETINFO";
  3208. break;
  3209. case MSG_GETNEXTFILE:
  3210. strRet = "MSG_GETNEXTFILE";
  3211. break;
  3212. case MSG_RENAME:
  3213. strRet = "MSG_RENAME";
  3214. break;
  3215. case MSG_COPY:
  3216. strRet = "MSG_COPY";
  3217. break;
  3218. case MSG_AUTOMATICCAPTUREDIRECTORY:
  3219. strRet = "MSG_AUTOMATICCAPTUREDIRECTORY";
  3220. break;
  3221. case MSG_PASSTHRU:
  3222. strRet = "MSG_PASSTHRU";
  3223. break;
  3224. case MSG_REGISTER_CALLBACK:
  3225. strRet = "MSG_REGISTER_CALLBACK";
  3226. break;
  3227. case MSG_RESETALL:
  3228. strRet = "MSG_RESETALL";
  3229. break;
  3230. default:
  3231. {
  3232. char * buff = nextTempBuffer();
  3233. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Message 0x:%04X",_unItem);
  3234. strRet = buff;
  3235. }
  3236. break;
  3237. }
  3238. return strRet;
  3239. }
  3240. const char* convertDataGroup_toString(const TW_UINT16 _unItem)
  3241. {
  3242. const char* strRet;
  3243. switch(_unItem)
  3244. {
  3245. case DG_CONTROL:
  3246. strRet = "DG_CONTROL";
  3247. break;
  3248. case DG_IMAGE:
  3249. strRet = "DG_IMAGE";
  3250. break;
  3251. case DG_AUDIO:
  3252. strRet = "DG_AUDIO";
  3253. break;
  3254. default:
  3255. {
  3256. char * buff = nextTempBuffer();
  3257. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "DataGroup 0x:%04X",_unItem);
  3258. strRet = buff;
  3259. }
  3260. break;
  3261. }
  3262. return strRet;
  3263. }
  3264. const char* convertDataArgType_toString(const TW_UINT16 _unItem)
  3265. {
  3266. const char* strRet;
  3267. switch(_unItem)
  3268. {
  3269. case DAT_NULL:
  3270. strRet = "DAT_NULL";
  3271. break;
  3272. case DAT_CAPABILITY:
  3273. strRet = "DAT_CAPABILITY";
  3274. break;
  3275. case DAT_EVENT:
  3276. strRet = "DAT_EVENT";
  3277. break;
  3278. case DAT_IDENTITY:
  3279. strRet = "DAT_IDENTITY";
  3280. break;
  3281. case DAT_PARENT:
  3282. strRet = "DAT_PARENT";
  3283. break;
  3284. case DAT_PENDINGXFERS:
  3285. strRet = "DAT_PENDINGXFERS";
  3286. break;
  3287. case DAT_SETUPMEMXFER:
  3288. strRet = "DAT_SETUPMEMXFER";
  3289. break;
  3290. case DAT_SETUPFILEXFER:
  3291. strRet = "DAT_SETUPFILEXFER";
  3292. break;
  3293. case DAT_STATUS:
  3294. strRet = "DAT_STATUS";
  3295. break;
  3296. case DAT_USERINTERFACE:
  3297. strRet = "DAT_USERINTERFACE";
  3298. break;
  3299. case DAT_XFERGROUP:
  3300. strRet = "DAT_XFERGROUP";
  3301. break;
  3302. case DAT_CUSTOMDSDATA:
  3303. strRet = "DAT_CUSTOMDSDATA";
  3304. break;
  3305. case DAT_DEVICEEVENT:
  3306. strRet = "DAT_DEVICEEVENT";
  3307. break;
  3308. case DAT_FILESYSTEM:
  3309. strRet = "DAT_FILESYSTEM";
  3310. break;
  3311. case DAT_PASSTHRU:
  3312. strRet = "DAT_PASSTHRU";
  3313. break;
  3314. case DAT_CALLBACK:
  3315. strRet = "DAT_CALLBACK";
  3316. break;
  3317. case DAT_STATUSUTF8:
  3318. strRet = "DAT_STATUSUTF8";
  3319. break;
  3320. case DAT_IMAGEINFO:
  3321. strRet = "DAT_IMAGEINFO";
  3322. break;
  3323. case DAT_IMAGELAYOUT:
  3324. strRet = "DAT_IMAGELAYOUT";
  3325. break;
  3326. case DAT_IMAGEMEMXFER:
  3327. strRet = "DAT_IMAGEMEMXFER";
  3328. break;
  3329. case DAT_IMAGENATIVEXFER:
  3330. strRet = "DAT_IMAGENATIVEXFER";
  3331. break;
  3332. case DAT_IMAGEFILEXFER:
  3333. strRet = "DAT_IMAGEFILEXFER";
  3334. break;
  3335. case DAT_CIECOLOR:
  3336. strRet = "DAT_CIECOLOR";
  3337. break;
  3338. case DAT_GRAYRESPONSE:
  3339. strRet = "DAT_GRAYRESPONSE";
  3340. break;
  3341. case DAT_RGBRESPONSE:
  3342. strRet = "DAT_RGBRESPONSE";
  3343. break;
  3344. case DAT_JPEGCOMPRESSION:
  3345. strRet = "DAT_JPEGCOMPRESSION";
  3346. break;
  3347. case DAT_PALETTE8:
  3348. strRet = "DAT_PALETTE8";
  3349. break;
  3350. case DAT_EXTIMAGEINFO:
  3351. strRet = "DAT_EXTIMAGEINFO";
  3352. break;
  3353. case DAT_AUDIOFILEXFER:
  3354. strRet = "DAT_AUDIOFILEXFER";
  3355. break;
  3356. case DAT_AUDIOINFO:
  3357. strRet = "DAT_AUDIOINFO";
  3358. break;
  3359. case DAT_AUDIONATIVEXFER:
  3360. strRet = "DAT_AUDIONATIVEXFER";
  3361. break;
  3362. case DAT_ICCPROFILE:
  3363. strRet = "DAT_ICCPROFILE";
  3364. break;
  3365. case DAT_IMAGEMEMFILEXFER:
  3366. strRet = "DAT_IMAGEMEMFILEXFER";
  3367. break;
  3368. case DAT_ENTRYPOINT:
  3369. strRet = "DAT_ENTRYPOINT";
  3370. break;
  3371. default:
  3372. {
  3373. char * buff = nextTempBuffer();
  3374. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "DataArgumentType 0x:%04X",_unItem);
  3375. strRet = buff;
  3376. }
  3377. break;
  3378. }
  3379. return strRet;
  3380. }
  3381. const char* convertContainerType_toString(const TW_UINT16 _unItem)
  3382. {
  3383. const char* strRet;
  3384. switch(_unItem)
  3385. {
  3386. case TWON_ARRAY:
  3387. strRet = "TWON_ARRAY";
  3388. break;
  3389. case TWON_ENUMERATION:
  3390. strRet = "TWON_ENUMERATION";
  3391. break;
  3392. case TWON_ONEVALUE:
  3393. strRet = "TWON_ONEVALUE";
  3394. break;
  3395. case TWON_RANGE:
  3396. strRet = "TWON_RANGE";
  3397. break;
  3398. default:
  3399. {
  3400. char * buff = nextTempBuffer();
  3401. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "DataArgumentType 0x:%04X",_unItem);
  3402. strRet = buff;
  3403. }
  3404. break;
  3405. }
  3406. return strRet;
  3407. }
  3408. const char* convertQuerySupport_toString(const TW_UINT32 _unItem)
  3409. {
  3410. const char* strRet = NULL;
  3411. string strVal;
  3412. if(_unItem&TWQC_GET)
  3413. {
  3414. strVal+="TWQC_GET";
  3415. }
  3416. if(_unItem&TWQC_SET)
  3417. {
  3418. if(strVal.length())
  3419. {
  3420. strVal+="|";
  3421. }
  3422. strVal+="TWQC_SET";
  3423. }
  3424. if(_unItem&TWQC_GETDEFAULT)
  3425. {
  3426. if(strVal.length())
  3427. {
  3428. strVal+="|";
  3429. }
  3430. strVal+="TWQC_GETDEFAULT";
  3431. }
  3432. if(_unItem&TWQC_GETCURRENT)
  3433. {
  3434. if(strVal.length())
  3435. {
  3436. strVal+="|";
  3437. }
  3438. strVal+="TWQC_GETCURRENT";
  3439. }
  3440. if(_unItem&TWQC_RESET)
  3441. {
  3442. if(strVal.length())
  3443. {
  3444. strVal+="|";
  3445. }
  3446. strVal+="TWQC_RESET";
  3447. }
  3448. if(strVal.length())
  3449. {
  3450. char * buff = nextTempBuffer();
  3451. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "%s",strVal.c_str());
  3452. strRet = buff;
  3453. }
  3454. if(NULL==strRet)
  3455. {
  3456. strRet = "NONE";
  3457. }
  3458. return strRet;
  3459. }
  3460. const char* convertFileFmt_toExtension(const TW_UINT16 _unItem)
  3461. {
  3462. const char* strRet = NULL;
  3463. switch(_unItem)
  3464. {
  3465. case TWFF_PICT:
  3466. strRet = "pct";
  3467. break;
  3468. case TWFF_BMP:
  3469. strRet = "bmp";
  3470. break;
  3471. case TWFF_XBM:
  3472. strRet = "xbm";
  3473. break;
  3474. case TWFF_JFIF:
  3475. strRet = "jpg";
  3476. break;
  3477. case TWFF_FPX:
  3478. strRet = "fpx";
  3479. break;
  3480. case TWFF_TIFF:
  3481. case TWFF_TIFFMULTI:
  3482. strRet = "tif";
  3483. break;
  3484. case TWFF_PNG:
  3485. strRet = "png";
  3486. break;
  3487. case TWFF_SPIFF:
  3488. strRet = "spf";
  3489. break;
  3490. case TWFF_EXIF:
  3491. strRet = "xif";
  3492. break;
  3493. case TWFF_JP2:
  3494. strRet = "jp2";
  3495. break;
  3496. case TWFF_JPX:
  3497. strRet = "jpx";
  3498. break;
  3499. case TWFF_DEJAVU:
  3500. strRet = "djv";
  3501. break;
  3502. case TWFF_PDF:
  3503. case TWFF_PDFA:
  3504. case TWFF_PDFA2:
  3505. strRet = "pdf";
  3506. break;
  3507. default:
  3508. strRet = "bin";
  3509. break;
  3510. }
  3511. return strRet;
  3512. }
  3513. const char *CapabilityValueToString(TW_UINT16 twCapId, TW_UINT16 twItemType, const void *pValue)
  3514. {
  3515. const char *strRet = NULL;
  3516. //Setup various pointers for later
  3517. const TW_FRAME *pFrame = static_cast<const TW_FRAME *>(pValue);
  3518. const TW_FIX32 *pFix32 = static_cast<const TW_FIX32 *>(pValue);
  3519. const TW_UINT16 *pUint16 = static_cast<const TW_UINT16 *>(pValue);
  3520. const TW_UINT32 *pUint32 = static_cast<const TW_UINT32 *>(pValue);
  3521. const TW_INT16 *pInt16 = static_cast<const TW_INT16 *>(pValue);
  3522. const TW_BOOL *pBool = static_cast<const TW_BOOL *>(pValue);
  3523. const char *pStr = static_cast<const char *>(pValue);
  3524. //knock-out some standards first
  3525. switch(twItemType)
  3526. {
  3527. case TWTY_INT16:
  3528. {
  3529. char * buff = nextTempBuffer();
  3530. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "%d", *pInt16);
  3531. strRet = buff;
  3532. }
  3533. break;
  3534. case TWTY_BOOL:
  3535. strRet = *pBool?"TRUE":"FALSE";
  3536. break;
  3537. case TWTY_FIX32:
  3538. {
  3539. char * buff = nextTempBuffer();
  3540. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "%.2f", FIX32ToFloat(*pFix32));
  3541. strRet = buff;
  3542. }
  3543. break;
  3544. case TWTY_FRAME:
  3545. {
  3546. char * buff = nextTempBuffer();
  3547. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "%.2f,%.2f,%.2f,%.2f",
  3548. FIX32ToFloat(pFrame->Left), FIX32ToFloat(pFrame->Top), FIX32ToFloat(pFrame->Right), FIX32ToFloat(pFrame->Bottom));
  3549. strRet = buff;
  3550. }
  3551. break;
  3552. case TWTY_STR32:
  3553. case TWTY_STR64:
  3554. case TWTY_STR128:
  3555. case TWTY_STR255:
  3556. {
  3557. char * buff = nextTempBuffer();
  3558. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "%s", pStr);
  3559. strRet = buff;
  3560. }
  3561. break;
  3562. }
  3563. if(NULL==strRet)
  3564. {
  3565. switch(twCapId)
  3566. {
  3567. #if 0
  3568. case CAP_CUSTOMDSDATA:
  3569. case CAP_FEEDERENABLED:
  3570. case CAP_FEEDERLOADED:
  3571. case CAP_AUTOFEED:
  3572. case CAP_CLEARPAGE:
  3573. case CAP_FEEDPAGE:
  3574. case CAP_REWINDPAGE:
  3575. case CAP_INDICATORS:
  3576. case CAP_PAPERDETECTABLE:
  3577. case CAP_UICONTROLLABLE:
  3578. case CAP_DEVICEONLINE:
  3579. case CAP_AUTOSCAN:
  3580. case CAP_THUMBNAILSENABLED:
  3581. case CAP_DUPLEXENABLED:
  3582. case CAP_ENABLEDSUIONLY:
  3583. strRet = *pBool?"TRUE":"FALSE";
  3584. break;
  3585. #endif //#if 0
  3586. case CAP_EXTENDEDCAPS:
  3587. case CAP_SUPPORTEDCAPS:
  3588. switch(*pUint16)
  3589. {
  3590. case CAP_XFERCOUNT :
  3591. strRet = "CAP_XFERCOUNT";
  3592. break;
  3593. case ICAP_COMPRESSION:
  3594. strRet = "ICAP_COMPRESSION";
  3595. break;
  3596. case ICAP_PIXELTYPE:
  3597. strRet = "ICAP_PIXELTYPE";
  3598. break;
  3599. case ICAP_UNITS:
  3600. strRet = "ICAP_UNITS";
  3601. break;
  3602. case ICAP_XFERMECH:
  3603. strRet = "ICAP_XFERMECH";
  3604. break;
  3605. case CAP_AUTHOR:
  3606. strRet = "CAP_AUTHOR";
  3607. break;
  3608. case CAP_CAPTION:
  3609. strRet = "CAP_CAPTION";
  3610. break;
  3611. case CAP_FEEDERENABLED:
  3612. strRet = "CAP_FEEDERENABLED";
  3613. break;
  3614. case CAP_FEEDERLOADED:
  3615. strRet = "CAP_FEEDERLOADED";
  3616. break;
  3617. case CAP_TIMEDATE:
  3618. strRet = "CAP_TIMEDATE";
  3619. break;
  3620. case CAP_SUPPORTEDCAPS:
  3621. strRet = "CAP_SUPPORTEDCAPS";
  3622. break;
  3623. case CAP_EXTENDEDCAPS:
  3624. strRet = "CAP_EXTENDEDCAPS";
  3625. break;
  3626. case CAP_AUTOFEED:
  3627. strRet = "CAP_AUTOFEED";
  3628. break;
  3629. case CAP_CLEARPAGE:
  3630. strRet = "CAP_CLEARPAGE";
  3631. break;
  3632. case CAP_FEEDPAGE:
  3633. strRet = "CAP_FEEDPAGE";
  3634. break;
  3635. case CAP_REWINDPAGE:
  3636. strRet = "CAP_REWINDPAGE";
  3637. break;
  3638. case CAP_INDICATORS:
  3639. strRet = "CAP_INDICATORS";
  3640. break;
  3641. case CAP_SUPPORTEDCAPSEXT:
  3642. strRet = "CAP_SUPPORTEDCAPSEXT";
  3643. break;
  3644. case CAP_PAPERDETECTABLE:
  3645. strRet = "CAP_PAPERDETECTABLE";
  3646. break;
  3647. case CAP_UICONTROLLABLE:
  3648. strRet = "CAP_UICONTROLLABLE";
  3649. break;
  3650. case CAP_DEVICEONLINE:
  3651. strRet = "CAP_DEVICEONLINE";
  3652. break;
  3653. case CAP_AUTOSCAN:
  3654. strRet = "CAP_AUTOSCAN";
  3655. break;
  3656. case CAP_THUMBNAILSENABLED:
  3657. strRet = "CAP_THUMBNAILSENABLED";
  3658. break;
  3659. case CAP_DUPLEX:
  3660. strRet = "CAP_DUPLEX";
  3661. break;
  3662. case CAP_DUPLEXENABLED:
  3663. strRet = "CAP_DUPLEXENABLED";
  3664. break;
  3665. case CAP_ENABLEDSUIONLY:
  3666. strRet = "CAP_ENABLEDSUIONLY";
  3667. break;
  3668. case CAP_CUSTOMDSDATA:
  3669. strRet = "CAP_CUSTOMDSDATA";
  3670. break;
  3671. case CAP_ENDORSER:
  3672. strRet = "CAP_ENDORSER";
  3673. break;
  3674. case CAP_JOBCONTROL:
  3675. strRet = "CAP_JOBCONTROL";
  3676. break;
  3677. case CAP_ALARMS:
  3678. strRet = "CAP_ALARMS";
  3679. break;
  3680. case CAP_ALARMVOLUME:
  3681. strRet = "CAP_ALARMVOLUME";
  3682. break;
  3683. case CAP_AUTOMATICCAPTURE:
  3684. strRet = "CAP_AUTOMATICCAPTURE";
  3685. break;
  3686. case CAP_TIMEBEFOREFIRSTCAPTURE:
  3687. strRet = "CAP_TIMEBEFOREFIRSTCAPTURE";
  3688. break;
  3689. case CAP_TIMEBETWEENCAPTURES:
  3690. strRet = "CAP_TIMEBETWEENCAPTURES";
  3691. break;
  3692. case CAP_CLEARBUFFERS:
  3693. strRet = "CAP_CLEARBUFFERS";
  3694. break;
  3695. case CAP_MAXBATCHBUFFERS:
  3696. strRet = "CAP_MAXBATCHBUFFERS";
  3697. break;
  3698. case CAP_DEVICETIMEDATE:
  3699. strRet = "CAP_DEVICETIMEDATE";
  3700. break;
  3701. case CAP_POWERSUPPLY:
  3702. strRet = "CAP_POWERSUPPLY";
  3703. break;
  3704. case CAP_CAMERAPREVIEWUI:
  3705. strRet = "CAP_CAMERAPREVIEWUI";
  3706. break;
  3707. case CAP_DEVICEEVENT:
  3708. strRet = "CAP_DEVICEEVENT";
  3709. break;
  3710. case CAP_SERIALNUMBER:
  3711. strRet = "CAP_SERIALNUMBER";
  3712. break;
  3713. case CAP_PRINTER:
  3714. strRet = "CAP_PRINTER";
  3715. break;
  3716. case CAP_PRINTERENABLED:
  3717. strRet = "CAP_PRINTERENABLED";
  3718. break;
  3719. case CAP_PRINTERINDEX:
  3720. strRet = "CAP_PRINTERINDEX";
  3721. break;
  3722. case CAP_PRINTERMODE:
  3723. strRet = "CAP_PRINTERMODE";
  3724. break;
  3725. case CAP_PRINTERSTRING:
  3726. strRet = "CAP_PRINTERSTRING";
  3727. break;
  3728. case CAP_PRINTERSUFFIX:
  3729. strRet = "CAP_PRINTERSUFFIX";
  3730. break;
  3731. case CAP_LANGUAGE:
  3732. strRet = "CAP_LANGUAGE";
  3733. break;
  3734. case CAP_FEEDERALIGNMENT:
  3735. strRet = "CAP_FEEDERALIGNMENT";
  3736. break;
  3737. case CAP_FEEDERORDER:
  3738. strRet = "CAP_FEEDERORDER";
  3739. break;
  3740. case CAP_REACQUIREALLOWED:
  3741. strRet = "CAP_REACQUIREALLOWED";
  3742. break;
  3743. case CAP_BATTERYMINUTES:
  3744. strRet = "CAP_BATTERYMINUTES";
  3745. break;
  3746. case CAP_BATTERYPERCENTAGE:
  3747. strRet = "CAP_BATTERYPERCENTAGE";
  3748. break;
  3749. case CAP_CAMERASIDE:
  3750. strRet = "CAP_CAMERASIDE";
  3751. break;
  3752. case CAP_SEGMENTED:
  3753. strRet = "CAP_SEGMENTED";
  3754. break;
  3755. case CAP_CAMERAENABLED:
  3756. strRet = "CAP_CAMERAENABLED";
  3757. break;
  3758. case CAP_CAMERAORDER:
  3759. strRet = "CAP_CAMERAORDER";
  3760. break;
  3761. case CAP_MICRENABLED:
  3762. strRet = "CAP_MICRENABLED";
  3763. break;
  3764. case CAP_FEEDERPREP:
  3765. strRet = "CAP_FEEDERPREP";
  3766. break;
  3767. case CAP_FEEDERPOCKET:
  3768. strRet = "CAP_FEEDERPOCKET";
  3769. break;
  3770. case CAP_AUTOMATICSENSEMEDIUM:
  3771. strRet = "CAP_AUTOMATICSENSEMEDIUM";
  3772. break;
  3773. case CAP_CUSTOMINTERFACEGUID:
  3774. strRet = "CAP_CUSTOMINTERFACEGUID";
  3775. break;
  3776. case ICAP_AUTOBRIGHT:
  3777. strRet = "ICAP_AUTOBRIGHT";
  3778. break;
  3779. case ICAP_BRIGHTNESS:
  3780. strRet = "ICAP_BRIGHTNESS";
  3781. break;
  3782. case ICAP_CONTRAST:
  3783. strRet = "ICAP_CONTRAST";
  3784. break;
  3785. case ICAP_CUSTHALFTONE:
  3786. strRet = "ICAP_CUSTHALFTONE";
  3787. break;
  3788. case ICAP_EXPOSURETIME:
  3789. strRet = "ICAP_EXPOSURETIME";
  3790. break;
  3791. case ICAP_FILTER:
  3792. strRet = "ICAP_FILTER";
  3793. break;
  3794. case ICAP_FLASHUSED:
  3795. strRet = "ICAP_FLASHUSED";
  3796. break;
  3797. case ICAP_GAMMA:
  3798. strRet = "ICAP_GAMMA";
  3799. break;
  3800. case ICAP_HALFTONES:
  3801. strRet = "ICAP_HALFTONES";
  3802. break;
  3803. case ICAP_HIGHLIGHT:
  3804. strRet = "ICAP_HIGHLIGHT";
  3805. break;
  3806. case ICAP_IMAGEFILEFORMAT:
  3807. strRet = "ICAP_IMAGEFILEFORMAT";
  3808. break;
  3809. case ICAP_LAMPSTATE:
  3810. strRet = "ICAP_LAMPSTATE";
  3811. break;
  3812. case ICAP_LIGHTSOURCE:
  3813. strRet = "ICAP_LIGHTSOURCE";
  3814. break;
  3815. case ICAP_ORIENTATION:
  3816. strRet = "ICAP_ORIENTATION";
  3817. break;
  3818. case ICAP_PHYSICALWIDTH:
  3819. strRet = "ICAP_PHYSICALWIDTH";
  3820. break;
  3821. case ICAP_PHYSICALHEIGHT:
  3822. strRet = "ICAP_PHYSICALHEIGHT";
  3823. break;
  3824. case ICAP_SHADOW:
  3825. strRet = "ICAP_SHADOW";
  3826. break;
  3827. case ICAP_FRAMES:
  3828. strRet = "ICAP_FRAMES";
  3829. break;
  3830. case ICAP_XNATIVERESOLUTION:
  3831. strRet = "ICAP_XNATIVERESOLUTION";
  3832. break;
  3833. case ICAP_YNATIVERESOLUTION:
  3834. strRet = "ICAP_YNATIVERESOLUTION";
  3835. break;
  3836. case ICAP_XRESOLUTION:
  3837. strRet = "ICAP_XRESOLUTION";
  3838. break;
  3839. case ICAP_YRESOLUTION:
  3840. strRet = "ICAP_YRESOLUTION";
  3841. break;
  3842. case ICAP_MAXFRAMES:
  3843. strRet = "ICAP_MAXFRAMES";
  3844. break;
  3845. case ICAP_TILES:
  3846. strRet = "ICAP_TILES";
  3847. break;
  3848. case ICAP_BITORDER:
  3849. strRet = "ICAP_BITORDER";
  3850. break;
  3851. case ICAP_CCITTKFACTOR:
  3852. strRet = "ICAP_CCITTKFACTOR";
  3853. break;
  3854. case ICAP_LIGHTPATH:
  3855. strRet = "ICAP_LIGHTPATH";
  3856. break;
  3857. case ICAP_PIXELFLAVOR:
  3858. strRet = "ICAP_PIXELFLAVOR";
  3859. break;
  3860. case ICAP_PLANARCHUNKY:
  3861. strRet = "ICAP_PLANARCHUNKY";
  3862. break;
  3863. case ICAP_ROTATION:
  3864. strRet = "ICAP_ROTATION";
  3865. break;
  3866. case ICAP_SUPPORTEDSIZES:
  3867. strRet = "ICAP_SUPPORTEDSIZES";
  3868. break;
  3869. case ICAP_THRESHOLD:
  3870. strRet = "ICAP_THRESHOLD";
  3871. break;
  3872. case ICAP_XSCALING:
  3873. strRet = "ICAP_XSCALING";
  3874. break;
  3875. case ICAP_YSCALING:
  3876. strRet = "ICAP_YSCALING";
  3877. break;
  3878. case ICAP_BITORDERCODES:
  3879. strRet = "ICAP_BITORDERCODES";
  3880. break;
  3881. case ICAP_PIXELFLAVORCODES:
  3882. strRet = "ICAP_PIXELFLAVORCODES";
  3883. break;
  3884. case ICAP_JPEGPIXELTYPE:
  3885. strRet = "ICAP_JPEGPIXELTYPE";
  3886. break;
  3887. case ICAP_TIMEFILL:
  3888. strRet = "ICAP_TIMEFILL";
  3889. break;
  3890. case ICAP_BITDEPTH:
  3891. strRet = "ICAP_BITDEPTH";
  3892. break;
  3893. case ICAP_BITDEPTHREDUCTION:
  3894. strRet = "ICAP_BITDEPTHREDUCTION";
  3895. break;
  3896. case ICAP_UNDEFINEDIMAGESIZE:
  3897. strRet = "ICAP_UNDEFINEDIMAGESIZE";
  3898. break;
  3899. case ICAP_IMAGEDATASET:
  3900. strRet = "ICAP_IMAGEDATASET";
  3901. break;
  3902. case ICAP_EXTIMAGEINFO:
  3903. strRet = "ICAP_EXTIMAGEINFO";
  3904. break;
  3905. case ICAP_MINIMUMHEIGHT:
  3906. strRet = "ICAP_MINIMUMHEIGHT";
  3907. break;
  3908. case ICAP_MINIMUMWIDTH:
  3909. strRet = "ICAP_MINIMUMWIDTH";
  3910. break;
  3911. case ICAP_AUTODISCARDBLANKPAGES:
  3912. strRet = "ICAP_AUTODISCARDBLANKPAGES";
  3913. break;
  3914. case ICAP_FLIPROTATION:
  3915. strRet = "ICAP_FLIPROTATION";
  3916. break;
  3917. case ICAP_BARCODEDETECTIONENABLED:
  3918. strRet = "ICAP_BARCODEDETECTIONENABLED";
  3919. break;
  3920. case ICAP_SUPPORTEDBARCODETYPES:
  3921. strRet = "ICAP_SUPPORTEDBARCODETYPES";
  3922. break;
  3923. case ICAP_BARCODEMAXSEARCHPRIORITIES:
  3924. strRet = "ICAP_BARCODEMAXSEARCHPRIORITIES";
  3925. break;
  3926. case ICAP_BARCODESEARCHPRIORITIES:
  3927. strRet = "ICAP_BARCODESEARCHPRIORITIES";
  3928. break;
  3929. case ICAP_BARCODESEARCHMODE:
  3930. strRet = "ICAP_BARCODESEARCHMODE";
  3931. break;
  3932. case ICAP_BARCODEMAXRETRIES:
  3933. strRet = "ICAP_BARCODEMAXRETRIES";
  3934. break;
  3935. case ICAP_BARCODETIMEOUT:
  3936. strRet = "ICAP_BARCODETIMEOUT";
  3937. break;
  3938. case ICAP_ZOOMFACTOR:
  3939. strRet = "ICAP_ZOOMFACTOR";
  3940. break;
  3941. case ICAP_PATCHCODEDETECTIONENABLED:
  3942. strRet = "ICAP_PATCHCODEDETECTIONENABLED";
  3943. break;
  3944. case ICAP_SUPPORTEDPATCHCODETYPES:
  3945. strRet = "ICAP_SUPPORTEDPATCHCODETYPES";
  3946. break;
  3947. case ICAP_PATCHCODEMAXSEARCHPRIORITIES:
  3948. strRet = "ICAP_PATCHCODEMAXSEARCHPRIORITIES";
  3949. break;
  3950. case ICAP_PATCHCODESEARCHPRIORITIES:
  3951. strRet = "ICAP_PATCHCODESEARCHPRIORITIES";
  3952. break;
  3953. case ICAP_PATCHCODESEARCHMODE:
  3954. strRet = "ICAP_PATCHCODESEARCHMODE";
  3955. break;
  3956. case ICAP_PATCHCODEMAXRETRIES:
  3957. strRet = "ICAP_PATCHCODEMAXRETRIES";
  3958. break;
  3959. case ICAP_PATCHCODETIMEOUT:
  3960. strRet = "ICAP_PATCHCODETIMEOUT";
  3961. break;
  3962. case ICAP_FLASHUSED2:
  3963. strRet = "ICAP_FLASHUSED2";
  3964. break;
  3965. case ICAP_IMAGEFILTER:
  3966. strRet = "ICAP_IMAGEFILTER";
  3967. break;
  3968. case ICAP_NOISEFILTER:
  3969. strRet = "ICAP_NOISEFILTER";
  3970. break;
  3971. case ICAP_OVERSCAN:
  3972. strRet = "ICAP_OVERSCAN";
  3973. break;
  3974. case ICAP_AUTOMATICBORDERDETECTION:
  3975. strRet = "ICAP_AUTOMATICBORDERDETECTION";
  3976. break;
  3977. case ICAP_AUTOMATICDESKEW:
  3978. strRet = "ICAP_AUTOMATICDESKEW";
  3979. break;
  3980. case ICAP_AUTOMATICROTATE:
  3981. strRet = "ICAP_AUTOMATICROTATE";
  3982. break;
  3983. case ICAP_JPEGQUALITY:
  3984. strRet = "ICAP_JPEGQUALITY";
  3985. break;
  3986. case ICAP_FEEDERTYPE:
  3987. strRet = "ICAP_FEEDERTYPE";
  3988. break;
  3989. case ICAP_ICCPROFILE:
  3990. strRet = "ICAP_ICCPROFILE";
  3991. break;
  3992. case ICAP_AUTOSIZE:
  3993. strRet = "ICAP_AUTOSIZE";
  3994. break;
  3995. case ICAP_AUTOMATICCROPUSESFRAME:
  3996. strRet = "ICAP_AUTOMATICCROPUSESFRAME";
  3997. break;
  3998. case ICAP_AUTOMATICLENGTHDETECTION:
  3999. strRet = "ICAP_AUTOMATICLENGTHDETECTION";
  4000. break;
  4001. case ICAP_AUTOMATICCOLORENABLED:
  4002. strRet = "ICAP_AUTOMATICCOLORENABLED";
  4003. break;
  4004. case ICAP_AUTOMATICCOLORNONCOLORPIXELTYPE:
  4005. strRet = "ICAP_AUTOMATICCOLORNONCOLORPIXELTYPE";
  4006. break;
  4007. case ICAP_COLORMANAGEMENTENABLED:
  4008. strRet = "ICAP_COLORMANAGEMENTENABLED";
  4009. break;
  4010. case ICAP_IMAGEMERGE:
  4011. strRet = "ICAP_IMAGEMERGE";
  4012. break;
  4013. case ICAP_IMAGEMERGEHEIGHTTHRESHOLD:
  4014. strRet = "ICAP_IMAGEMERGEHEIGHTTHRESHOLD";
  4015. break;
  4016. case ICAP_SUPPORTEDEXTIMAGEINFO:
  4017. strRet = "ICAP_SUPPORTEDEXTIMAGEINFO";
  4018. break;
  4019. default:
  4020. {
  4021. char * buff = nextTempBuffer();
  4022. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  4023. strRet = buff;
  4024. }
  4025. break;
  4026. }
  4027. break;
  4028. case ICAP_SUPPORTEDEXTIMAGEINFO:
  4029. switch(*pUint16)
  4030. {
  4031. case TWEI_BARCODEX:
  4032. strRet = "TWEI_BARCODEX";
  4033. break;
  4034. case TWEI_BARCODEY:
  4035. strRet = "TWEI_BARCODEY";
  4036. break;
  4037. case TWEI_BARCODETEXT:
  4038. strRet = "TWEI_BARCODETEXT";
  4039. break;
  4040. case TWEI_BARCODETYPE:
  4041. strRet = "TWEI_BARCODETYPE";
  4042. break;
  4043. case TWEI_DESHADETOP:
  4044. strRet = "TWEI_DESHADETOP";
  4045. break;
  4046. case TWEI_DESHADELEFT:
  4047. strRet = "TWEI_DESHADELEFT";
  4048. break;
  4049. case TWEI_DESHADEHEIGHT:
  4050. strRet = "TWEI_DESHADEHEIGHT";
  4051. break;
  4052. case TWEI_DESHADEWIDTH:
  4053. strRet = "TWEI_DESHADEWIDTH";
  4054. break;
  4055. case TWEI_DESHADESIZE:
  4056. strRet = "TWEI_DESHADESIZE";
  4057. break;
  4058. case TWEI_SPECKLESREMOVED:
  4059. strRet = "TWEI_SPECKLESREMOVED";
  4060. break;
  4061. case TWEI_HORZLINEXCOORD:
  4062. strRet = "TWEI_HORZLINEXCOORD";
  4063. break;
  4064. case TWEI_HORZLINEYCOORD:
  4065. strRet = "TWEI_HORZLINEYCOORD";
  4066. break;
  4067. case TWEI_HORZLINELENGTH:
  4068. strRet = "TWEI_HORZLINELENGTH";
  4069. break;
  4070. case TWEI_HORZLINETHICKNESS:
  4071. strRet = "TWEI_HORZLINETHICKNESS";
  4072. break;
  4073. case TWEI_VERTLINEXCOORD:
  4074. strRet = "TWEI_VERTLINEXCOORD";
  4075. break;
  4076. case TWEI_VERTLINEYCOORD:
  4077. strRet = "TWEI_VERTLINEYCOORD";
  4078. break;
  4079. case TWEI_VERTLINELENGTH:
  4080. strRet = "TWEI_VERTLINELENGTH";
  4081. break;
  4082. case TWEI_VERTLINETHICKNESS:
  4083. strRet = "TWEI_VERTLINETHICKNESS";
  4084. break;
  4085. case TWEI_PATCHCODE:
  4086. strRet = "TWEI_PATCHCODE";
  4087. break;
  4088. case TWEI_ENDORSEDTEXT:
  4089. strRet = "TWEI_ENDORSEDTEXT";
  4090. break;
  4091. case TWEI_FORMCONFIDENCE:
  4092. strRet = "TWEI_FORMCONFIDENCE";
  4093. break;
  4094. case TWEI_FORMTEMPLATEMATCH:
  4095. strRet = "TWEI_FORMTEMPLATEMATCH";
  4096. break;
  4097. case TWEI_FORMTEMPLATEPAGEMATCH:
  4098. strRet = "TWEI_FORMTEMPLATEPAGEMATCH";
  4099. break;
  4100. case TWEI_FORMHORZDOCOFFSET:
  4101. strRet = "TWEI_FORMHORZDOCOFFSET";
  4102. break;
  4103. case TWEI_FORMVERTDOCOFFSET:
  4104. strRet = "TWEI_FORMVERTDOCOFFSET";
  4105. break;
  4106. case TWEI_BARCODECOUNT:
  4107. strRet = "TWEI_BARCODECOUNT";
  4108. break;
  4109. case TWEI_BARCODECONFIDENCE:
  4110. strRet = "TWEI_BARCODECONFIDENCE";
  4111. break;
  4112. case TWEI_BARCODEROTATION:
  4113. strRet = "TWEI_BARCODEROTATION";
  4114. break;
  4115. case TWEI_BARCODETEXTLENGTH:
  4116. strRet = "TWEI_BARCODETEXTLENGTH";
  4117. break;
  4118. case TWEI_DESHADECOUNT:
  4119. strRet = "TWEI_DESHADECOUNT";
  4120. break;
  4121. case TWEI_DESHADEBLACKCOUNTOLD:
  4122. strRet = "TWEI_DESHADEBLACKCOUNTOLD";
  4123. break;
  4124. case TWEI_DESHADEBLACKCOUNTNEW:
  4125. strRet = "TWEI_DESHADEBLACKCOUNTNEW";
  4126. break;
  4127. case TWEI_DESHADEBLACKRLMIN:
  4128. strRet = "TWEI_DESHADEBLACKRLMIN";
  4129. break;
  4130. case TWEI_DESHADEBLACKRLMAX:
  4131. strRet = "TWEI_DESHADEBLACKRLMAX";
  4132. break;
  4133. case TWEI_DESHADEWHITECOUNTOLD:
  4134. strRet = "TWEI_DESHADEWHITECOUNTOLD";
  4135. break;
  4136. case TWEI_DESHADEWHITECOUNTNEW:
  4137. strRet = "TWEI_DESHADEWHITECOUNTNEW";
  4138. break;
  4139. case TWEI_DESHADEWHITERLMIN:
  4140. strRet = "TWEI_DESHADEWHITERLMIN";
  4141. break;
  4142. case TWEI_DESHADEWHITERLAVE:
  4143. strRet = "TWEI_DESHADEWHITERLAVE";
  4144. break;
  4145. case TWEI_DESHADEWHITERLMAX:
  4146. strRet = "TWEI_DESHADEWHITERLMAX";
  4147. break;
  4148. case TWEI_BLACKSPECKLESREMOVED:
  4149. strRet = "TWEI_BLACKSPECKLESREMOVED";
  4150. break;
  4151. case TWEI_WHITESPECKLESREMOVED:
  4152. strRet = "TWEI_WHITESPECKLESREMOVED";
  4153. break;
  4154. case TWEI_HORZLINECOUNT:
  4155. strRet = "TWEI_HORZLINECOUNT";
  4156. break;
  4157. case TWEI_VERTLINECOUNT:
  4158. strRet = "TWEI_VERTLINECOUNT";
  4159. break;
  4160. case TWEI_DESKEWSTATUS:
  4161. strRet = "TWEI_DESKEWSTATUS";
  4162. break;
  4163. case TWEI_SKEWORIGINALANGLE:
  4164. strRet = "TWEI_SKEWORIGINALANGLE";
  4165. break;
  4166. case TWEI_SKEWFINALANGLE:
  4167. strRet = "TWEI_SKEWFINALANGLE";
  4168. break;
  4169. case TWEI_SKEWCONFIDENCE:
  4170. strRet = "TWEI_SKEWCONFIDENCE";
  4171. break;
  4172. case TWEI_SKEWWINDOWX1:
  4173. strRet = "TWEI_SKEWWINDOWX1";
  4174. break;
  4175. case TWEI_SKEWWINDOWY1:
  4176. strRet = "TWEI_SKEWWINDOWY1";
  4177. break;
  4178. case TWEI_SKEWWINDOWX2:
  4179. strRet = "TWEI_SKEWWINDOWX2";
  4180. break;
  4181. case TWEI_SKEWWINDOWY2:
  4182. strRet = "TWEI_SKEWWINDOWY2";
  4183. break;
  4184. case TWEI_SKEWWINDOWX3:
  4185. strRet = "TWEI_SKEWWINDOWX3";
  4186. break;
  4187. case TWEI_SKEWWINDOWY3:
  4188. strRet = "TWEI_SKEWWINDOWY3";
  4189. break;
  4190. case TWEI_SKEWWINDOWX4:
  4191. strRet = "TWEI_SKEWWINDOWX4";
  4192. break;
  4193. case TWEI_SKEWWINDOWY4:
  4194. strRet = "TWEI_SKEWWINDOWY4";
  4195. break;
  4196. case TWEI_BOOKNAME:
  4197. strRet = "TWEI_BOOKNAME";
  4198. break;
  4199. case TWEI_CHAPTERNUMBER:
  4200. strRet = "TWEI_CHAPTERNUMBER";
  4201. break;
  4202. case TWEI_DOCUMENTNUMBER:
  4203. strRet = "TWEI_DOCUMENTNUMBER";
  4204. break;
  4205. case TWEI_PAGENUMBER:
  4206. strRet = "TWEI_PAGENUMBER";
  4207. break;
  4208. case TWEI_CAMERA:
  4209. strRet = "TWEI_CAMERA";
  4210. break;
  4211. case TWEI_FRAMENUMBER:
  4212. strRet = "TWEI_FRAMENUMBER";
  4213. break;
  4214. case TWEI_FRAME:
  4215. strRet = "TWEI_FRAME";
  4216. break;
  4217. case TWEI_PIXELFLAVOR:
  4218. strRet = "TWEI_PIXELFLAVOR";
  4219. break;
  4220. case TWEI_ICCPROFILE:
  4221. strRet = "TWEI_ICCPROFILE";
  4222. break;
  4223. case TWEI_LASTSEGMENT:
  4224. strRet = "TWEI_LASTSEGMENT";
  4225. break;
  4226. case TWEI_SEGMENTNUMBER:
  4227. strRet = "TWEI_SEGMENTNUMBER";
  4228. break;
  4229. case TWEI_MAGDATA:
  4230. strRet = "TWEI_MAGDATA";
  4231. break;
  4232. case TWEI_MAGTYPE:
  4233. strRet = "TWEI_MAGTYPE";
  4234. break;
  4235. case TWEI_PAGESIDE:
  4236. strRet = "TWEI_PAGESIDE";
  4237. break;
  4238. case TWEI_FILESYSTEMSOURCE:
  4239. strRet = "TWEI_FILESYSTEMSOURCE";
  4240. break;
  4241. case TWEI_IMAGEMERGED:
  4242. strRet = "TWEI_IMAGEMERGED";
  4243. break;
  4244. case TWEI_MAGDATALENGTH:
  4245. strRet = "TWEI_MAGDATALENGTH";
  4246. break;
  4247. default:
  4248. {
  4249. char * buff = nextTempBuffer();
  4250. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  4251. strRet = buff;
  4252. }
  4253. break;
  4254. }
  4255. break;
  4256. #if 0
  4257. case ICAP_FRAMES:
  4258. {
  4259. char * buff = nextTempBuffer();
  4260. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "%.2f,%.2f,%.2f,%.2f",
  4261. FIX32ToFloat(pFrame->Left), FIX32ToFloat(pFrame->Top), FIX32ToFloat(pFrame->Right), FIX32ToFloat(pFrame->Bottom));
  4262. strRet = buff;
  4263. }
  4264. break;
  4265. #endif //#if 0
  4266. case ICAP_MAXFRAMES:
  4267. case ICAP_BITDEPTH:
  4268. {
  4269. char * buff = nextTempBuffer();
  4270. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "%d", *pUint16);
  4271. strRet = buff;
  4272. }
  4273. break;
  4274. #if 0
  4275. case CAP_XFERCOUNT:
  4276. {
  4277. char * buff = nextTempBuffer();
  4278. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "%d", *pInt16);
  4279. strRet = buff;
  4280. }
  4281. break;
  4282. #endif //#if 0
  4283. #if 0
  4284. case ICAP_GAMMA:
  4285. case ICAP_XRESOLUTION:
  4286. case ICAP_YRESOLUTION:
  4287. case ICAP_BRIGHTNESS:
  4288. case ICAP_CONTRAST:
  4289. case ICAP_THRESHOLD:
  4290. case ICAP_PHYSICALWIDTH:
  4291. case ICAP_PHYSICALHEIGHT:
  4292. case ICAP_MINIMUMHEIGHT:
  4293. case ICAP_MINIMUMWIDTH:
  4294. {
  4295. char * buff = nextTempBuffer();
  4296. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "%.2f", FIX32ToFloat(*pFix32));
  4297. strRet = buff;
  4298. }
  4299. break;
  4300. #endif //#if 0
  4301. case CAP_CUSTOMINTERFACEGUID:
  4302. case ICAP_HALFTONES:
  4303. case CAP_AUTHOR:
  4304. case CAP_CAPTION:
  4305. case CAP_TIMEDATE:
  4306. {
  4307. char * buff = nextTempBuffer();
  4308. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "%s", pStr);
  4309. strRet = buff;
  4310. }
  4311. break;
  4312. case CAP_ALARMS:
  4313. switch(*pUint16)
  4314. {
  4315. case TWAL_ALARM:
  4316. strRet = "TWAL_ALARM";
  4317. break;
  4318. case TWAL_FEEDERERROR:
  4319. strRet = "TWAL_FEEDERERROR";
  4320. break;
  4321. case TWAL_FEEDERWARNING:
  4322. strRet = "TWAL_FEEDERWARNING";
  4323. break;
  4324. case TWAL_BARCODE:
  4325. strRet = "TWAL_BARCODE";
  4326. break;
  4327. case TWAL_DOUBLEFEED:
  4328. strRet = "TWAL_DOUBLEFEED";
  4329. break;
  4330. case TWAL_JAM:
  4331. strRet = "TWAL_JAM";
  4332. break;
  4333. case TWAL_PATCHCODE:
  4334. strRet = "TWAL_PATCHCODE";
  4335. break;
  4336. case TWAL_POWER:
  4337. strRet = "TWAL_POWER";
  4338. break;
  4339. case TWAL_SKEW:
  4340. strRet = "TWAL_SKEW";
  4341. break;
  4342. default:
  4343. {
  4344. char * buff = nextTempBuffer();
  4345. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  4346. strRet = buff;
  4347. }
  4348. break;
  4349. }
  4350. break;
  4351. case ICAP_AUTOSIZE:
  4352. switch(*pUint16)
  4353. {
  4354. case TWAS_NONE:
  4355. strRet = "TWAS_NONE";
  4356. break;
  4357. case TWAS_AUTO:
  4358. strRet = "TWAS_AUTO";
  4359. break;
  4360. case TWAS_CURRENT:
  4361. strRet = "TWAS_CURRENT";
  4362. break;
  4363. default:
  4364. {
  4365. char * buff = nextTempBuffer();
  4366. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  4367. strRet = buff;
  4368. }
  4369. break;
  4370. }
  4371. break;
  4372. case ICAP_BARCODESEARCHMODE:
  4373. switch(*pUint16)
  4374. {
  4375. case TWBD_HORZ:
  4376. strRet = "TWBD_HORZ";
  4377. break;
  4378. case TWBD_VERT:
  4379. strRet = "TWBD_VERT";
  4380. break;
  4381. case TWBD_HORZVERT:
  4382. strRet = "TWBD_HORZVERT";
  4383. break;
  4384. case TWBD_VERTHORZ:
  4385. strRet = "TWBD_VERTHORZ";
  4386. break;
  4387. default:
  4388. {
  4389. char * buff = nextTempBuffer();
  4390. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  4391. strRet = buff;
  4392. }
  4393. break;
  4394. }
  4395. break;
  4396. case ICAP_BITORDER:
  4397. switch(*pUint16)
  4398. {
  4399. case TWBO_LSBFIRST:
  4400. strRet = "TWBO_LSBFIRST";
  4401. break;
  4402. case TWBO_MSBFIRST:
  4403. strRet = "TWBO_MSBFIRST";
  4404. break;
  4405. default:
  4406. {
  4407. char * buff = nextTempBuffer();
  4408. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  4409. strRet = buff;
  4410. }
  4411. break;
  4412. }
  4413. break;
  4414. case ICAP_AUTODISCARDBLANKPAGES:
  4415. switch(*pUint16)
  4416. {
  4417. case TWBP_DISABLE:
  4418. strRet = "TWBP_DISABLE";
  4419. break;
  4420. case TWBP_AUTO:
  4421. strRet = "TWBP_AUTO";
  4422. break;
  4423. default:
  4424. {
  4425. char * buff = nextTempBuffer();
  4426. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  4427. strRet = buff;
  4428. }
  4429. break;
  4430. }
  4431. break;
  4432. case ICAP_BITDEPTHREDUCTION:
  4433. switch(*pUint16)
  4434. {
  4435. case TWBR_THRESHOLD:
  4436. strRet = "TWBR_THRESHOLD";
  4437. break;
  4438. case TWBR_HALFTONE:
  4439. strRet = "TWBR_HALFTONE";
  4440. break;
  4441. case TWBR_CUSTHALFTONE:
  4442. strRet = "TWBR_CUSTHALFTONE";
  4443. break;
  4444. case TWBR_DIFFUSION:
  4445. strRet = "TWBR_DIFFUSION";
  4446. break;
  4447. default:
  4448. {
  4449. char * buff = nextTempBuffer();
  4450. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  4451. strRet = buff;
  4452. }
  4453. break;
  4454. }
  4455. break;
  4456. case ICAP_SUPPORTEDBARCODETYPES: /*and TWEI_BARCODETYPE values Added 1.7 */
  4457. switch(*pUint16)
  4458. {
  4459. case TWBT_3OF9:
  4460. strRet = "TWBT_3OF9";
  4461. break;
  4462. case TWBT_2OF5INTERLEAVED:
  4463. strRet = "TWBT_2OF5INTERLEAVED";
  4464. break;
  4465. case TWBT_2OF5NONINTERLEAVED:
  4466. strRet = "TWBT_2OF5NONINTERLEAVED";
  4467. break;
  4468. case TWBT_CODE93:
  4469. strRet = "TWBT_CODE93";
  4470. break;
  4471. case TWBT_CODE128:
  4472. strRet = "TWBT_CODE128";
  4473. break;
  4474. case TWBT_UCC128:
  4475. strRet = "TWBT_UCC128";
  4476. break;
  4477. case TWBT_CODABAR:
  4478. strRet = "TWBT_CODABAR";
  4479. break;
  4480. case TWBT_UPCA:
  4481. strRet = "TWBT_UPCA";
  4482. break;
  4483. case TWBT_UPCE:
  4484. strRet = "TWBT_UPCE";
  4485. break;
  4486. case TWBT_EAN8:
  4487. strRet = "TWBT_EAN8";
  4488. break;
  4489. case TWBT_EAN13:
  4490. strRet = "TWBT_EAN13";
  4491. break;
  4492. case TWBT_POSTNET:
  4493. strRet = "TWBT_POSTNET";
  4494. break;
  4495. case TWBT_PDF417:
  4496. strRet = "TWBT_PDF417";
  4497. break;
  4498. case TWBT_2OF5INDUSTRIAL:
  4499. strRet = "TWBT_2OF5INDUSTRIAL";
  4500. break;
  4501. case TWBT_2OF5MATRIX:
  4502. strRet = "TWBT_2OF5MATRIX";
  4503. break;
  4504. case TWBT_2OF5DATALOGIC:
  4505. strRet = "TWBT_2OF5DATALOGIC";
  4506. break;
  4507. case TWBT_2OF5IATA:
  4508. strRet = "TWBT_2OF5IATA";
  4509. break;
  4510. case TWBT_3OF9FULLASCII:
  4511. strRet = "TWBT_3OF9FULLASCII";
  4512. break;
  4513. case TWBT_CODABARWITHSTARTSTOP:
  4514. strRet = "TWBT_CODABARWITHSTARTSTOP";
  4515. break;
  4516. case TWBT_MAXICODE:
  4517. strRet = "TWBT_MAXICODE";
  4518. break;
  4519. default:
  4520. {
  4521. char * buff = nextTempBuffer();
  4522. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  4523. strRet = buff;
  4524. }
  4525. break;
  4526. }
  4527. break;
  4528. case ICAP_COMPRESSION:
  4529. switch(*pUint16)
  4530. {
  4531. case TWCP_NONE:
  4532. strRet = "TWCP_NONE";
  4533. break;
  4534. case TWCP_PACKBITS:
  4535. strRet = "TWCP_PACKBITS";
  4536. break;
  4537. case TWCP_GROUP31D:
  4538. strRet = "TWCP_GROUP31D";
  4539. break;
  4540. case TWCP_GROUP31DEOL:
  4541. strRet = "TWCP_GROUP31DEOL";
  4542. break;
  4543. case TWCP_GROUP32D:
  4544. strRet = "TWCP_GROUP32D";
  4545. break;
  4546. case TWCP_GROUP4:
  4547. strRet = "TWCP_GROUP4";
  4548. break;
  4549. case TWCP_JPEG:
  4550. strRet = "TWCP_JPEG";
  4551. break;
  4552. case TWCP_LZW:
  4553. strRet = "TWCP_LZW";
  4554. break;
  4555. case TWCP_JBIG:
  4556. strRet = "TWCP_JBIG";
  4557. break;
  4558. case TWCP_PNG:
  4559. strRet = "TWCP_PNG";
  4560. break;
  4561. case TWCP_RLE4:
  4562. strRet = "TWCP_RLE4";
  4563. break;
  4564. case TWCP_RLE8:
  4565. strRet = "TWCP_RLE8";
  4566. break;
  4567. case TWCP_BITFIELDS:
  4568. strRet = "TWCP_BITFIELDS";
  4569. break;
  4570. default:
  4571. {
  4572. char * buff = nextTempBuffer();
  4573. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  4574. strRet = buff;
  4575. }
  4576. break;
  4577. }
  4578. break;
  4579. case CAP_CAMERASIDE: /* and TWEI_PAGESIDE values (CS_ means camera side) Added 1.91 */
  4580. switch(*pUint16)
  4581. {
  4582. case TWCS_BOTH:
  4583. strRet = "TWCS_BOTH";
  4584. break;
  4585. case TWCS_TOP:
  4586. strRet = "TWCS_TOP";
  4587. break;
  4588. case TWCS_BOTTOM:
  4589. strRet = "TWCS_BOTTOM";
  4590. break;
  4591. default:
  4592. {
  4593. char * buff = nextTempBuffer();
  4594. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  4595. strRet = buff;
  4596. }
  4597. break;
  4598. }
  4599. break;
  4600. case CAP_CLEARBUFFERS:
  4601. switch(*pUint16)
  4602. {
  4603. case TWCB_AUTO:
  4604. strRet = "TWCB_AUTO";
  4605. break;
  4606. case TWCB_CLEAR:
  4607. strRet = "TWCB_CLEAR";
  4608. break;
  4609. case TWCB_NOCLEAR:
  4610. strRet = "TWCB_NOCLEAR";
  4611. break;
  4612. default:
  4613. {
  4614. char * buff = nextTempBuffer();
  4615. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  4616. strRet = buff;
  4617. }
  4618. break;
  4619. }
  4620. break;
  4621. case CAP_DEVICEEVENT:
  4622. switch(*pUint16)
  4623. {
  4624. case TWDE_CUSTOMEVENTS:
  4625. strRet = "TWDE_CUSTOMEVENTS";
  4626. break;
  4627. case TWDE_CHECKAUTOMATICCAPTURE:
  4628. strRet = "TWDE_CHECKAUTOMATICCAPTURE";
  4629. break;
  4630. case TWDE_CHECKBATTERY:
  4631. strRet = "TWDE_CHECKBATTERY";
  4632. break;
  4633. case TWDE_CHECKDEVICEONLINE:
  4634. strRet = "TWDE_CHECKDEVICEONLINE";
  4635. break;
  4636. case TWDE_CHECKFLASH:
  4637. strRet = "TWDE_CHECKFLASH";
  4638. break;
  4639. case TWDE_CHECKPOWERSUPPLY:
  4640. strRet = "TWDE_CHECKPOWERSUPPLY";
  4641. break;
  4642. case TWDE_CHECKRESOLUTION:
  4643. strRet = "TWDE_CHECKRESOLUTION";
  4644. break;
  4645. case TWDE_DEVICEADDED:
  4646. strRet = "TWDE_DEVICEADDED";
  4647. break;
  4648. case TWDE_DEVICEOFFLINE:
  4649. strRet = "TWDE_DEVICEOFFLINE";
  4650. break;
  4651. case TWDE_DEVICEREADY:
  4652. strRet = "TWDE_DEVICEREADY";
  4653. break;
  4654. case TWDE_DEVICEREMOVED:
  4655. strRet = "TWDE_DEVICEREMOVED";
  4656. break;
  4657. case TWDE_IMAGECAPTURED:
  4658. strRet = "TWDE_IMAGECAPTURED";
  4659. break;
  4660. case TWDE_IMAGEDELETED:
  4661. strRet = "TWDE_IMAGEDELETED";
  4662. break;
  4663. case TWDE_PAPERDOUBLEFEED:
  4664. strRet = "TWDE_PAPERDOUBLEFEED";
  4665. break;
  4666. case TWDE_PAPERJAM:
  4667. strRet = "TWDE_PAPERJAM";
  4668. break;
  4669. case TWDE_LAMPFAILURE:
  4670. strRet = "TWDE_LAMPFAILURE";
  4671. break;
  4672. case TWDE_POWERSAVE:
  4673. strRet = "TWDE_POWERSAVE";
  4674. break;
  4675. case TWDE_POWERSAVENOTIFY:
  4676. strRet = "TWDE_POWERSAVENOTIFY";
  4677. break;
  4678. default:
  4679. {
  4680. char * buff = nextTempBuffer();
  4681. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  4682. strRet = buff;
  4683. }
  4684. break;
  4685. }
  4686. break;
  4687. case CAP_DUPLEX:
  4688. switch(*pUint16)
  4689. {
  4690. case TWDX_NONE:
  4691. strRet = "TWDX_NONE";
  4692. break;
  4693. case TWDX_1PASSDUPLEX:
  4694. strRet = "TWDX_1PASSDUPLEX";
  4695. break;
  4696. case TWDX_2PASSDUPLEX:
  4697. strRet = "TWDX_2PASSDUPLEX";
  4698. break;
  4699. default:
  4700. {
  4701. char * buff = nextTempBuffer();
  4702. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  4703. strRet = buff;
  4704. }
  4705. break;
  4706. }
  4707. break;
  4708. case CAP_FEEDERALIGNMENT:
  4709. switch(*pUint16)
  4710. {
  4711. case TWFA_NONE:
  4712. strRet = "TWFA_NONE";
  4713. break;
  4714. case TWFA_LEFT:
  4715. strRet = "TWFA_LEFT";
  4716. break;
  4717. case TWFA_CENTER:
  4718. strRet = "TWFA_CENTER";
  4719. break;
  4720. case TWFA_RIGHT:
  4721. strRet = "TWFA_RIGHT";
  4722. break;
  4723. default:
  4724. {
  4725. char * buff = nextTempBuffer();
  4726. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  4727. strRet = buff;
  4728. }
  4729. break;
  4730. }
  4731. break;
  4732. case ICAP_FEEDERTYPE:
  4733. switch(*pUint16)
  4734. {
  4735. case TWFE_GENERAL:
  4736. strRet = "TWFE_GENERAL";
  4737. break;
  4738. case TWFE_PHOTO:
  4739. strRet = "TWFE_PHOTO";
  4740. break;
  4741. default:
  4742. {
  4743. char * buff = nextTempBuffer();
  4744. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  4745. strRet = buff;
  4746. }
  4747. break;
  4748. }
  4749. break;
  4750. case ICAP_IMAGEFILEFORMAT:
  4751. switch(*pUint16)
  4752. {
  4753. case TWFF_TIFF:
  4754. strRet = "TWFF_TIFF";
  4755. break;
  4756. case TWFF_PICT:
  4757. strRet = "TWFF_PICT";
  4758. break;
  4759. case TWFF_BMP:
  4760. strRet = "TWFF_BMP";
  4761. break;
  4762. case TWFF_XBM:
  4763. strRet = "TWFF_XBM";
  4764. break;
  4765. case TWFF_JFIF:
  4766. strRet = "TWFF_JFIF";
  4767. break;
  4768. case TWFF_FPX:
  4769. strRet = "TWFF_FPX";
  4770. break;
  4771. case TWFF_TIFFMULTI:
  4772. strRet = "TWFF_TIFFMULTI";
  4773. break;
  4774. case TWFF_PNG:
  4775. strRet = "TWFF_PNG";
  4776. break;
  4777. case TWFF_SPIFF:
  4778. strRet = "TWFF_SPIFF";
  4779. break;
  4780. case TWFF_EXIF:
  4781. strRet = "TWFF_EXIF";
  4782. break;
  4783. case TWFF_PDF:
  4784. strRet = "TWFF_PDF";
  4785. break;
  4786. case TWFF_JP2:
  4787. strRet = "TWFF_JP2";
  4788. break;
  4789. case TWFF_JPN:
  4790. strRet = "TWFF_JPN";
  4791. break;
  4792. case TWFF_JPX:
  4793. strRet = "TWFF_JPX";
  4794. break;
  4795. case TWFF_DEJAVU:
  4796. strRet = "TWFF_DEJAVU";
  4797. break;
  4798. case TWFF_PDFA:
  4799. strRet = "TWFF_PDFA";
  4800. break;
  4801. case TWFF_PDFA2:
  4802. strRet = "TWFF_PDFA2";
  4803. break;
  4804. default:
  4805. {
  4806. char * buff = nextTempBuffer();
  4807. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  4808. strRet = buff;
  4809. }
  4810. break;
  4811. }
  4812. break;
  4813. case ICAP_FLASHUSED2:
  4814. switch(*pUint16)
  4815. {
  4816. case TWFL_NONE:
  4817. strRet = "TWFL_NONE";
  4818. break;
  4819. case TWFL_OFF:
  4820. strRet = "TWFL_OFF";
  4821. break;
  4822. case TWFL_ON:
  4823. strRet = "TWFL_ON";
  4824. break;
  4825. case TWFL_AUTO:
  4826. strRet = "TWFL_AUTO";
  4827. break;
  4828. case TWFL_REDEYE:
  4829. strRet = "TWFL_REDEYE";
  4830. break;
  4831. default:
  4832. {
  4833. char * buff = nextTempBuffer();
  4834. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  4835. strRet = buff;
  4836. }
  4837. break;
  4838. }
  4839. break;
  4840. case CAP_FEEDERORDER:
  4841. switch(*pUint16)
  4842. {
  4843. case TWFO_FIRSTPAGEFIRST:
  4844. strRet = "TWFO_FIRSTPAGEFIRST";
  4845. break;
  4846. case TWFO_LASTPAGEFIRST:
  4847. strRet = "TWFO_LASTPAGEFIRST";
  4848. break;
  4849. default:
  4850. {
  4851. char * buff = nextTempBuffer();
  4852. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  4853. strRet = buff;
  4854. }
  4855. break;
  4856. }
  4857. break;
  4858. case CAP_FEEDERPOCKET:
  4859. switch(*pUint16)
  4860. {
  4861. case TWFP_POCKETERROR:
  4862. strRet = "TWFP_POCKETERROR";
  4863. break;
  4864. case TWFP_POCKET1:
  4865. strRet = "TWFP_POCKET1";
  4866. break;
  4867. case TWFP_POCKET2:
  4868. strRet = "TWFP_POCKET2";
  4869. break;
  4870. case TWFP_POCKET3:
  4871. strRet = "TWFP_POCKET3";
  4872. break;
  4873. case TWFP_POCKET4:
  4874. strRet = "TWFP_POCKET4";
  4875. break;
  4876. case TWFP_POCKET5:
  4877. strRet = "TWFP_POCKET5";
  4878. break;
  4879. case TWFP_POCKET6:
  4880. strRet = "TWFP_POCKET6";
  4881. break;
  4882. case TWFP_POCKET7:
  4883. strRet = "TWFP_POCKET7";
  4884. break;
  4885. case TWFP_POCKET8:
  4886. strRet = "TWFP_POCKET8";
  4887. break;
  4888. case TWFP_POCKET9:
  4889. strRet = "TWFP_POCKET9";
  4890. break;
  4891. case TWFP_POCKET10:
  4892. strRet = "TWFP_POCKET10";
  4893. break;
  4894. case TWFP_POCKET11:
  4895. strRet = "TWFP_POCKET11";
  4896. break;
  4897. case TWFP_POCKET12:
  4898. strRet = "TWFP_POCKET12";
  4899. break;
  4900. case TWFP_POCKET13:
  4901. strRet = "TWFP_POCKET13";
  4902. break;
  4903. case TWFP_POCKET14:
  4904. strRet = "TWFP_POCKET14";
  4905. break;
  4906. case TWFP_POCKET15:
  4907. strRet = "TWFP_POCKET15";
  4908. break;
  4909. case TWFP_POCKET16:
  4910. strRet = "TWFP_POCKET16";
  4911. break;
  4912. default:
  4913. {
  4914. char * buff = nextTempBuffer();
  4915. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  4916. strRet = buff;
  4917. }
  4918. break;
  4919. }
  4920. break;
  4921. case ICAP_FLIPROTATION:
  4922. switch(*pUint16)
  4923. {
  4924. case TWFR_BOOK:
  4925. strRet = "TWFR_BOOK";
  4926. break;
  4927. case TWFR_FANFOLD:
  4928. strRet = "TWFR_FANFOLD";
  4929. break;
  4930. default:
  4931. {
  4932. char * buff = nextTempBuffer();
  4933. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  4934. strRet = buff;
  4935. }
  4936. break;
  4937. }
  4938. break;
  4939. case ICAP_FILTER:
  4940. switch(*pUint16)
  4941. {
  4942. case TWFT_RED:
  4943. strRet = "TWFT_RED";
  4944. break;
  4945. case TWFT_GREEN:
  4946. strRet = "TWFT_GREEN";
  4947. break;
  4948. case TWFT_BLUE:
  4949. strRet = "TWFT_BLUE";
  4950. break;
  4951. case TWFT_NONE:
  4952. strRet = "TWFT_NONE";
  4953. break;
  4954. case TWFT_WHITE:
  4955. strRet = "TWFT_WHITE";
  4956. break;
  4957. case TWFT_CYAN:
  4958. strRet = "TWFT_CYAN";
  4959. break;
  4960. case TWFT_MAGENTA:
  4961. strRet = "TWFT_MAGENTA";
  4962. break;
  4963. case TWFT_YELLOW:
  4964. strRet = "TWFT_YELLOW";
  4965. break;
  4966. case TWFT_BLACK:
  4967. strRet = "TWFT_BLACK";
  4968. break;
  4969. default:
  4970. {
  4971. char * buff = nextTempBuffer();
  4972. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  4973. strRet = buff;
  4974. }
  4975. break;
  4976. }
  4977. break;
  4978. case ICAP_ICCPROFILE:
  4979. switch(*pUint16)
  4980. {
  4981. case TWIC_NONE:
  4982. strRet = "TWIC_NONE";
  4983. break;
  4984. case TWIC_LINK:
  4985. strRet = "TWIC_LINK";
  4986. break;
  4987. case TWIC_EMBED:
  4988. strRet = "TWIC_EMBED";
  4989. break;
  4990. default:
  4991. {
  4992. char * buff = nextTempBuffer();
  4993. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  4994. strRet = buff;
  4995. }
  4996. break;
  4997. }
  4998. break;
  4999. case ICAP_IMAGEFILTER:
  5000. switch(*pUint16)
  5001. {
  5002. case TWIF_NONE:
  5003. strRet = "TWIF_NONE";
  5004. break;
  5005. case TWIF_AUTO:
  5006. strRet = "TWIF_AUTO";
  5007. break;
  5008. case TWIF_LOWPASS:
  5009. strRet = "TWIF_LOWPASS";
  5010. break;
  5011. case TWIF_BANDPASS:
  5012. strRet = "TWIF_BANDPASS";
  5013. break;
  5014. case TWIF_HIGHPASS:
  5015. strRet = "TWIF_HIGHPASS";
  5016. break;
  5017. // case TWIF_TEXT:
  5018. // strRet = "TWIF_TEXT";
  5019. // break;
  5020. // case TWIF_FINELINE:
  5021. // strRet = "TWIF_FINELINE";
  5022. // break;
  5023. default:
  5024. {
  5025. char * buff = nextTempBuffer();
  5026. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  5027. strRet = buff;
  5028. }
  5029. break;
  5030. }
  5031. break;
  5032. case ICAP_IMAGEMERGE:
  5033. switch(*pUint16)
  5034. {
  5035. case TWIM_NONE:
  5036. strRet = "TWIM_NONE";
  5037. break;
  5038. case TWIM_FRONTONTOP:
  5039. strRet = "TWIM_FRONTONTOP";
  5040. break;
  5041. case TWIM_FRONTONBOTTOM:
  5042. strRet = "TWIM_FRONTONBOTTOM";
  5043. break;
  5044. case TWIM_FRONTONLEFT:
  5045. strRet = "TWIM_FRONTONLEFT";
  5046. break;
  5047. case TWIM_FRONTONRIGHT:
  5048. strRet = "TWIM_FRONTONRIGHT";
  5049. break;
  5050. default:
  5051. {
  5052. char * buff = nextTempBuffer();
  5053. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  5054. strRet = buff;
  5055. }
  5056. break;
  5057. }
  5058. break;
  5059. case CAP_JOBCONTROL:
  5060. switch(*pUint16)
  5061. {
  5062. case TWJC_NONE:
  5063. strRet = "TWJC_NONE";
  5064. break;
  5065. case TWJC_JSIC:
  5066. strRet = "TWJC_JSIC";
  5067. break;
  5068. case TWJC_JSIS:
  5069. strRet = "TWJC_JSIS";
  5070. break;
  5071. case TWJC_JSXC:
  5072. strRet = "TWJC_JSXC";
  5073. break;
  5074. case TWJC_JSXS:
  5075. strRet = "TWJC_JSXS";
  5076. break;
  5077. default:
  5078. {
  5079. char * buff = nextTempBuffer();
  5080. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  5081. strRet = buff;
  5082. }
  5083. break;
  5084. }
  5085. break;
  5086. case ICAP_JPEGQUALITY:
  5087. switch(*pUint16)
  5088. {
  5089. case TWJQ_UNKNOWN:
  5090. strRet = "TWJQ_UNKNOWN";
  5091. break;
  5092. case TWJQ_LOW:
  5093. strRet = "TWJQ_LOW";
  5094. break;
  5095. case TWJQ_MEDIUM:
  5096. strRet = "TWJQ_MEDIUM";
  5097. break;
  5098. case TWJQ_HIGH:
  5099. strRet = "TWJQ_HIGH";
  5100. break;
  5101. default:
  5102. {
  5103. char * buff = nextTempBuffer();
  5104. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  5105. strRet = buff;
  5106. }
  5107. break;
  5108. }
  5109. break;
  5110. case ICAP_LIGHTPATH:
  5111. switch(*pUint16)
  5112. {
  5113. case TWLP_REFLECTIVE:
  5114. strRet = "TWLP_REFLECTIVE";
  5115. break;
  5116. case TWLP_TRANSMISSIVE:
  5117. strRet = "TWLP_TRANSMISSIVE";
  5118. break;
  5119. default:
  5120. {
  5121. char * buff = nextTempBuffer();
  5122. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  5123. strRet = buff;
  5124. }
  5125. break;
  5126. }
  5127. break;
  5128. case ICAP_LIGHTSOURCE:
  5129. switch(*pUint16)
  5130. {
  5131. case TWLS_RED:
  5132. strRet = "TWLS_RED";
  5133. break;
  5134. case TWLS_GREEN:
  5135. strRet = "TWLS_GREEN";
  5136. break;
  5137. case TWLS_BLUE:
  5138. strRet = "TWLS_BLUE";
  5139. break;
  5140. case TWLS_NONE:
  5141. strRet = "TWLS_NONE";
  5142. break;
  5143. case TWLS_WHITE:
  5144. strRet = "TWLS_WHITE";
  5145. break;
  5146. case TWLS_UV:
  5147. strRet = "TWLS_UV";
  5148. break;
  5149. case TWLS_IR:
  5150. strRet = "TWLS_IR";
  5151. break;
  5152. default:
  5153. {
  5154. char * buff = nextTempBuffer();
  5155. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  5156. strRet = buff;
  5157. }
  5158. break;
  5159. }
  5160. break;
  5161. case ICAP_NOISEFILTER:
  5162. switch(*pUint16)
  5163. {
  5164. case TWNF_NONE:
  5165. strRet = "TWNF_NONE";
  5166. break;
  5167. case TWNF_AUTO:
  5168. strRet = "TWNF_AUTO";
  5169. break;
  5170. case TWNF_LONEPIXEL:
  5171. strRet = "TWNF_LONEPIXEL";
  5172. break;
  5173. case TWNF_MAJORITYRULE:
  5174. strRet = "TWNF_MAJORITYRULE";
  5175. break;
  5176. default:
  5177. {
  5178. char * buff = nextTempBuffer();
  5179. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  5180. strRet = buff;
  5181. }
  5182. break;
  5183. }
  5184. break;
  5185. case ICAP_ORIENTATION:
  5186. switch(*pUint16)
  5187. {
  5188. // case TWOR_ROT0:
  5189. // strRet = "TWOR_ROT0";
  5190. // break;
  5191. case TWOR_ROT90:
  5192. strRet = "TWOR_ROT90";
  5193. break;
  5194. case TWOR_ROT180:
  5195. strRet = "TWOR_ROT180";
  5196. break;
  5197. // case TWOR_ROT270:
  5198. // strRet = "TWOR_ROT270";
  5199. // break;
  5200. case TWOR_PORTRAIT:
  5201. strRet = "TWOR_PORTRAIT";
  5202. break;
  5203. case TWOR_LANDSCAPE:
  5204. strRet = "TWOR_LANDSCAPE";
  5205. break;
  5206. case TWOR_AUTO:
  5207. strRet = "TWOR_AUTO";
  5208. break;
  5209. case TWOR_AUTOTEXT:
  5210. strRet = "TWOR_AUTOTEXT";
  5211. break;
  5212. case TWOR_AUTOPICTURE:
  5213. strRet = "TWOR_AUTOPICTURE";
  5214. break;
  5215. default:
  5216. {
  5217. char * buff = nextTempBuffer();
  5218. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  5219. strRet = buff;
  5220. }
  5221. break;
  5222. }
  5223. break;
  5224. case ICAP_OVERSCAN:
  5225. switch(*pUint16)
  5226. {
  5227. case TWOV_NONE:
  5228. strRet = "TWOV_NONE";
  5229. break;
  5230. case TWOV_AUTO:
  5231. strRet = "TWOV_AUTO";
  5232. break;
  5233. case TWOV_TOPBOTTOM:
  5234. strRet = "TWOV_TOPBOTTOM";
  5235. break;
  5236. case TWOV_LEFTRIGHT:
  5237. strRet = "TWOV_LEFTRIGHT";
  5238. break;
  5239. case TWOV_ALL:
  5240. strRet = "TWOV_ALL";
  5241. break;
  5242. default:
  5243. {
  5244. char * buff = nextTempBuffer();
  5245. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  5246. strRet = buff;
  5247. }
  5248. break;
  5249. }
  5250. break;
  5251. case ICAP_PLANARCHUNKY:
  5252. switch(*pUint16)
  5253. {
  5254. case TWPC_CHUNKY:
  5255. strRet = "TWPC_CHUNKY";
  5256. break;
  5257. case TWPC_PLANAR:
  5258. strRet = "TWPC_PLANAR";
  5259. break;
  5260. default:
  5261. {
  5262. char * buff = nextTempBuffer();
  5263. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  5264. strRet = buff;
  5265. }
  5266. break;
  5267. }
  5268. break;
  5269. case ICAP_PIXELFLAVOR:
  5270. switch(*pUint16)
  5271. {
  5272. case TWPF_CHOCOLATE:
  5273. strRet = "TWPF_CHOCOLATE";
  5274. break;
  5275. case TWPF_VANILLA:
  5276. strRet = "TWPF_VANILLA";
  5277. break;
  5278. default:
  5279. {
  5280. char * buff = nextTempBuffer();
  5281. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  5282. strRet = buff;
  5283. }
  5284. break;
  5285. }
  5286. break;
  5287. case CAP_PRINTERMODE:
  5288. switch(*pUint16)
  5289. {
  5290. case TWPM_SINGLESTRING:
  5291. strRet = "TWPM_SINGLESTRING";
  5292. break;
  5293. case TWPM_MULTISTRING:
  5294. strRet = "TWPM_MULTISTRING";
  5295. break;
  5296. case TWPM_COMPOUNDSTRING:
  5297. strRet = "TWPM_COMPOUNDSTRING";
  5298. break;
  5299. default:
  5300. {
  5301. char * buff = nextTempBuffer();
  5302. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  5303. strRet = buff;
  5304. }
  5305. break;
  5306. }
  5307. break;
  5308. case CAP_PRINTER:
  5309. switch(*pUint16)
  5310. {
  5311. case TWPR_IMPRINTERTOPBEFORE:
  5312. strRet = "TWPR_IMPRINTERTOPBEFORE";
  5313. break;
  5314. case TWPR_IMPRINTERTOPAFTER:
  5315. strRet = "TWPR_IMPRINTERTOPAFTER";
  5316. break;
  5317. case TWPR_IMPRINTERBOTTOMBEFORE:
  5318. strRet = "TWPR_IMPRINTERBOTTOMBEFORE";
  5319. break;
  5320. case TWPR_IMPRINTERBOTTOMAFTER:
  5321. strRet = "TWPR_IMPRINTERBOTTOMAFTER";
  5322. break;
  5323. case TWPR_ENDORSERTOPBEFORE:
  5324. strRet = "TWPR_ENDORSERTOPBEFORE";
  5325. break;
  5326. case TWPR_ENDORSERTOPAFTER:
  5327. strRet = "TWPR_ENDORSERTOPAFTER";
  5328. break;
  5329. case TWPR_ENDORSERBOTTOMBEFORE:
  5330. strRet = "TWPR_ENDORSERBOTTOMBEFORE";
  5331. break;
  5332. case TWPR_ENDORSERBOTTOMAFTER:
  5333. strRet = "TWPR_ENDORSERBOTTOMAFTER";
  5334. break;
  5335. default:
  5336. {
  5337. char * buff = nextTempBuffer();
  5338. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  5339. strRet = buff;
  5340. }
  5341. break;
  5342. }
  5343. break;
  5344. case CAP_POWERSUPPLY:
  5345. switch(*pUint16)
  5346. {
  5347. case TWPS_EXTERNAL:
  5348. strRet = "TWPS_EXTERNAL";
  5349. break;
  5350. case TWPS_BATTERY:
  5351. strRet = "TWPS_BATTERY";
  5352. break;
  5353. default:
  5354. {
  5355. char * buff = nextTempBuffer();
  5356. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  5357. strRet = buff;
  5358. }
  5359. break;
  5360. }
  5361. break;
  5362. case ICAP_PIXELTYPE:
  5363. switch(*pUint16)
  5364. {
  5365. case TWPT_BW:
  5366. strRet = "TWPT_BW";
  5367. break;
  5368. case TWPT_GRAY:
  5369. strRet = "TWPT_GRAY";
  5370. break;
  5371. case TWPT_RGB:
  5372. strRet = "TWPT_RGB";
  5373. break;
  5374. case TWPT_PALETTE:
  5375. strRet = "TWPT_PALETTE";
  5376. break;
  5377. case TWPT_CMY:
  5378. strRet = "TWPT_CMY";
  5379. break;
  5380. case TWPT_CMYK:
  5381. strRet = "TWPT_CMYK";
  5382. break;
  5383. case TWPT_YUV:
  5384. strRet = "TWPT_YUV";
  5385. break;
  5386. case TWPT_YUVK:
  5387. strRet = "TWPT_YUVK";
  5388. break;
  5389. case TWPT_CIEXYZ:
  5390. strRet = "TWPT_CIEXYZ";
  5391. break;
  5392. case TWPT_LAB:
  5393. strRet = "TWPT_LAB";
  5394. break;
  5395. case TWPT_SRGB:
  5396. strRet = "TWPT_SRGB";
  5397. break;
  5398. case TWPT_SCRGB:
  5399. strRet = "TWPT_SCRGB";
  5400. break;
  5401. case TWPT_INFRARED:
  5402. strRet = "TWPT_INFRARED";
  5403. break;
  5404. default:
  5405. {
  5406. char * buff = nextTempBuffer();
  5407. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  5408. strRet = buff;
  5409. }
  5410. break;
  5411. }
  5412. break;
  5413. case CAP_SEGMENTED:
  5414. switch(*pUint16)
  5415. {
  5416. case TWSG_NONE:
  5417. strRet = "TWSG_NONE";
  5418. break;
  5419. case TWSG_AUTO:
  5420. strRet = "TWSG_AUTO";
  5421. break;
  5422. default:
  5423. {
  5424. char * buff = nextTempBuffer();
  5425. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  5426. strRet = buff;
  5427. }
  5428. break;
  5429. }
  5430. break;
  5431. case ICAP_SUPPORTEDSIZES:
  5432. switch(*pUint16)
  5433. {
  5434. case TWSS_NONE:
  5435. strRet = "TWSS_NONE";
  5436. break;
  5437. case TWSS_A4:
  5438. strRet = "TWSS_A4";
  5439. break;
  5440. case TWSS_JISB5:
  5441. strRet = "TWSS_JISB5";
  5442. break;
  5443. case TWSS_USLETTER:
  5444. strRet = "TWSS_USLETTER";
  5445. break;
  5446. case TWSS_USLEGAL:
  5447. strRet = "TWSS_USLEGAL";
  5448. break;
  5449. case TWSS_A5:
  5450. strRet = "TWSS_A5";
  5451. break;
  5452. case TWSS_ISOB4:
  5453. strRet = "TWSS_ISOB4";
  5454. break;
  5455. case TWSS_ISOB6:
  5456. strRet = "TWSS_ISOB6";
  5457. break;
  5458. case TWSS_USLEDGER:
  5459. strRet = "TWSS_USLEDGER";
  5460. break;
  5461. case TWSS_USEXECUTIVE:
  5462. strRet = "TWSS_USEXECUTIVE";
  5463. break;
  5464. case TWSS_A3:
  5465. strRet = "TWSS_A3";
  5466. break;
  5467. case TWSS_ISOB3:
  5468. strRet = "TWSS_ISOB3";
  5469. break;
  5470. case TWSS_A6:
  5471. strRet = "TWSS_A6";
  5472. break;
  5473. case TWSS_C4:
  5474. strRet = "TWSS_C4";
  5475. break;
  5476. case TWSS_C5:
  5477. strRet = "TWSS_C5";
  5478. break;
  5479. case TWSS_C6:
  5480. strRet = "TWSS_C6";
  5481. break;
  5482. case TWSS_4A0:
  5483. strRet = "TWSS_4A0";
  5484. break;
  5485. case TWSS_2A0:
  5486. strRet = "TWSS_2A0";
  5487. break;
  5488. case TWSS_A0:
  5489. strRet = "TWSS_A0";
  5490. break;
  5491. case TWSS_A1:
  5492. strRet = "TWSS_A1";
  5493. break;
  5494. case TWSS_A2:
  5495. strRet = "TWSS_A2";
  5496. break;
  5497. case TWSS_A7:
  5498. strRet = "TWSS_A7";
  5499. break;
  5500. case TWSS_A8:
  5501. strRet = "TWSS_A8";
  5502. break;
  5503. case TWSS_A9:
  5504. strRet = "TWSS_A9";
  5505. break;
  5506. case TWSS_A10:
  5507. strRet = "TWSS_A10";
  5508. break;
  5509. case TWSS_ISOB0:
  5510. strRet = "TWSS_ISOB0";
  5511. break;
  5512. case TWSS_ISOB1:
  5513. strRet = "TWSS_ISOB1";
  5514. break;
  5515. case TWSS_ISOB2:
  5516. strRet = "TWSS_ISOB2";
  5517. break;
  5518. case TWSS_ISOB5:
  5519. strRet = "TWSS_ISOB5";
  5520. break;
  5521. case TWSS_ISOB7:
  5522. strRet = "TWSS_ISOB7";
  5523. break;
  5524. case TWSS_ISOB8:
  5525. strRet = "TWSS_ISOB8";
  5526. break;
  5527. case TWSS_ISOB9:
  5528. strRet = "TWSS_ISOB9";
  5529. break;
  5530. case TWSS_ISOB10:
  5531. strRet = "TWSS_ISOB10";
  5532. break;
  5533. case TWSS_JISB0:
  5534. strRet = "TWSS_JISB0";
  5535. break;
  5536. case TWSS_JISB1:
  5537. strRet = "TWSS_JISB1";
  5538. break;
  5539. case TWSS_JISB2:
  5540. strRet = "TWSS_JISB2";
  5541. break;
  5542. case TWSS_JISB3:
  5543. strRet = "TWSS_JISB3";
  5544. break;
  5545. case TWSS_JISB4:
  5546. strRet = "TWSS_JISB4";
  5547. break;
  5548. case TWSS_JISB6:
  5549. strRet = "TWSS_JISB6";
  5550. break;
  5551. case TWSS_JISB7:
  5552. strRet = "TWSS_JISB7";
  5553. break;
  5554. case TWSS_JISB8:
  5555. strRet = "TWSS_JISB8";
  5556. break;
  5557. case TWSS_JISB9:
  5558. strRet = "TWSS_JISB9";
  5559. break;
  5560. case TWSS_JISB10:
  5561. strRet = "TWSS_JISB10";
  5562. break;
  5563. case TWSS_C0:
  5564. strRet = "TWSS_C0";
  5565. break;
  5566. case TWSS_C1:
  5567. strRet = "TWSS_C1";
  5568. break;
  5569. case TWSS_C2:
  5570. strRet = "TWSS_C2";
  5571. break;
  5572. case TWSS_C3:
  5573. strRet = "TWSS_C3";
  5574. break;
  5575. case TWSS_C7:
  5576. strRet = "TWSS_C7";
  5577. break;
  5578. case TWSS_C8:
  5579. strRet = "TWSS_C8";
  5580. break;
  5581. case TWSS_C9:
  5582. strRet = "TWSS_C9";
  5583. break;
  5584. case TWSS_C10:
  5585. strRet = "TWSS_C10";
  5586. break;
  5587. case TWSS_USSTATEMENT:
  5588. strRet = "TWSS_USSTATEMENT";
  5589. break;
  5590. case TWSS_BUSINESSCARD:
  5591. strRet = "TWSS_BUSINESSCARD";
  5592. break;
  5593. case TWSS_MAXSIZE:
  5594. strRet = "TWSS_MAXSIZE";
  5595. break;
  5596. default:
  5597. {
  5598. char * buff = nextTempBuffer();
  5599. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  5600. strRet = buff;
  5601. }
  5602. break;
  5603. }
  5604. break;
  5605. case ICAP_XFERMECH:
  5606. switch(*pUint16)
  5607. {
  5608. case TWSX_NATIVE:
  5609. strRet = "TWSX_NATIVE";
  5610. break;
  5611. case TWSX_FILE:
  5612. strRet = "TWSX_FILE";
  5613. break;
  5614. case TWSX_MEMORY:
  5615. strRet = "TWSX_MEMORY";
  5616. break;
  5617. case TWSX_MEMFILE:
  5618. strRet = "TWSX_MEMFILE";
  5619. break;
  5620. default:
  5621. {
  5622. char * buff = nextTempBuffer();
  5623. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  5624. strRet = buff;
  5625. }
  5626. break;
  5627. }
  5628. break;
  5629. case ICAP_UNITS:
  5630. switch(*pUint16)
  5631. {
  5632. case TWUN_INCHES:
  5633. strRet = "TWUN_INCHES";
  5634. break;
  5635. case TWUN_CENTIMETERS:
  5636. strRet = "TWUN_CENTIMETERS";
  5637. break;
  5638. case TWUN_PICAS:
  5639. strRet = "TWUN_PICAS";
  5640. break;
  5641. case TWUN_POINTS:
  5642. strRet = "TWUN_POINTS";
  5643. break;
  5644. case TWUN_TWIPS:
  5645. strRet = "TWUN_TWIPS";
  5646. break;
  5647. case TWUN_PIXELS:
  5648. strRet = "TWUN_PIXELS";
  5649. break;
  5650. case TWUN_MILLIMETERS:
  5651. strRet = "TWUN_MILLIMETERS";
  5652. break;
  5653. default:
  5654. {
  5655. char * buff = nextTempBuffer();
  5656. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  5657. strRet = buff;
  5658. }
  5659. break;
  5660. }
  5661. break;
  5662. case CAP_LANGUAGE:
  5663. switch(*pUint16)
  5664. {
  5665. case TWLG_USERLOCALE:
  5666. strRet = "TWLG_USERLOCALE";
  5667. break;
  5668. case TWLG_DANISH:
  5669. strRet = "TWLG_DANISH";
  5670. break;
  5671. case TWLG_DUTCH:
  5672. strRet = "TWLG_DUTCH";
  5673. break;
  5674. case TWLG_ENGLISH:
  5675. strRet = "TWLG_ENGLISH";
  5676. break;
  5677. case TWLG_FRENCH_CANADIAN:
  5678. strRet = "TWLG_FRENCH_CANADIAN";
  5679. break;
  5680. case TWLG_FINNISH:
  5681. strRet = "TWLG_FINNISH";
  5682. break;
  5683. case TWLG_FRENCH:
  5684. strRet = "TWLG_FRENCH";
  5685. break;
  5686. case TWLG_GERMAN:
  5687. strRet = "TWLG_GERMAN";
  5688. break;
  5689. case TWLG_ICELANDIC:
  5690. strRet = "TWLG_ICELANDIC";
  5691. break;
  5692. case TWLG_ITALIAN:
  5693. strRet = "TWLG_ITALIAN";
  5694. break;
  5695. case TWLG_NORWEGIAN:
  5696. strRet = "TWLG_NORWEGIAN";
  5697. break;
  5698. case TWLG_PORTUGUESE:
  5699. strRet = "TWLG_PORTUGUESE";
  5700. break;
  5701. case TWLG_SPANISH:
  5702. strRet = "TWLG_SPANISH";
  5703. break;
  5704. case TWLG_SWEDISH:
  5705. strRet = "TWLG_SWEDISH";
  5706. break;
  5707. case TWLG_ENGLISH_USA:
  5708. strRet = "TWLG_ENGLISH_USA";
  5709. break;
  5710. case TWLG_AFRIKAANS:
  5711. strRet = "TWLG_AFRIKAANS";
  5712. break;
  5713. case TWLG_ALBANIA:
  5714. strRet = "TWLG_ALBANIA";
  5715. break;
  5716. case TWLG_ARABIC:
  5717. strRet = "TWLG_ARABIC";
  5718. break;
  5719. case TWLG_ARABIC_ALGERIA:
  5720. strRet = "TWLG_ARABIC_ALGERIA";
  5721. break;
  5722. case TWLG_ARABIC_BAHRAIN:
  5723. strRet = "TWLG_ARABIC_BAHRAIN";
  5724. break;
  5725. case TWLG_ARABIC_EGYPT:
  5726. strRet = "TWLG_ARABIC_EGYPT";
  5727. break;
  5728. case TWLG_ARABIC_IRAQ:
  5729. strRet = "TWLG_ARABIC_IRAQ";
  5730. break;
  5731. case TWLG_ARABIC_JORDAN:
  5732. strRet = "TWLG_ARABIC_JORDAN";
  5733. break;
  5734. case TWLG_ARABIC_KUWAIT:
  5735. strRet = "TWLG_ARABIC_KUWAIT";
  5736. break;
  5737. case TWLG_ARABIC_LEBANON:
  5738. strRet = "TWLG_ARABIC_LEBANON";
  5739. break;
  5740. case TWLG_ARABIC_LIBYA:
  5741. strRet = "TWLG_ARABIC_LIBYA";
  5742. break;
  5743. case TWLG_ARABIC_MOROCCO:
  5744. strRet = "TWLG_ARABIC_MOROCCO";
  5745. break;
  5746. case TWLG_ARABIC_OMAN:
  5747. strRet = "TWLG_ARABIC_OMAN";
  5748. break;
  5749. case TWLG_ARABIC_QATAR:
  5750. strRet = "TWLG_ARABIC_QATAR";
  5751. break;
  5752. case TWLG_ARABIC_SAUDIARABIA:
  5753. strRet = "TWLG_ARABIC_SAUDIARABIA";
  5754. break;
  5755. case TWLG_ARABIC_SYRIA:
  5756. strRet = "TWLG_ARABIC_SYRIA";
  5757. break;
  5758. case TWLG_ARABIC_TUNISIA:
  5759. strRet = "TWLG_ARABIC_TUNISIA";
  5760. break;
  5761. case TWLG_ARABIC_UAE:
  5762. strRet = "TWLG_ARABIC_UAE";
  5763. break;
  5764. case TWLG_ARABIC_YEMEN:
  5765. strRet = "TWLG_ARABIC_YEMEN";
  5766. break;
  5767. case TWLG_BASQUE:
  5768. strRet = "TWLG_BASQUE";
  5769. break;
  5770. case TWLG_BYELORUSSIAN:
  5771. strRet = "TWLG_BYELORUSSIAN";
  5772. break;
  5773. case TWLG_BULGARIAN:
  5774. strRet = "TWLG_BULGARIAN";
  5775. break;
  5776. case TWLG_CATALAN:
  5777. strRet = "TWLG_CATALAN";
  5778. break;
  5779. case TWLG_CHINESE:
  5780. strRet = "TWLG_CHINESE";
  5781. break;
  5782. case TWLG_CHINESE_HONGKONG:
  5783. strRet = "TWLG_CHINESE_HONGKONG";
  5784. break;
  5785. case TWLG_CHINESE_PRC:
  5786. strRet = "TWLG_CHINESE_PRC";
  5787. break;
  5788. case TWLG_CHINESE_SINGAPORE:
  5789. strRet = "TWLG_CHINESE_SINGAPORE";
  5790. break;
  5791. case TWLG_CHINESE_SIMPLIFIED:
  5792. strRet = "TWLG_CHINESE_SIMPLIFIED";
  5793. break;
  5794. case TWLG_CHINESE_TAIWAN:
  5795. strRet = "TWLG_CHINESE_TAIWAN";
  5796. break;
  5797. case TWLG_CHINESE_TRADITIONAL:
  5798. strRet = "TWLG_CHINESE_TRADITIONAL";
  5799. break;
  5800. case TWLG_CROATIA:
  5801. strRet = "TWLG_CROATIA";
  5802. break;
  5803. case TWLG_CZECH:
  5804. strRet = "TWLG_CZECH";
  5805. break;
  5806. case TWLG_DUTCH_BELGIAN:
  5807. strRet = "TWLG_DUTCH_BELGIAN";
  5808. break;
  5809. case TWLG_ENGLISH_AUSTRALIAN:
  5810. strRet = "TWLG_ENGLISH_AUSTRALIAN";
  5811. break;
  5812. case TWLG_ENGLISH_CANADIAN:
  5813. strRet = "TWLG_ENGLISH_CANADIAN";
  5814. break;
  5815. case TWLG_ENGLISH_IRELAND:
  5816. strRet = "TWLG_ENGLISH_IRELAND";
  5817. break;
  5818. case TWLG_ENGLISH_NEWZEALAND:
  5819. strRet = "TWLG_ENGLISH_NEWZEALAND";
  5820. break;
  5821. case TWLG_ENGLISH_SOUTHAFRICA:
  5822. strRet = "TWLG_ENGLISH_SOUTHAFRICA";
  5823. break;
  5824. case TWLG_ENGLISH_UK:
  5825. strRet = "TWLG_ENGLISH_UK";
  5826. break;
  5827. case TWLG_ESTONIAN:
  5828. strRet = "TWLG_ESTONIAN";
  5829. break;
  5830. case TWLG_FAEROESE:
  5831. strRet = "TWLG_FAEROESE";
  5832. break;
  5833. case TWLG_FARSI:
  5834. strRet = "TWLG_FARSI";
  5835. break;
  5836. case TWLG_FRENCH_BELGIAN:
  5837. strRet = "TWLG_FRENCH_BELGIAN";
  5838. break;
  5839. case TWLG_FRENCH_LUXEMBOURG:
  5840. strRet = "TWLG_FRENCH_LUXEMBOURG";
  5841. break;
  5842. case TWLG_FRENCH_SWISS:
  5843. strRet = "TWLG_FRENCH_SWISS";
  5844. break;
  5845. case TWLG_GERMAN_AUSTRIAN:
  5846. strRet = "TWLG_GERMAN_AUSTRIAN";
  5847. break;
  5848. case TWLG_GERMAN_LUXEMBOURG:
  5849. strRet = "TWLG_GERMAN_LUXEMBOURG";
  5850. break;
  5851. case TWLG_GERMAN_LIECHTENSTEIN:
  5852. strRet = "TWLG_GERMAN_LIECHTENSTEIN";
  5853. break;
  5854. case TWLG_GERMAN_SWISS:
  5855. strRet = "TWLG_GERMAN_SWISS";
  5856. break;
  5857. case TWLG_GREEK:
  5858. strRet = "TWLG_GREEK";
  5859. break;
  5860. case TWLG_HEBREW:
  5861. strRet = "TWLG_HEBREW";
  5862. break;
  5863. case TWLG_HUNGARIAN:
  5864. strRet = "TWLG_HUNGARIAN";
  5865. break;
  5866. case TWLG_INDONESIAN:
  5867. strRet = "TWLG_INDONESIAN";
  5868. break;
  5869. case TWLG_ITALIAN_SWISS:
  5870. strRet = "TWLG_ITALIAN_SWISS";
  5871. break;
  5872. case TWLG_JAPANESE:
  5873. strRet = "TWLG_JAPANESE";
  5874. break;
  5875. case TWLG_KOREAN:
  5876. strRet = "TWLG_KOREAN";
  5877. break;
  5878. case TWLG_KOREAN_JOHAB:
  5879. strRet = "TWLG_KOREAN_JOHAB";
  5880. break;
  5881. case TWLG_LATVIAN:
  5882. strRet = "TWLG_LATVIAN";
  5883. break;
  5884. case TWLG_LITHUANIAN:
  5885. strRet = "TWLG_LITHUANIAN";
  5886. break;
  5887. case TWLG_NORWEGIAN_BOKMAL:
  5888. strRet = "TWLG_NORWEGIAN_BOKMAL";
  5889. break;
  5890. case TWLG_NORWEGIAN_NYNORSK:
  5891. strRet = "TWLG_NORWEGIAN_NYNORSK";
  5892. break;
  5893. case TWLG_POLISH:
  5894. strRet = "TWLG_POLISH";
  5895. break;
  5896. case TWLG_PORTUGUESE_BRAZIL:
  5897. strRet = "TWLG_PORTUGUESE_BRAZIL";
  5898. break;
  5899. case TWLG_ROMANIAN:
  5900. strRet = "TWLG_ROMANIAN";
  5901. break;
  5902. case TWLG_RUSSIAN:
  5903. strRet = "TWLG_RUSSIAN";
  5904. break;
  5905. case TWLG_SERBIAN_LATIN:
  5906. strRet = "TWLG_SERBIAN_LATIN";
  5907. break;
  5908. case TWLG_SLOVAK:
  5909. strRet = "TWLG_SLOVAK";
  5910. break;
  5911. case TWLG_SLOVENIAN:
  5912. strRet = "TWLG_SLOVENIAN";
  5913. break;
  5914. case TWLG_SPANISH_MEXICAN:
  5915. strRet = "TWLG_SPANISH_MEXICAN";
  5916. break;
  5917. case TWLG_SPANISH_MODERN:
  5918. strRet = "TWLG_SPANISH_MODERN";
  5919. break;
  5920. case TWLG_THAI:
  5921. strRet = "TWLG_THAI";
  5922. break;
  5923. case TWLG_TURKISH:
  5924. strRet = "TWLG_TURKISH";
  5925. break;
  5926. case TWLG_UKRANIAN:
  5927. strRet = "TWLG_UKRANIAN";
  5928. break;
  5929. case TWLG_ASSAMESE:
  5930. strRet = "TWLG_ASSAMESE";
  5931. break;
  5932. case TWLG_BENGALI:
  5933. strRet = "TWLG_BENGALI";
  5934. break;
  5935. case TWLG_BIHARI:
  5936. strRet = "TWLG_BIHARI";
  5937. break;
  5938. case TWLG_BODO:
  5939. strRet = "TWLG_BODO";
  5940. break;
  5941. case TWLG_DOGRI:
  5942. strRet = "TWLG_DOGRI";
  5943. break;
  5944. case TWLG_GUJARATI:
  5945. strRet = "TWLG_GUJARATI";
  5946. break;
  5947. case TWLG_HARYANVI:
  5948. strRet = "TWLG_HARYANVI";
  5949. break;
  5950. case TWLG_HINDI:
  5951. strRet = "TWLG_HINDI";
  5952. break;
  5953. case TWLG_KANNADA:
  5954. strRet = "TWLG_KANNADA";
  5955. break;
  5956. case TWLG_KASHMIRI:
  5957. strRet = "TWLG_KASHMIRI";
  5958. break;
  5959. case TWLG_MALAYALAM:
  5960. strRet = "TWLG_MALAYALAM";
  5961. break;
  5962. case TWLG_MARATHI:
  5963. strRet = "TWLG_MARATHI";
  5964. break;
  5965. case TWLG_MARWARI:
  5966. strRet = "TWLG_MARWARI";
  5967. break;
  5968. case TWLG_MEGHALAYAN:
  5969. strRet = "TWLG_MEGHALAYAN";
  5970. break;
  5971. case TWLG_MIZO:
  5972. strRet = "TWLG_MIZO";
  5973. break;
  5974. case TWLG_NAGA:
  5975. strRet = "TWLG_NAGA";
  5976. break;
  5977. case TWLG_ORISSI:
  5978. strRet = "TWLG_ORISSI";
  5979. break;
  5980. case TWLG_PUNJABI:
  5981. strRet = "TWLG_PUNJABI";
  5982. break;
  5983. case TWLG_PUSHTU:
  5984. strRet = "TWLG_PUSHTU";
  5985. break;
  5986. case TWLG_SERBIAN_CYRILLIC:
  5987. strRet = "TWLG_SERBIAN_CYRILLIC";
  5988. break;
  5989. case TWLG_SIKKIMI:
  5990. strRet = "TWLG_SIKKIMI";
  5991. break;
  5992. case TWLG_SWEDISH_FINLAND:
  5993. strRet = "TWLG_SWEDISH_FINLAND";
  5994. break;
  5995. case TWLG_TAMIL:
  5996. strRet = "TWLG_TAMIL";
  5997. break;
  5998. case TWLG_TELUGU:
  5999. strRet = "TWLG_TELUGU";
  6000. break;
  6001. case TWLG_TRIPURI:
  6002. strRet = "TWLG_TRIPURI";
  6003. break;
  6004. case TWLG_URDU:
  6005. strRet = "TWLG_URDU";
  6006. break;
  6007. case TWLG_VIETNAMESE:
  6008. strRet = "TWLG_VIETNAMESE";
  6009. break;
  6010. default:
  6011. {
  6012. char * buff = nextTempBuffer();
  6013. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "0x%04X", *pUint16);
  6014. strRet = buff;
  6015. }
  6016. break;
  6017. }
  6018. break;
  6019. default:
  6020. {
  6021. char * buff = nextTempBuffer();
  6022. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Un-recognized Capability 0x%04X", twCapId);
  6023. strRet = buff;
  6024. }
  6025. break;
  6026. }
  6027. }
  6028. return strRet;
  6029. }
  6030. const char *convertFileType_toString(const TW_UINT16 _nItem)
  6031. {
  6032. const char *strRet = NULL;
  6033. switch(_nItem)
  6034. {
  6035. case TWFY_CAMERA:
  6036. strRet = "TWFY_CAMERA";
  6037. break;
  6038. case TWFY_CAMERATOP:
  6039. strRet = "TWFY_CAMERATOP";
  6040. break;
  6041. case TWFY_CAMERABOTTOM:
  6042. strRet = "TWFY_CAMERABOTTOM";
  6043. break;
  6044. case TWFY_CAMERAPREVIEW:
  6045. strRet = "TWFY_CAMERAPREVIEW";
  6046. break;
  6047. case TWFY_DOMAIN:
  6048. strRet = "TWFY_DOMAIN";
  6049. break;
  6050. case TWFY_HOST:
  6051. strRet = "TWFY_HOST";
  6052. break;
  6053. case TWFY_DIRECTORY:
  6054. strRet = "TWFY_DIRECTORY";
  6055. break;
  6056. case TWFY_IMAGE:
  6057. strRet = "TWFY_IMAGE";
  6058. break;
  6059. case TWFY_UNKNOWN:
  6060. strRet = "TWFY_UNKNOWN";
  6061. break;
  6062. default:
  6063. {
  6064. char * buff = nextTempBuffer();
  6065. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Un-recognized FileType 0x%04X", _nItem);
  6066. strRet = buff;
  6067. }
  6068. break;
  6069. }
  6070. return strRet;
  6071. }
  6072. const char *convertFileFormat_toString(const TW_UINT16 _nItem)
  6073. {
  6074. return CapabilityValueToString(ICAP_IMAGEFILEFORMAT, TWTY_UINT16, &_nItem);
  6075. }
  6076. const char *convertEOJ_toString(const TW_UINT16 _nItem)
  6077. {
  6078. const char *strRet = NULL;
  6079. switch(_nItem)
  6080. {
  6081. case TWEJ_NONE:
  6082. strRet = "TWEJ_NONE";
  6083. break;
  6084. case TWEJ_MIDSEPARATOR:
  6085. strRet = "TWEJ_MIDSEPARATOR";
  6086. break;
  6087. case TWEJ_PATCH1:
  6088. strRet = "TWEJ_PATCH1";
  6089. break;
  6090. case TWEJ_PATCH2:
  6091. strRet = "TWEJ_PATCH2";
  6092. break;
  6093. case TWEJ_PATCH3:
  6094. strRet = "TWEJ_PATCH3";
  6095. break;
  6096. case TWEJ_PATCH4:
  6097. strRet = "TWEJ_PATCH4";
  6098. break;
  6099. case TWEJ_PATCH6:
  6100. strRet = "TWEJ_PATCH6";
  6101. break;
  6102. case TWEJ_PATCHT:
  6103. strRet = "TWEJ_PATCHT";
  6104. break;
  6105. default:
  6106. {
  6107. char * buff = nextTempBuffer();
  6108. SSNPRINTF(buff, TEMPBUFSIZE, TEMPBUFSIZE, "Un-recognized FileType 0x%04X", _nItem);
  6109. strRet = buff;
  6110. }
  6111. break;
  6112. }
  6113. return strRet;
  6114. }