1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<!-- SECTION: Programming --> 4<head> 5 <title>PPD Compiler API </title> 6 <meta name="keywords" content="Programming"> 7 <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> 8 <meta name="creator" content="Mini-XML v2.7"> 9<style type="text/css"><!-- 10BODY { 11 font-family: lucida grande, geneva, helvetica, arial, sans-serif; 12} 13 14H1, H2, H3, H4, H5, H6, P, TD, TH { 15 font-family: lucida grande, geneva, helvetica, arial, sans-serif; 16} 17 18KBD { 19 font-family: monaco, courier, monospace; 20 font-weight: bold; 21} 22 23PRE { 24 font-family: monaco, courier, monospace; 25} 26 27PRE.command { 28 border: dotted thin #7f7f7f; 29 margin-left: 36pt; 30 padding: 10px; 31} 32 33P.compact { 34 margin: 0; 35} 36 37P.example { 38 font-style: italic; 39 margin-left: 36pt; 40} 41 42DL.man DD { 43 margin-left: 5em; 44} 45 46DL.man DT { 47 margin-left: 0; 48} 49 50PRE.man { 51 margin: 0; 52} 53 54PRE.example { 55 background: #eeeeee; 56 border: dotted thin #999999; 57 margin-left: 36pt; 58 padding: 10pt; 59} 60 61PRE.command EM, PRE.example EM { 62 font-family: lucida grande, geneva, helvetica, arial, sans-serif; 63} 64 65P.command { 66 font-family: monaco, courier, monospace; 67 margin-left: 36pt; 68} 69 70P.formula { 71 font-style: italic; 72 margin-left: 36pt; 73} 74 75BLOCKQUOTE { 76 background: #eeeeee; 77 border: solid thin #999999; 78 padding: 10pt; 79} 80 81A IMG { 82 border: none; 83} 84 85A:link:hover IMG { 86 background: #f0f0f0; 87 border-radius: 10px; 88 -moz-border-radius: 10px; 89} 90 91A:link, A:visited { 92 font-weight: inherit; 93 text-decoration: none; 94} 95 96A:link:hover, A:visited:hover, A:active { 97 text-decoration: underline; 98} 99 100SUB, SUP { 101 font-size: 50%; 102} 103 104TR.data, TD.data, TR.data TD { 105 margin-top: 10pt; 106 padding: 5pt; 107 border-bottom: solid 1pt #999999; 108} 109 110TR.data TH { 111 border-bottom: solid 1pt #999999; 112 padding-top: 10pt; 113 padding-left: 5pt; 114 text-align: left; 115} 116 117DIV.table TABLE { 118 border: solid thin #999999; 119 border-collapse: collapse; 120 border-spacing: 0; 121 margin-left: auto; 122 margin-right: auto; 123} 124 125DIV.table CAPTION { 126 caption-side: top; 127 font-size: 120%; 128 font-style: italic; 129 font-weight: bold; 130 margin-left: auto; 131 margin-right: auto; 132} 133 134DIV.table TABLE TD { 135 border: solid thin #cccccc; 136 padding-top: 5pt; 137} 138 139DIV.table TABLE TH { 140 background: #cccccc; 141 border: none; 142 border-bottom: solid thin #999999; 143} 144 145DIV.figure TABLE { 146 margin-left: auto; 147 margin-right: auto; 148} 149 150DIV.figure CAPTION { 151 caption-side: bottom; 152 font-size: 120%; 153 font-style: italic; 154 font-weight: bold; 155 margin-left: auto; 156 margin-right: auto; 157} 158 159TH.label { 160 text-align: right; 161 vertical-align: top; 162} 163 164TH.sublabel { 165 text-align: right; 166 font-weight: normal; 167} 168 169HR { 170 border: solid thin; 171} 172 173SPAN.info { 174 background: black; 175 border: thin solid black; 176 color: white; 177 font-size: 80%; 178 font-style: italic; 179 font-weight: bold; 180 white-space: nowrap; 181} 182 183H2 SPAN.info, H3 SPAN.info, H4 SPAN.info { 184 float: right; 185 font-size: 100%; 186} 187 188H1.title { 189} 190 191H2.title, H3.title { 192 border-bottom: solid 2pt #000000; 193} 194 195DIV.indent, TABLE.indent { 196 margin-top: 2em; 197 margin-left: auto; 198 margin-right: auto; 199 width: 90%; 200} 201 202TABLE.indent { 203 border-collapse: collapse; 204} 205 206TABLE.indent TD, TABLE.indent TH { 207 padding: 0; 208} 209 210TABLE.list { 211 border-collapse: collapse; 212 margin-left: auto; 213 margin-right: auto; 214 width: 90%; 215} 216 217TABLE.list TH { 218 background: white; 219 border-bottom: solid thin #cccccc; 220 color: #444444; 221 padding-top: 10pt; 222 padding-left: 5pt; 223 text-align: left; 224 vertical-align: bottom; 225 white-space: nowrap; 226} 227 228TABLE.list TH A { 229 color: #4444cc; 230} 231 232TABLE.list TD { 233 border-bottom: solid thin #eeeeee; 234 padding-top: 5pt; 235 padding-left: 5pt; 236} 237 238TABLE.list TR:nth-child(even) { 239 background: #f8f8f8; 240} 241 242TABLE.list TR:nth-child(odd) { 243 background: #f4f4f4; 244} 245 246DT { 247 margin-left: 36pt; 248 margin-top: 12pt; 249} 250 251DD { 252 margin-left: 54pt; 253} 254 255DL.category DT { 256 font-weight: bold; 257} 258 259P.summary { 260 margin-left: 36pt; 261 font-family: monaco, courier, monospace; 262} 263 264DIV.summary TABLE { 265 border: solid thin #999999; 266 border-collapse: collapse; 267 border-spacing: 0; 268 margin: 10px; 269} 270 271DIV.summary TABLE TD, DIV.summary TABLE TH { 272 border: solid thin #999999; 273 padding: 5px; 274 text-align: left; 275 vertical-align: top; 276} 277 278DIV.summary TABLE THEAD TH { 279 background: #eeeeee; 280} 281 282/* API documentation styles... */ 283div.body h1 { 284 margin: 0; 285} 286div.body h2 { 287 margin-top: 1.5em; 288} 289div.body h3, div.body h4, div.body h5 { 290 margin-bottom: 0.5em; 291 margin-top: 1.5em; 292} 293.class, .enumeration, .function, .struct, .typedef, .union { 294 border-bottom: solid thin #999999; 295 margin-bottom: 0; 296 margin-top: 2em; 297} 298.description { 299 margin-top: 0.5em; 300} 301code, p.code, pre, ul.code li { 302 font-family: monaco, courier, monospace; 303 font-size: 90%; 304} 305ul.code, ul.contents, ul.subcontents { 306 list-style-type: none; 307 margin: 0; 308 padding-left: 0; 309} 310ul.code li { 311 margin: 0; 312} 313ul.contents > li { 314 margin-top: 1em; 315} 316ul.contents li ul.code, ul.contents li ul.subcontents { 317 padding-left: 2em; 318} 319div.body dl { 320 margin-left: 0; 321 margin-top: 0; 322} 323div.body dt { 324 font-style: italic; 325 margin-left: 0; 326 margin-top: 0; 327} 328div.body dd { 329 margin-bottom: 0.5em; 330} 331 332/* This is just for the HTML files generated with the framedhelp target */ 333div.contents { 334 background: #e8e8e8; 335 border: solid thin black; 336 padding: 10px; 337} 338div.contents h1 { 339 font-size: 110%; 340} 341div.contents h2 { 342 font-size: 100%; 343} 344div.contents ul.contents { 345 font-size: 80%; 346} 347div.contents ul.subcontents li { 348 margin-left: 1em; 349 text-indent: -1em; 350} 351--></style> 352</head> 353<body> 354<div class='body'> 355<!-- 356 "$Id: api-array.header 8087 2008-10-27 21:37:05Z mike $" 357 358 PPD Compiler API header for CUPS. 359 360 Copyright 2009 by Apple Inc. 361 362 These coded instructions, statements, and computer programs are the 363 property of Apple Inc. and are protected by Federal copyright 364 law. Distribution and use rights are outlined in the file "LICENSE.txt" 365 which should have been included with this file. If this file is 366 file is missing or damaged, see the license at "http://www.cups.org/". 367--> 368 369<h1 class='title'>PPD Compiler API</h1> 370 371<div class='summary'><table summary='General Information'> 372<thead> 373<tr> 374 <th>Header</th> 375 <th>cups/ppdc.h</th> 376</tr> 377</thead> 378<tbody> 379<tr> 380 <th>Library</th> 381 <td>-lcupsppdc</td> 382</tr> 383<tr> 384 <th>See Also</th> 385 <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a></td> 386</tr> 387</tbody> 388</table></div> 389<h2 class="title">Contents</h2> 390<ul class="contents"> 391<li><a href="#OVERVIEW">Overview</a></li> 392<li><a href="#CLASSES">Classes</a><ul class="code"> 393 <li><a href="#ppdcArray" title="// Shared Array">ppdcArray</a></li> 394 <li><a href="#ppdcAttr" title="// Attribute">ppdcAttr</a></li> 395 <li><a href="#ppdcCatalog" title="// Translation catalog">ppdcCatalog</a></li> 396 <li><a href="#ppdcChoice" title="// Option Choice">ppdcChoice</a></li> 397 <li><a href="#ppdcConstraint" title="// Constraint">ppdcConstraint</a></li> 398 <li><a href="#ppdcDriver" title="// Printer Driver Data">ppdcDriver</a></li> 399 <li><a href="#ppdcFile" title="// File">ppdcFile</a></li> 400 <li><a href="#ppdcFilter" title="// Filter Program">ppdcFilter</a></li> 401 <li><a href="#ppdcFont" title="// Shared Font">ppdcFont</a></li> 402 <li><a href="#ppdcGroup" title="// Group of Options">ppdcGroup</a></li> 403 <li><a href="#ppdcInteger" title="// Shared integer">ppdcInteger</a></li> 404 <li><a href="#ppdcMediaSize" title="// Media Size">ppdcMediaSize</a></li> 405 <li><a href="#ppdcMessage" title="// Translation message">ppdcMessage</a></li> 406 <li><a href="#ppdcOption" title="// Option">ppdcOption</a></li> 407 <li><a href="#ppdcProfile" title="// Color Profile">ppdcProfile</a></li> 408 <li><a href="#ppdcShared" title="// Shared Data Value">ppdcShared</a></li> 409 <li><a href="#ppdcSource" title="// Source File">ppdcSource</a></li> 410 <li><a href="#ppdcString" title="// Shared String">ppdcString</a></li> 411 <li><a href="#ppdcVariable" title="// Variable Definition">ppdcVariable</a></li> 412</ul></li> 413<li><a href="#TYPES">Data Types</a><ul class="code"> 414 <li><a href="#ppdc_cs_t" title="">ppdc_cs_t</a></li> 415</ul></li> 416<li><a href="#VARIABLES">Variables</a><ul class="code"> 417 <li><a href="#ppdcSource" title="// Printer Driver Data">ppdcSource</a></li> 418</ul></li> 419<li><a href="#ENUMERATIONS">Constants</a><ul class="code"> 420 <li><a href="#ppdcCondFlags" title="// Condition flags">ppdcCondFlags</a></li> 421 <li><a href="#ppdcDrvType" title="// Driver type">ppdcDrvType</a></li> 422 <li><a href="#ppdcFontStatus" title="// Load status of font">ppdcFontStatus</a></li> 423 <li><a href="#ppdcLineEnding" title="// Line endings">ppdcLineEnding</a></li> 424 <li><a href="#ppdcOptSection" title="// Option section">ppdcOptSection</a></li> 425 <li><a href="#ppdcOptType" title="// Option type">ppdcOptType</a></li> 426</ul></li> 427</ul> 428<!-- 429 "$Id: api-array.shtml 7616 2008-05-28 00:34:13Z mike $" 430 431 PPD Compiler API introduction for CUPS. 432 433 Copyright 2009 by Apple Inc. 434 435 These coded instructions, statements, and computer programs are the 436 property of Apple Inc. and are protected by Federal copyright 437 law. Distribution and use rights are outlined in the file "LICENSE.txt" 438 which should have been included with this file. If this file is 439 file is missing or damaged, see the license at "http://www.cups.org/". 440--> 441 442<h2 class='title'><a name='OVERVIEW'>Overview</a></h2> 443 444<p>The PPD Compiler API provides access to CUPS driver information files and 445methods for generating and importing PPD files.</p> 446<h2 class="title"><a name="CLASSES">Classes</a></h2> 447<h3 class="class"><a name="ppdcArray">ppdcArray</a></h3> 448<p class="description">// Shared Array</p> 449<p class="code">class ppdcArray : public ppdcShared {<br> 450 public:<br> 451 int count, alloc, current;<br> 452 <a href="#ppdcShared">ppdcShared</a> **data;<br> 453};</p> 454<h4 class="members">Members</h4> 455<dl> 456<dt>current </dt> 457<dd class="description">Current element</dd> 458<dt>data </dt> 459<dd class="description">Elements</dd> 460</dl> 461<h4 class="method"><a name="PPDC_NAME">PPDC_NAME</a></h4> 462<p class="description"></p> 463<p class="code"> 464void PPDC_NAME (<br> 465 void add(<a href="#ppdcShared">ppdcShared</a> *d<br> 466);</p> 467<h5 class="parameters">Parameters</h5> 468<dl> 469<dt>d</dt> 470</dl> 471<h4 class="method"><a name="add">add</a></h4> 472<p class="description"></p> 473<p class="code"> 474void add (<br> 475 <a href="#ppdcShared">ppdcShared</a> *d<br> 476);</p> 477<h5 class="parameters">Parameters</h5> 478<dl> 479<dt>d</dt> 480</dl> 481<h4 class="method"><a name="first">first</a></h4> 482<p class="description">Return the first element in the array.</p> 483<p class="code"> 484<a href="#ppdcShared">ppdcShared</a> *first (void);</p> 485<h5 class="returnvalue">Return Value</h5> 486<p class="description"></p> 487<h4 class="method"><a name="next">next</a></h4> 488<p class="description">Return the next element in the array.</p> 489<p class="code"> 490<a href="#ppdcShared">ppdcShared</a> *next (void);</p> 491<h5 class="returnvalue">Return Value</h5> 492<p class="description"></p> 493<h4 class="method"><a name="ppdcArray">ppdcArray</a></h4> 494<p class="description"></p> 495<p class="code"> 496void ppdcArray (<br> 497 <a href="#ppdcArray">ppdcArray</a> *a<br> 498);</p> 499<h5 class="parameters">Parameters</h5> 500<dl> 501<dt>a</dt> 502</dl> 503<h4 class="method"><a name="remove">remove</a></h4> 504<p class="description"></p> 505<p class="code"> 506void remove (<br> 507 <a href="#ppdcShared">ppdcShared</a> *d<br> 508);</p> 509<h5 class="parameters">Parameters</h5> 510<dl> 511<dt>d</dt> 512<dd class="description">Data element</dd> 513</dl> 514<h4 class="method"><a name="~ppdcArray">~ppdcArray</a></h4> 515<p class="description"></p> 516<p class="code"> 517void ~ppdcArray (void);</p> 518<h3 class="class"><a name="ppdcAttr">ppdcAttr</a></h3> 519<p class="description">// Attribute</p> 520<p class="code">class ppdcAttr : public ppdcShared {<br> 521 public:<br> 522 bool localizable;<br> 523 <a href="#ppdcString">ppdcString</a> *name, *selector, *text, *value;<br> 524};</p> 525<h4 class="members">Members</h4> 526<dl> 527<dt>localizable </dt> 528<dd class="description">Should this attribute be localized?</dd> 529<dt>value </dt> 530<dd class="description">Value string</dd> 531</dl> 532<h4 class="method"><a name="ppdcAttr">ppdcAttr</a></h4> 533<p class="description"></p> 534<p class="code"> 535void ppdcAttr (<br> 536 const char *n,<br> 537 const char *s,<br> 538 const char *t,<br> 539 const char *v,<br> 540 bool loc<br> 541);</p> 542<h5 class="parameters">Parameters</h5> 543<dl> 544<dt>n</dt> 545<dd class="description">Name</dd> 546<dt>s</dt> 547<dd class="description">Spec string</dd> 548<dt>t</dt> 549<dd class="description">Human-readable text</dd> 550<dt>v</dt> 551<dd class="description">Value</dd> 552<dt>loc</dt> 553<dd class="description">Localize this attribute?</dd> 554</dl> 555<h4 class="method"><a name="~ppdcAttr">~ppdcAttr</a></h4> 556<p class="description"></p> 557<p class="code"> 558void ~ppdcAttr (void);</p> 559<h3 class="class"><a name="ppdcCatalog">ppdcCatalog</a></h3> 560<p class="description">// Translation catalog</p> 561<p class="code">class ppdcCatalog : public ppdcShared {<br> 562 public:<br> 563 <a href="#ppdcString">ppdcString</a> *filename;<br> 564 <a href="#ppdcString">ppdcString</a> *locale;<br> 565 <a href="#ppdcArray">ppdcArray</a> *messages;<br> 566};</p> 567<h4 class="members">Members</h4> 568<dl> 569<dt>filename </dt> 570<dd class="description">Name of translation file</dd> 571<dt>locale </dt> 572<dd class="description">Name of locale</dd> 573<dt>messages </dt> 574<dd class="description">Array of translation messages</dd> 575</dl> 576<h4 class="method"><a name="PPDC_NAME">PPDC_NAME</a></h4> 577<p class="description"></p> 578<p class="code"> 579void PPDC_NAME (<br> 580 void add_message(const char *id,<br> 581 const char *string = NULL<br> 582);</p> 583<h5 class="parameters">Parameters</h5> 584<dl> 585<dt>id</dt> 586<dt>string</dt> 587</dl> 588<h4 class="method"><a name="add_message">add_message</a></h4> 589<p class="description"></p> 590<p class="code"> 591void add_message (<br> 592 const char *id,<br> 593 const char *string<br> 594);</p> 595<h5 class="parameters">Parameters</h5> 596<dl> 597<dt>id</dt> 598<dd class="description">Message ID to add</dd> 599<dt>string</dt> 600<dd class="description">Translation string</dd> 601</dl> 602<h4 class="method"><a name="find_message">find_message</a></h4> 603<p class="description"></p> 604<p class="code"> 605const char *find_message (<br> 606 const char *id<br> 607);</p> 608<h5 class="parameters">Parameters</h5> 609<dl> 610<dt>id</dt> 611<dd class="description">Message ID</dd> 612</dl> 613<h5 class="returnvalue">Return Value</h5> 614<p class="description">Message text</p> 615<h4 class="method"><a name="load_messages">load_messages</a></h4> 616<p class="description"></p> 617<p class="code"> 618int load_messages (<br> 619 const char *f<br> 620);</p> 621<h5 class="parameters">Parameters</h5> 622<dl> 623<dt>f</dt> 624<dd class="description">Message catalog file</dd> 625</dl> 626<h5 class="returnvalue">Return Value</h5> 627<p class="description">0 on success, -1 on failure</p> 628<h4 class="method"><a name="ppdcCatalog">ppdcCatalog</a></h4> 629<p class="description"></p> 630<p class="code"> 631void ppdcCatalog (<br> 632 const char *l,<br> 633 const char *f<br> 634);</p> 635<h5 class="parameters">Parameters</h5> 636<dl> 637<dt>l</dt> 638<dd class="description">Locale</dd> 639<dt>f</dt> 640<dd class="description">Message catalog file</dd> 641</dl> 642<h4 class="method"><a name="save_messages">save_messages</a></h4> 643<p class="description"></p> 644<p class="code"> 645int save_messages (<br> 646 const char *f<br> 647);</p> 648<h5 class="parameters">Parameters</h5> 649<dl> 650<dt>f</dt> 651<dd class="description">File to save to</dd> 652</dl> 653<h5 class="returnvalue">Return Value</h5> 654<p class="description">0 on success, -1 on error</p> 655<h4 class="method"><a name="~ppdcCatalog">~ppdcCatalog</a></h4> 656<p class="description"></p> 657<p class="code"> 658void ~ppdcCatalog (void);</p> 659<h3 class="class"><a name="ppdcChoice">ppdcChoice</a></h3> 660<p class="description">// Option Choice</p> 661<p class="code">class ppdcChoice : public ppdcShared {<br> 662 public:<br> 663 <a href="#ppdcString">ppdcString</a> *name, *text, *code;<br> 664};</p> 665<h4 class="members">Members</h4> 666<dl> 667<dt>code </dt> 668<dd class="description">PS code of choice</dd> 669</dl> 670<h4 class="method"><a name="ppdcChoice">ppdcChoice</a></h4> 671<p class="description"></p> 672<p class="code"> 673void ppdcChoice (<br> 674 const char *n,<br> 675 const char *t,<br> 676 const char *c<br> 677);</p> 678<h5 class="parameters">Parameters</h5> 679<dl> 680<dt>n</dt> 681<dd class="description">Name of choice</dd> 682<dt>t</dt> 683<dd class="description">Text of choice</dd> 684<dt>c</dt> 685<dd class="description">Code of choice</dd> 686</dl> 687<h4 class="method"><a name="~ppdcChoice">~ppdcChoice</a></h4> 688<p class="description"></p> 689<p class="code"> 690void ~ppdcChoice (void);</p> 691<h3 class="class"><a name="ppdcConstraint">ppdcConstraint</a></h3> 692<p class="description">// Constraint</p> 693<p class="code">class ppdcConstraint : public ppdcShared {<br> 694 public:<br> 695 <a href="#ppdcString">ppdcString</a> *option1, *choice1, *option2, *choice2;<br> 696};</p> 697<h4 class="members">Members</h4> 698<dl> 699<dt>choice2 </dt> 700<dd class="description">Second choice</dd> 701</dl> 702<h4 class="method"><a name="ppdcConstraint">ppdcConstraint</a></h4> 703<p class="description"></p> 704<p class="code"> 705void ppdcConstraint (<br> 706 const char *o1,<br> 707 const char *c1,<br> 708 const char *o2,<br> 709 const char *c2<br> 710);</p> 711<h5 class="parameters">Parameters</h5> 712<dl> 713<dt>o1</dt> 714<dd class="description">First option</dd> 715<dt>c1</dt> 716<dd class="description">First choice</dd> 717<dt>o2</dt> 718<dd class="description">Second option</dd> 719<dt>c2</dt> 720<dd class="description">Second choice</dd> 721</dl> 722<h4 class="method"><a name="~ppdcConstraint">~ppdcConstraint</a></h4> 723<p class="description"></p> 724<p class="code"> 725void ~ppdcConstraint (void);</p> 726<h3 class="class"><a name="ppdcDriver">ppdcDriver</a></h3> 727<p class="description">// Printer Driver Data</p> 728<p class="code">class ppdcDriver : public ppdcShared {<br> 729 public:<br> 730 <a href="#ppdcArray">ppdcArray</a> *copyright;<br> 731 <a href="#ppdcString">ppdcString</a> *custom_size_code;<br> 732 <a href="#ppdcString">ppdcString</a> *default_font, *default_size;<br> 733 float left_margin, bottom_margin, right_margin, top_margin, max_width, max_length, min_width, min_length;<br> 734 <a href="#ppdcArray">ppdcArray</a> *attrs, *constraints, *filters, *fonts, *groups, *profiles, *sizes;<br> 735 int model_number, manual_copies, color_device, throughput;<br> 736 <a href="#ppdcDrvType">ppdcDrvType</a> type;<br> 737 int variable_paper_size;<br> 738 <a href="#ppdcString">ppdcString</a> *manufacturer, *model_name, *file_name, *pc_file_name, *version;<br> 739};</p> 740<h4 class="members">Members</h4> 741<dl> 742<dt>copyright </dt> 743<dd class="description">Copyright strings</dd> 744<dt>custom_size_code </dt> 745<dd class="description">Custom page size code, if any</dd> 746<dt>default_size </dt> 747<dd class="description">Default size option</dd> 748<dt>min_length </dt> 749<dd class="description">Minimum length (points)</dd> 750<dt>sizes </dt> 751<dd class="description">Fixed sizes</dd> 752<dt>throughput </dt> 753<dd class="description">Throughput in pages per minute</dd> 754<dt>type </dt> 755<dd class="description">Driver type</dd> 756<dt>variable_paper_size </dt> 757<dd class="description">Support variable sizes?</dd> 758<dt>version </dt> 759<dd class="description">Version number</dd> 760</dl> 761<h4 class="method"><a name="PPDC_NAME">PPDC_NAME</a></h4> 762<p class="description"></p> 763<p class="code"> 764void PPDC_NAME (<br> 765 void add_attr(<a href="#ppdcAttr">ppdcAttr</a> *a<br> 766);</p> 767<h5 class="parameters">Parameters</h5> 768<dl> 769<dt>a</dt> 770</dl> 771<h4 class="method"><a name="add_constraint">add_constraint</a></h4> 772<p class="description"></p> 773<p class="code"> 774void add_constraint (<br> 775 <a href="#ppdcConstraint">ppdcConstraint</a> *c<br> 776);</p> 777<h5 class="parameters">Parameters</h5> 778<dl> 779<dt>c</dt> 780</dl> 781<h4 class="method"><a name="add_copyright">add_copyright</a></h4> 782<p class="description"></p> 783<p class="code"> 784void add_copyright (<br> 785 const char *c<br> 786);</p> 787<h5 class="parameters">Parameters</h5> 788<dl> 789<dt>c</dt> 790</dl> 791<h4 class="method"><a name="add_filter">add_filter</a></h4> 792<p class="description"></p> 793<p class="code"> 794void add_filter (<br> 795 <a href="#ppdcFilter">ppdcFilter</a> *f<br> 796);</p> 797<h5 class="parameters">Parameters</h5> 798<dl> 799<dt>f</dt> 800</dl> 801<h4 class="method"><a name="add_font">add_font</a></h4> 802<p class="description"></p> 803<p class="code"> 804void add_font (<br> 805 <a href="#ppdcFont">ppdcFont</a> *f<br> 806);</p> 807<h5 class="parameters">Parameters</h5> 808<dl> 809<dt>f</dt> 810</dl> 811<h4 class="method"><a name="add_group">add_group</a></h4> 812<p class="description"></p> 813<p class="code"> 814void add_group (<br> 815 <a href="#ppdcGroup">ppdcGroup</a> *g<br> 816);</p> 817<h5 class="parameters">Parameters</h5> 818<dl> 819<dt>g</dt> 820</dl> 821<h4 class="method"><a name="add_profile">add_profile</a></h4> 822<p class="description"></p> 823<p class="code"> 824void add_profile (<br> 825 <a href="#ppdcProfile">ppdcProfile</a> *p<br> 826);</p> 827<h5 class="parameters">Parameters</h5> 828<dl> 829<dt>p</dt> 830</dl> 831<h4 class="method"><a name="add_size">add_size</a></h4> 832<p class="description"></p> 833<p class="code"> 834void add_size (<br> 835 <a href="#ppdcMediaSize">ppdcMediaSize</a> *m<br> 836);</p> 837<h5 class="parameters">Parameters</h5> 838<dl> 839<dt>m</dt> 840</dl> 841<h4 class="method"><a name="find_attr">find_attr</a></h4> 842<p class="description"></p> 843<p class="code"> 844<a href="#ppdcAttr">ppdcAttr</a> *find_attr (<br> 845 const char *k,<br> 846 const char *s<br> 847);</p> 848<h5 class="parameters">Parameters</h5> 849<dl> 850<dt>k</dt> 851<dd class="description">Keyword string</dd> 852<dt>s</dt> 853<dd class="description">Spec string</dd> 854</dl> 855<h5 class="returnvalue">Return Value</h5> 856<p class="description">Attribute or NULL</p> 857<h4 class="method"><a name="find_group">find_group</a></h4> 858<p class="description"></p> 859<p class="code"> 860<a href="#ppdcGroup">ppdcGroup</a> *find_group (<br> 861 const char *n<br> 862);</p> 863<h5 class="parameters">Parameters</h5> 864<dl> 865<dt>n</dt> 866<dd class="description">Group name</dd> 867</dl> 868<h5 class="returnvalue">Return Value</h5> 869<p class="description">Matching group or NULL</p> 870<h4 class="method"><a name="find_option">find_option</a></h4> 871<p class="description"></p> 872<p class="code"> 873<a href="#ppdcOption">ppdcOption</a> *find_option (<br> 874 const char *n<br> 875);</p> 876<h5 class="parameters">Parameters</h5> 877<dl> 878<dt>n</dt> 879<dd class="description">Option name</dd> 880</dl> 881<h5 class="returnvalue">Return Value</h5> 882<p class="description">Matching option or NULL</p> 883<h4 class="method"><a name="find_option_group">find_option_group</a></h4> 884<p class="description"></p> 885<p class="code"> 886<a href="#ppdcOption">ppdcOption</a> *find_option_group (<br> 887 const char *n,<br> 888 <a href="#ppdcGroup">ppdcGroup</a> **mg<br> 889);</p> 890<h5 class="parameters">Parameters</h5> 891<dl> 892<dt>n</dt> 893<dd class="description">Option name</dd> 894<dt>mg</dt> 895<dd class="description">Matching group or NULL</dd> 896</dl> 897<h5 class="returnvalue">Return Value</h5> 898<p class="description">Matching option or NULL</p> 899<h4 class="method"><a name="ppdcDriver">ppdcDriver</a></h4> 900<p class="description"></p> 901<p class="code"> 902void ppdcDriver (<br> 903 <a href="#ppdcDriver">ppdcDriver</a> *d<br> 904);</p> 905<h5 class="parameters">Parameters</h5> 906<dl> 907<dt>d</dt> 908<dd class="description">Printer driver template</dd> 909</dl> 910<h4 class="method"><a name="set_custom_size_code">set_custom_size_code</a></h4> 911<p class="description"></p> 912<p class="code"> 913void set_custom_size_code (<br> 914 const char *c<br> 915);</p> 916<h5 class="parameters">Parameters</h5> 917<dl> 918<dt>c</dt> 919<dd class="description">CustomPageSize code</dd> 920</dl> 921<h4 class="method"><a name="set_default_font">set_default_font</a></h4> 922<p class="description"></p> 923<p class="code"> 924void set_default_font (<br> 925 <a href="#ppdcFont">ppdcFont</a> *f<br> 926);</p> 927<h5 class="parameters">Parameters</h5> 928<dl> 929<dt>f</dt> 930<dd class="description">Font</dd> 931</dl> 932<h4 class="method"><a name="set_default_size">set_default_size</a></h4> 933<p class="description"></p> 934<p class="code"> 935void set_default_size (<br> 936 <a href="#ppdcMediaSize">ppdcMediaSize</a> *m<br> 937);</p> 938<h5 class="parameters">Parameters</h5> 939<dl> 940<dt>m</dt> 941<dd class="description">Media size</dd> 942</dl> 943<h4 class="method"><a name="set_file_name">set_file_name</a></h4> 944<p class="description"></p> 945<p class="code"> 946void set_file_name (<br> 947 const char *f<br> 948);</p> 949<h5 class="parameters">Parameters</h5> 950<dl> 951<dt>f</dt> 952<dd class="description">Filename</dd> 953</dl> 954<h4 class="method"><a name="set_manufacturer">set_manufacturer</a></h4> 955<p class="description"></p> 956<p class="code"> 957void set_manufacturer (<br> 958 const char *m<br> 959);</p> 960<h5 class="parameters">Parameters</h5> 961<dl> 962<dt>m</dt> 963<dd class="description">Model name</dd> 964</dl> 965<h4 class="method"><a name="set_model_name">set_model_name</a></h4> 966<p class="description"></p> 967<p class="code"> 968void set_model_name (<br> 969 const char *m<br> 970);</p> 971<h5 class="parameters">Parameters</h5> 972<dl> 973<dt>m</dt> 974<dd class="description">Model name</dd> 975</dl> 976<h4 class="method"><a name="set_pc_file_name">set_pc_file_name</a></h4> 977<p class="description"></p> 978<p class="code"> 979void set_pc_file_name (<br> 980 const char *f<br> 981);</p> 982<h5 class="parameters">Parameters</h5> 983<dl> 984<dt>f</dt> 985<dd class="description">Filename</dd> 986</dl> 987<h4 class="method"><a name="set_version">set_version</a></h4> 988<p class="description"></p> 989<p class="code"> 990void set_version (<br> 991 const char *v<br> 992);</p> 993<h5 class="parameters">Parameters</h5> 994<dl> 995<dt>v</dt> 996<dd class="description">Version</dd> 997</dl> 998<h4 class="method"><a name="write_ppd_file">write_ppd_file</a></h4> 999<p class="description"></p> 1000<p class="code"> 1001int write_ppd_file (<br> 1002 cups_file_t *fp,<br> 1003 <a href="#ppdcCatalog">ppdcCatalog</a> *catalog,<br> 1004 <a href="#ppdcArray">ppdcArray</a> *locales,<br> 1005 <a href="#ppdcSource">ppdcSource</a> *src,<br> 1006 <a href="#ppdcLineEnding">ppdcLineEnding</a> le<br> 1007);</p> 1008<h5 class="parameters">Parameters</h5> 1009<dl> 1010<dt>fp</dt> 1011<dd class="description">PPD file</dd> 1012<dt>catalog</dt> 1013<dd class="description">Message catalog</dd> 1014<dt>locales</dt> 1015<dd class="description">Additional languages to add</dd> 1016<dt>src</dt> 1017<dd class="description">Driver source</dd> 1018<dt>le</dt> 1019<dd class="description">Line endings to use</dd> 1020</dl> 1021<h5 class="returnvalue">Return Value</h5> 1022<p class="description">0 on success, -1 on failure</p> 1023<h4 class="method"><a name="~ppdcDriver">~ppdcDriver</a></h4> 1024<p class="description"></p> 1025<p class="code"> 1026void ~ppdcDriver (void);</p> 1027<h3 class="class"><a name="ppdcFile">ppdcFile</a></h3> 1028<p class="description">// File</p> 1029<p class="code">class ppdcFile {<br> 1030 public:<br> 1031 bool close_on_delete;<br> 1032 const char *filename;<br> 1033 cups_file_t *fp;<br> 1034 int line;<br> 1035};</p> 1036<h4 class="members">Members</h4> 1037<dl> 1038<dt>close_on_delete </dt> 1039<dd class="description">Close file on delete?</dd> 1040<dt>filename </dt> 1041<dd class="description">Filename</dd> 1042<dt>fp </dt> 1043<dd class="description">File pointer</dd> 1044<dt>line </dt> 1045<dd class="description">Line in file</dd> 1046</dl> 1047<h4 class="method"><a name="get">get</a></h4> 1048<p class="description">Get a character from a file.</p> 1049<p class="code"> 1050int get (void);</p> 1051<h5 class="returnvalue">Return Value</h5> 1052<p class="description"></p> 1053<h4 class="method"><a name="peek">peek</a></h4> 1054<p class="description"></p> 1055<p class="code"> 1056int peek (void);</p> 1057<h5 class="returnvalue">Return Value</h5> 1058<p class="description">Next character in file</p> 1059<h4 class="method"><a name="ppdcFile">ppdcFile</a></h4> 1060<p class="description"></p> 1061<p class="code"> 1062void ppdcFile (<br> 1063 const char *f,<br> 1064 cups_file_t *ffp<br> 1065);</p> 1066<h5 class="parameters">Parameters</h5> 1067<dl> 1068<dt>f</dt> 1069<dd class="description">File to open</dd> 1070<dt>ffp</dt> 1071<dd class="description">File pointer to use</dd> 1072</dl> 1073<h4 class="method"><a name="~ppdcFile">~ppdcFile</a></h4> 1074<p class="description"></p> 1075<p class="code"> 1076void ~ppdcFile (void);</p> 1077<h3 class="class"><a name="ppdcFilter">ppdcFilter</a></h3> 1078<p class="description">// Filter Program</p> 1079<p class="code">class ppdcFilter : public ppdcShared {<br> 1080 public:<br> 1081 int cost;<br> 1082 <a href="#ppdcString">ppdcString</a> *mime_type, *program;<br> 1083};</p> 1084<h4 class="members">Members</h4> 1085<dl> 1086<dt>cost </dt> 1087<dd class="description">Relative cost of filter</dd> 1088<dt>program </dt> 1089<dd class="description">Filter program</dd> 1090</dl> 1091<h4 class="method"><a name="ppdcFilter">ppdcFilter</a></h4> 1092<p class="description"></p> 1093<p class="code"> 1094void ppdcFilter (<br> 1095 const char *t,<br> 1096 const char *p,<br> 1097 int c<br> 1098);</p> 1099<h5 class="parameters">Parameters</h5> 1100<dl> 1101<dt>t</dt> 1102<dd class="description">MIME type</dd> 1103<dt>p</dt> 1104<dd class="description">Filter program</dd> 1105<dt>c</dt> 1106<dd class="description">Relative cost</dd> 1107</dl> 1108<h4 class="method"><a name="~ppdcFilter">~ppdcFilter</a></h4> 1109<p class="description"></p> 1110<p class="code"> 1111void ~ppdcFilter (void);</p> 1112<h3 class="class"><a name="ppdcFont">ppdcFont</a></h3> 1113<p class="description">// Shared Font</p> 1114<p class="code">class ppdcFont : public ppdcShared {<br> 1115 public:<br> 1116 <a href="#ppdcString">ppdcString</a> *name, *encoding, *version, *charset;<br> 1117 <a href="#ppdcFontStatus">ppdcFontStatus</a> status;<br> 1118};</p> 1119<h4 class="members">Members</h4> 1120<dl> 1121<dt>charset </dt> 1122<dd class="description">Font charset</dd> 1123<dt>status </dt> 1124<dd class="description">Font status (ROM or Disk)</dd> 1125</dl> 1126<h4 class="method"><a name="ppdcFont">ppdcFont</a></h4> 1127<p class="description"></p> 1128<p class="code"> 1129void ppdcFont (<br> 1130 const char *n,<br> 1131 const char *e,<br> 1132 const char *v,<br> 1133 const char *c,<br> 1134 <a href="#ppdcFontStatus">ppdcFontStatus</a> s<br> 1135);</p> 1136<h5 class="parameters">Parameters</h5> 1137<dl> 1138<dt>n</dt> 1139<dd class="description">Name of font</dd> 1140<dt>e</dt> 1141<dd class="description">Font encoding</dd> 1142<dt>v</dt> 1143<dd class="description">Font version</dd> 1144<dt>c</dt> 1145<dd class="description">Font charset</dd> 1146<dt>s</dt> 1147<dd class="description">Font status</dd> 1148</dl> 1149<h4 class="method"><a name="~ppdcFont">~ppdcFont</a></h4> 1150<p class="description"></p> 1151<p class="code"> 1152void ~ppdcFont (void);</p> 1153<h3 class="class"><a name="ppdcGroup">ppdcGroup</a></h3> 1154<p class="description">// Group of Options</p> 1155<p class="code">class ppdcGroup : public ppdcShared {<br> 1156 public:<br> 1157 <a href="#ppdcArray">ppdcArray</a> *options;<br> 1158 <a href="#ppdcString">ppdcString</a> *name, *text;<br> 1159};</p> 1160<h4 class="members">Members</h4> 1161<dl> 1162<dt>options </dt> 1163<dd class="description">Options</dd> 1164<dt>text </dt> 1165<dd class="description">Human-readable text of option</dd> 1166</dl> 1167<h4 class="method"><a name="PPDC_NAME">PPDC_NAME</a></h4> 1168<p class="description"></p> 1169<p class="code"> 1170void PPDC_NAME (<br> 1171 void add_option(<a href="#ppdcOption">ppdcOption</a> *o<br> 1172);</p> 1173<h5 class="parameters">Parameters</h5> 1174<dl> 1175<dt>o</dt> 1176</dl> 1177<h4 class="method"><a name="find_option">find_option</a></h4> 1178<p class="description">Find an option in a group.</p> 1179<p class="code"> 1180<a href="#ppdcOption">ppdcOption</a> *find_option (<br> 1181 const char *n<br> 1182);</p> 1183<h5 class="parameters">Parameters</h5> 1184<dl> 1185<dt>n</dt> 1186<dd class="description">Name of option</dd> 1187</dl> 1188<h5 class="returnvalue">Return Value</h5> 1189<p class="description"></p> 1190<h4 class="method"><a name="ppdcGroup">ppdcGroup</a></h4> 1191<p class="description"></p> 1192<p class="code"> 1193void ppdcGroup (<br> 1194 <a href="#ppdcGroup">ppdcGroup</a> *g<br> 1195);</p> 1196<h5 class="parameters">Parameters</h5> 1197<dl> 1198<dt>g</dt> 1199<dd class="description">Group template</dd> 1200</dl> 1201<h4 class="method"><a name="~ppdcGroup">~ppdcGroup</a></h4> 1202<p class="description"></p> 1203<p class="code"> 1204void ~ppdcGroup (void);</p> 1205<h3 class="class"><a name="ppdcInteger">ppdcInteger</a></h3> 1206<p class="description">// Shared integer</p> 1207<p class="code">class ppdcInteger : public ppdcShared {<br> 1208 public:<br> 1209 int *value;<br> 1210};</p> 1211<h4 class="members">Members</h4> 1212<dl> 1213<dt>value </dt> 1214<dd class="description">Integer value</dd> 1215</dl> 1216<h4 class="method"><a name="ppdcInteger">ppdcInteger</a></h4> 1217<p class="description">Integer value</p> 1218<p class="code"> 1219void ppdcInteger (<br> 1220 int *v<br> 1221);</p> 1222<h5 class="parameters">Parameters</h5> 1223<dl> 1224<dt>v</dt> 1225</dl> 1226<h3 class="class"><a name="ppdcMediaSize">ppdcMediaSize</a></h3> 1227<p class="description">// Media Size</p> 1228<p class="code">class ppdcMediaSize : public ppdcShared {<br> 1229 public:<br> 1230 <a href="#ppdcString">ppdcString</a> *size_code, *region_code;<br> 1231 <a href="#ppdcString">ppdcString</a> *name, *text;<br> 1232 float width, length, left, bottom, right, top;<br> 1233};</p> 1234<h4 class="members">Members</h4> 1235<dl> 1236<dt>region_code </dt> 1237<dd class="description">PageRegion code, if any</dd> 1238<dt>text </dt> 1239<dd class="description">Human-readable text</dd> 1240<dt>top </dt> 1241<dd class="description">Top limit in points</dd> 1242</dl> 1243<h4 class="method"><a name="ppdcMediaSize">ppdcMediaSize</a></h4> 1244<p class="description"></p> 1245<p class="code"> 1246void ppdcMediaSize (<br> 1247 const char *n,<br> 1248 const char *t,<br> 1249 float w,<br> 1250 float l,<br> 1251 float lm,<br> 1252 float bm,<br> 1253 float rm,<br> 1254 float tm,<br> 1255 const char *sc,<br> 1256 const char *rc<br> 1257);</p> 1258<h5 class="parameters">Parameters</h5> 1259<dl> 1260<dt>n</dt> 1261<dd class="description">Name of media size</dd> 1262<dt>t</dt> 1263<dd class="description">Text of media size</dd> 1264<dt>w</dt> 1265<dd class="description">Width in points</dd> 1266<dt>l</dt> 1267<dd class="description">Length in points</dd> 1268<dt>lm</dt> 1269<dd class="description">Left margin in points</dd> 1270<dt>bm</dt> 1271<dd class="description">Bottom margin in points</dd> 1272<dt>rm</dt> 1273<dd class="description">Right margin in points</dd> 1274<dt>tm</dt> 1275<dd class="description">Top margin in points</dd> 1276<dt>sc</dt> 1277<dd class="description">PageSize code, if any</dd> 1278<dt>rc</dt> 1279<dd class="description">PageRegion code, if any</dd> 1280</dl> 1281<h4 class="method"><a name="~ppdcMediaSize">~ppdcMediaSize</a></h4> 1282<p class="description"></p> 1283<p class="code"> 1284void ~ppdcMediaSize (void);</p> 1285<h3 class="class"><a name="ppdcMessage">ppdcMessage</a></h3> 1286<p class="description">// Translation message</p> 1287<p class="code">class ppdcMessage : public ppdcShared {<br> 1288 public:<br> 1289 <a href="#ppdcString">ppdcString</a> *id, *string;<br> 1290};</p> 1291<h4 class="members">Members</h4> 1292<dl> 1293<dt>string </dt> 1294<dd class="description">Translation string</dd> 1295</dl> 1296<h4 class="method"><a name="ppdcMessage">ppdcMessage</a></h4> 1297<p class="description"></p> 1298<p class="code"> 1299void ppdcMessage (<br> 1300 const char *i,<br> 1301 const char *s<br> 1302);</p> 1303<h5 class="parameters">Parameters</h5> 1304<dl> 1305<dt>i</dt> 1306<dd class="description">ID</dd> 1307<dt>s</dt> 1308<dd class="description">Text</dd> 1309</dl> 1310<h4 class="method"><a name="~ppdcMessage">~ppdcMessage</a></h4> 1311<p class="description"></p> 1312<p class="code"> 1313void ~ppdcMessage (void);</p> 1314<h3 class="class"><a name="ppdcOption">ppdcOption</a></h3> 1315<p class="description">// Option</p> 1316<p class="code">class ppdcOption : public ppdcShared {<br> 1317 public:<br> 1318 <a href="#ppdcArray">ppdcArray</a> *choices;<br> 1319 <a href="#ppdcString">ppdcString</a> *defchoice;<br> 1320 float order;<br> 1321 <a href="#ppdcOptSection">ppdcOptSection</a> section;<br> 1322 <a href="#ppdcString">ppdcString</a> *name, *text;<br> 1323 <a href="#ppdcOptType">ppdcOptType</a> type;<br> 1324};</p> 1325<h4 class="members">Members</h4> 1326<dl> 1327<dt>choices </dt> 1328<dd class="description">Choices</dd> 1329<dt>defchoice </dt> 1330<dd class="description">Default choice</dd> 1331<dt>order </dt> 1332<dd class="description">Order number</dd> 1333<dt>section </dt> 1334<dd class="description">Section for option code</dd> 1335<dt>text </dt> 1336<dd class="description">Human-readable text of option</dd> 1337<dt>type </dt> 1338<dd class="description">Type of option</dd> 1339</dl> 1340<h4 class="method"><a name="PPDC_NAME">PPDC_NAME</a></h4> 1341<p class="description"></p> 1342<p class="code"> 1343void PPDC_NAME (<br> 1344 void add_choice(<a href="#ppdcChoice">ppdcChoice</a> *c<br> 1345);</p> 1346<h5 class="parameters">Parameters</h5> 1347<dl> 1348<dt>c</dt> 1349</dl> 1350<h4 class="method"><a name="find_choice">find_choice</a></h4> 1351<p class="description"></p> 1352<p class="code"> 1353<a href="#ppdcChoice">ppdcChoice</a> *find_choice (<br> 1354 const char *n<br> 1355);</p> 1356<h5 class="parameters">Parameters</h5> 1357<dl> 1358<dt>n</dt> 1359<dd class="description">Name of choice</dd> 1360</dl> 1361<h5 class="returnvalue">Return Value</h5> 1362<p class="description">Choice or NULL</p> 1363<h4 class="method"><a name="ppdcOption">ppdcOption</a></h4> 1364<p class="description"></p> 1365<p class="code"> 1366void ppdcOption (<br> 1367 <a href="#ppdcOption">ppdcOption</a> *o<br> 1368);</p> 1369<h5 class="parameters">Parameters</h5> 1370<dl> 1371<dt>o</dt> 1372<dd class="description">Template option</dd> 1373</dl> 1374<h4 class="method"><a name="set_defchoice">set_defchoice</a></h4> 1375<p class="description"></p> 1376<p class="code"> 1377void set_defchoice (<br> 1378 <a href="#ppdcChoice">ppdcChoice</a> *c<br> 1379);</p> 1380<h5 class="parameters">Parameters</h5> 1381<dl> 1382<dt>c</dt> 1383<dd class="description">Choice</dd> 1384</dl> 1385<h4 class="method"><a name="~ppdcOption">~ppdcOption</a></h4> 1386<p class="description"></p> 1387<p class="code"> 1388void ~ppdcOption (void);</p> 1389<h3 class="class"><a name="ppdcProfile">ppdcProfile</a></h3> 1390<p class="description">// Color Profile</p> 1391<p class="code">class ppdcProfile : public ppdcShared {<br> 1392 public:<br> 1393 <a href="#ppdcString">ppdcString</a> *resolution, *media_type;<br> 1394 float density, gamma, profile[9];<br> 1395};</p> 1396<h4 class="members">Members</h4> 1397<dl> 1398<dt>media_type </dt> 1399<dd class="description">Media type name</dd> 1400<dt>profile[9] </dt> 1401<dd class="description">Color profile matrix</dd> 1402</dl> 1403<h4 class="method"><a name="ppdcProfile">ppdcProfile</a></h4> 1404<p class="description"></p> 1405<p class="code"> 1406void ppdcProfile (<br> 1407 const char *r,<br> 1408 const char *m,<br> 1409 float d,<br> 1410 float g,<br> 1411 const float *p<br> 1412);</p> 1413<h5 class="parameters">Parameters</h5> 1414<dl> 1415<dt>r</dt> 1416<dd class="description">Resolution name</dd> 1417<dt>m</dt> 1418<dd class="description">Media type name</dd> 1419<dt>d</dt> 1420<dd class="description">Density</dd> 1421<dt>g</dt> 1422<dd class="description">Gamma</dd> 1423<dt>p</dt> 1424<dd class="description">3x3 transform matrix</dd> 1425</dl> 1426<h4 class="method"><a name="~ppdcProfile">~ppdcProfile</a></h4> 1427<p class="description"></p> 1428<p class="code"> 1429void ~ppdcProfile (void);</p> 1430<h3 class="class"><a name="ppdcShared">ppdcShared</a></h3> 1431<p class="description">// Shared Data Value</p> 1432<p class="code">class ppdcShared {<br> 1433 private:<br> 1434 int use;<br> 1435};</p> 1436<h4 class="members">Members</h4> 1437<dl> 1438<dt>use </dt> 1439<dd class="description">Use count (delete when 0)</dd> 1440</dl> 1441<h4 class="method"><a name="class_name">class_name</a></h4> 1442<p class="description"></p> 1443<p class="code"> 1444virtual const char *class_name (void);</p> 1445<h5 class="returnvalue">Return Value</h5> 1446<p class="description"></p> 1447<h4 class="method"><a name="ppdcShared">ppdcShared</a></h4> 1448<p class="description"></p> 1449<p class="code"> 1450void ppdcShared (void);</p> 1451<h4 class="method"><a name="release">release</a></h4> 1452<p class="description"></p> 1453<p class="code"> 1454void release (void);</p> 1455<h4 class="method"><a name="retain">retain</a></h4> 1456<p class="description"></p> 1457<p class="code"> 1458void retain (void);</p> 1459<h4 class="method"><a name="~ppdcShared">~ppdcShared</a></h4> 1460<p class="description"></p> 1461<p class="code"> 1462void ~ppdcShared (void);</p> 1463<h3 class="class"><a name="ppdcSource">ppdcSource</a></h3> 1464<p class="description">// Source File</p> 1465<p class="code">class ppdcSource : public ppdcShared {<br> 1466 public:<br> 1467 int cond_state, *cond_current, cond_stack[101];<br> 1468 static const char *driver_types[];<br> 1469 <a href="#ppdcString">ppdcString</a> *filename;<br> 1470 static <a href="#ppdcArray">ppdcArray</a> *includes;<br> 1471 <a href="#ppdcArray">ppdcArray</a> *base_fonts, *drivers, *po_files, *sizes, *vars;<br> 1472};</p> 1473<h4 class="members">Members</h4> 1474<dl> 1475<dt>cond_stack[101] </dt> 1476<dd class="description">#if state stack</dd> 1477<dt>driver_types[] </dt> 1478<dd class="description">Driver types</dd> 1479<dt>filename </dt> 1480<dd class="description">Filename</dd> 1481<dt>includes </dt> 1482<dd class="description">Include directories</dd> 1483<dt>vars </dt> 1484<dd class="description">Defined variables</dd> 1485</dl> 1486<h4 class="method"><a name="PPDC_NAME">PPDC_NAME</a></h4> 1487<p class="description"></p> 1488<p class="code"> 1489void PPDC_NAME (<br> 1490 static void add_include(const char *d<br> 1491);</p> 1492<h5 class="parameters">Parameters</h5> 1493<dl> 1494<dt>d</dt> 1495</dl> 1496<h4 class="method"><a name="add_include">add_include</a></h4> 1497<p class="description"></p> 1498<p class="code"> 1499void add_include (<br> 1500 const char *d<br> 1501);</p> 1502<h5 class="parameters">Parameters</h5> 1503<dl> 1504<dt>d</dt> 1505<dd class="description">Include directory</dd> 1506</dl> 1507<h4 class="method"><a name="find_driver">find_driver</a></h4> 1508<p class="description"></p> 1509<p class="code"> 1510<a href="#ppdcDriver">ppdcDriver</a> *find_driver (<br> 1511 const char *f<br> 1512);</p> 1513<h5 class="parameters">Parameters</h5> 1514<dl> 1515<dt>f</dt> 1516<dd class="description">Driver file name</dd> 1517</dl> 1518<h5 class="returnvalue">Return Value</h5> 1519<p class="description">Driver</p> 1520<h4 class="method"><a name="find_include">find_include</a></h4> 1521<p class="description"></p> 1522<p class="code"> 1523char *find_include (<br> 1524 const char *f,<br> 1525 const char *base,<br> 1526 char *n,<br> 1527 int nlen<br> 1528);</p> 1529<h5 class="parameters">Parameters</h5> 1530<dl> 1531<dt>f</dt> 1532<dd class="description">Include filename</dd> 1533<dt>base</dt> 1534<dd class="description">Current directory</dd> 1535<dt>n</dt> 1536<dd class="description">Path buffer</dd> 1537<dt>nlen</dt> 1538<dd class="description">Path buffer length</dd> 1539</dl> 1540<h5 class="returnvalue">Return Value</h5> 1541<p class="description">Found path or NULL</p> 1542<h4 class="method"><a name="find_po">find_po</a></h4> 1543<p class="description"></p> 1544<p class="code"> 1545<a href="#ppdcCatalog">ppdcCatalog</a> *find_po (<br> 1546 const char *l<br> 1547);</p> 1548<h5 class="parameters">Parameters</h5> 1549<dl> 1550<dt>l</dt> 1551<dd class="description">Locale name</dd> 1552</dl> 1553<h5 class="returnvalue">Return Value</h5> 1554<p class="description">Message catalog or NULL</p> 1555<h4 class="method"><a name="find_size">find_size</a></h4> 1556<p class="description"></p> 1557<p class="code"> 1558<a href="#ppdcMediaSize">ppdcMediaSize</a> *find_size (<br> 1559 const char *s<br> 1560);</p> 1561<h5 class="parameters">Parameters</h5> 1562<dl> 1563<dt>s</dt> 1564<dd class="description">Size name</dd> 1565</dl> 1566<h5 class="returnvalue">Return Value</h5> 1567<p class="description">Size</p> 1568<h4 class="method"><a name="find_variable">find_variable</a></h4> 1569<p class="description"></p> 1570<p class="code"> 1571<a href="#ppdcVariable">ppdcVariable</a> *find_variable (<br> 1572 const char *n<br> 1573);</p> 1574<h5 class="parameters">Parameters</h5> 1575<dl> 1576<dt>n</dt> 1577<dd class="description">Variable name</dd> 1578</dl> 1579<h5 class="returnvalue">Return Value</h5> 1580<p class="description">Variable</p> 1581<h4 class="method"><a name="get_attr">get_attr</a></h4> 1582<p class="description"></p> 1583<p class="code"> 1584<a href="#ppdcAttr">ppdcAttr</a> *get_attr (<br> 1585 <a href="#ppdcFile">ppdcFile</a> *fp,<br> 1586 bool loc<br> 1587);</p> 1588<h5 class="parameters">Parameters</h5> 1589<dl> 1590<dt>fp</dt> 1591<dd class="description">File to read</dd> 1592<dt>loc</dt> 1593<dd class="description">Localize this attribute?</dd> 1594</dl> 1595<h5 class="returnvalue">Return Value</h5> 1596<p class="description">Attribute</p> 1597<h4 class="method"><a name="get_boolean">get_boolean</a></h4> 1598<p class="description"></p> 1599<p class="code"> 1600int get_boolean (<br> 1601 <a href="#ppdcFile">ppdcFile</a> *fp<br> 1602);</p> 1603<h5 class="parameters">Parameters</h5> 1604<dl> 1605<dt>fp</dt> 1606<dd class="description">File to read</dd> 1607</dl> 1608<h5 class="returnvalue">Return Value</h5> 1609<p class="description">Boolean value</p> 1610<h4 class="method"><a name="get_choice">get_choice</a></h4> 1611<p class="description"></p> 1612<p class="code"> 1613<a href="#ppdcChoice">ppdcChoice</a> *get_choice (<br> 1614 <a href="#ppdcFile">ppdcFile</a> *fp<br> 1615);</p> 1616<h5 class="parameters">Parameters</h5> 1617<dl> 1618<dt>fp</dt> 1619<dd class="description">File to read</dd> 1620</dl> 1621<h5 class="returnvalue">Return Value</h5> 1622<p class="description">Choice data</p> 1623<h4 class="method"><a name="get_color_model">get_color_model</a></h4> 1624<p class="description"></p> 1625<p class="code"> 1626<a href="#ppdcChoice">ppdcChoice</a> *get_color_model (<br> 1627 <a href="#ppdcFile">ppdcFile</a> *fp<br> 1628);</p> 1629<h5 class="parameters">Parameters</h5> 1630<dl> 1631<dt>fp</dt> 1632<dd class="description">File to read</dd> 1633</dl> 1634<h5 class="returnvalue">Return Value</h5> 1635<p class="description">Choice data</p> 1636<h4 class="method"><a name="get_color_order">get_color_order</a></h4> 1637<p class="description"></p> 1638<p class="code"> 1639int get_color_order (<br> 1640 const char *co<br> 1641);</p> 1642<h5 class="parameters">Parameters</h5> 1643<dl> 1644<dt>co</dt> 1645<dd class="description">Color order string</dd> 1646</dl> 1647<h5 class="returnvalue">Return Value</h5> 1648<p class="description">Color order value</p> 1649<h4 class="method"><a name="get_color_profile">get_color_profile</a></h4> 1650<p class="description"></p> 1651<p class="code"> 1652<a href="#ppdcProfile">ppdcProfile</a> *get_color_profile (<br> 1653 <a href="#ppdcFile">ppdcFile</a> *fp<br> 1654);</p> 1655<h5 class="parameters">Parameters</h5> 1656<dl> 1657<dt>fp</dt> 1658<dd class="description">File to read</dd> 1659</dl> 1660<h5 class="returnvalue">Return Value</h5> 1661<p class="description">Color profile</p> 1662<h4 class="method"><a name="get_color_space">get_color_space</a></h4> 1663<p class="description"></p> 1664<p class="code"> 1665int get_color_space (<br> 1666 const char *cs<br> 1667);</p> 1668<h5 class="parameters">Parameters</h5> 1669<dl> 1670<dt>cs</dt> 1671<dd class="description">Colorspace string</dd> 1672</dl> 1673<h5 class="returnvalue">Return Value</h5> 1674<p class="description">Colorspace value</p> 1675<h4 class="method"><a name="get_constraint">get_constraint</a></h4> 1676<p class="description"></p> 1677<p class="code"> 1678<a href="#ppdcConstraint">ppdcConstraint</a> *get_constraint (<br> 1679 <a href="#ppdcFile">ppdcFile</a> *fp<br> 1680);</p> 1681<h5 class="parameters">Parameters</h5> 1682<dl> 1683<dt>fp</dt> 1684<dd class="description">File to read</dd> 1685</dl> 1686<h5 class="returnvalue">Return Value</h5> 1687<p class="description">Constraint</p> 1688<h4 class="method"><a name="get_custom_size">get_custom_size</a></h4> 1689<p class="description"></p> 1690<p class="code"> 1691<a href="#ppdcMediaSize">ppdcMediaSize</a> *get_custom_size (<br> 1692 <a href="#ppdcFile">ppdcFile</a> *fp<br> 1693);</p> 1694<h5 class="parameters">Parameters</h5> 1695<dl> 1696<dt>fp</dt> 1697<dd class="description">File to read</dd> 1698</dl> 1699<h5 class="returnvalue">Return Value</h5> 1700<p class="description">Media size</p> 1701<h4 class="method"><a name="get_duplex">get_duplex</a></h4> 1702<p class="description"></p> 1703<p class="code"> 1704void get_duplex (<br> 1705 <a href="#ppdcFile">ppdcFile</a> *fp,<br> 1706 <a href="#ppdcDriver">ppdcDriver</a> *d<br> 1707);</p> 1708<h5 class="parameters">Parameters</h5> 1709<dl> 1710<dt>fp</dt> 1711<dd class="description">File to read from</dd> 1712<dt>d</dt> 1713<dd class="description">Current driver</dd> 1714</dl> 1715<h4 class="method"><a name="get_filter">get_filter</a></h4> 1716<p class="description"></p> 1717<p class="code"> 1718<a href="#ppdcFilter">ppdcFilter</a> *get_filter (<br> 1719 <a href="#ppdcFile">ppdcFile</a> *fp<br> 1720);</p> 1721<h5 class="parameters">Parameters</h5> 1722<dl> 1723<dt>fp</dt> 1724<dd class="description">File to read</dd> 1725</dl> 1726<h5 class="returnvalue">Return Value</h5> 1727<p class="description">Filter</p> 1728<h4 class="method"><a name="get_float">get_float</a></h4> 1729<p class="description"></p> 1730<p class="code"> 1731float get_float (<br> 1732 <a href="#ppdcFile">ppdcFile</a> *fp<br> 1733);</p> 1734<h5 class="parameters">Parameters</h5> 1735<dl> 1736<dt>fp</dt> 1737<dd class="description">File to read</dd> 1738</dl> 1739<h5 class="returnvalue">Return Value</h5> 1740<p class="description">Number</p> 1741<h4 class="method"><a name="get_font">get_font</a></h4> 1742<p class="description"></p> 1743<p class="code"> 1744<a href="#ppdcFont">ppdcFont</a> *get_font (<br> 1745 <a href="#ppdcFile">ppdcFile</a> *fp<br> 1746);</p> 1747<h5 class="parameters">Parameters</h5> 1748<dl> 1749<dt>fp</dt> 1750<dd class="description">File to read</dd> 1751</dl> 1752<h5 class="returnvalue">Return Value</h5> 1753<p class="description">Font data</p> 1754<h4 class="method"><a name="get_generic">get_generic</a></h4> 1755<p class="description"></p> 1756<p class="code"> 1757<a href="#ppdcChoice">ppdcChoice</a> *get_generic (<br> 1758 <a href="#ppdcFile">ppdcFile</a> *fp,<br> 1759 const char *keyword,<br> 1760 const char *tattr,<br> 1761 const char *nattr<br> 1762);</p> 1763<h5 class="parameters">Parameters</h5> 1764<dl> 1765<dt>fp</dt> 1766<dd class="description">File to read</dd> 1767<dt>keyword</dt> 1768<dd class="description">Keyword name</dd> 1769<dt>tattr</dt> 1770<dd class="description">Text attribute</dd> 1771<dt>nattr</dt> 1772<dd class="description">Numeric attribute</dd> 1773</dl> 1774<h5 class="returnvalue">Return Value</h5> 1775<p class="description">Choice data</p> 1776<h4 class="method"><a name="get_group">get_group</a></h4> 1777<p class="description"></p> 1778<p class="code"> 1779<a href="#ppdcGroup">ppdcGroup</a> *get_group (<br> 1780 <a href="#ppdcFile">ppdcFile</a> *fp,<br> 1781 <a href="#ppdcDriver">ppdcDriver</a> *d<br> 1782);</p> 1783<h5 class="parameters">Parameters</h5> 1784<dl> 1785<dt>fp</dt> 1786<dd class="description">File to read</dd> 1787<dt>d</dt> 1788<dd class="description">Printer driver</dd> 1789</dl> 1790<h5 class="returnvalue">Return Value</h5> 1791<p class="description">Group</p> 1792<h4 class="method"><a name="get_installable">get_installable</a></h4> 1793<p class="description"></p> 1794<p class="code"> 1795<a href="#ppdcOption">ppdcOption</a> *get_installable (<br> 1796 <a href="#ppdcFile">ppdcFile</a> *fp<br> 1797);</p> 1798<h5 class="parameters">Parameters</h5> 1799<dl> 1800<dt>fp</dt> 1801<dd class="description">File to read</dd> 1802</dl> 1803<h5 class="returnvalue">Return Value</h5> 1804<p class="description">Option</p> 1805<h4 class="method"><a name="get_integer">get_integer</a></h4> 1806<p class="description"></p> 1807<p class="code"> 1808int get_integer (<br> 1809 <a href="#ppdcFile">ppdcFile</a> *fp<br> 1810);</p> 1811<h5 class="parameters">Parameters</h5> 1812<dl> 1813<dt>fp</dt> 1814<dd class="description">File to read</dd> 1815</dl> 1816<h5 class="returnvalue">Return Value</h5> 1817<p class="description">Integer value</p> 1818<h4 class="method"><a name="get_measurement">get_measurement</a></h4> 1819<p class="description"></p> 1820<p class="code"> 1821float get_measurement (<br> 1822 <a href="#ppdcFile">ppdcFile</a> *fp<br> 1823);</p> 1824<h5 class="parameters">Parameters</h5> 1825<dl> 1826<dt>fp</dt> 1827<dd class="description">File to read</dd> 1828</dl> 1829<h5 class="returnvalue">Return Value</h5> 1830<p class="description">Measurement value in points</p> 1831<h4 class="method"><a name="get_option">get_option</a></h4> 1832<p class="description"></p> 1833<p class="code"> 1834<a href="#ppdcOption">ppdcOption</a> *get_option (<br> 1835 <a href="#ppdcFile">ppdcFile</a> *fp,<br> 1836 <a href="#ppdcDriver">ppdcDriver</a> *d,<br> 1837 <a href="#ppdcGroup">ppdcGroup</a> *g<br> 1838);</p> 1839<h5 class="parameters">Parameters</h5> 1840<dl> 1841<dt>fp</dt> 1842<dd class="description">File to read</dd> 1843<dt>d</dt> 1844<dd class="description">Printer driver</dd> 1845<dt>g</dt> 1846<dd class="description">Current group</dd> 1847</dl> 1848<h5 class="returnvalue">Return Value</h5> 1849<p class="description">Option</p> 1850<h4 class="method"><a name="get_po">get_po</a></h4> 1851<p class="description"></p> 1852<p class="code"> 1853<a href="#ppdcCatalog">ppdcCatalog</a> *get_po (<br> 1854 <a href="#ppdcFile">ppdcFile</a> *fp<br> 1855);</p> 1856<h5 class="parameters">Parameters</h5> 1857<dl> 1858<dt>fp</dt> 1859<dd class="description">File to read</dd> 1860</dl> 1861<h5 class="returnvalue">Return Value</h5> 1862<p class="description">Message catalog</p> 1863<h4 class="method"><a name="get_resolution">get_resolution</a></h4> 1864<p class="description"></p> 1865<p class="code"> 1866<a href="#ppdcChoice">ppdcChoice</a> *get_resolution (<br> 1867 <a href="#ppdcFile">ppdcFile</a> *fp<br> 1868);</p> 1869<h5 class="parameters">Parameters</h5> 1870<dl> 1871<dt>fp</dt> 1872<dd class="description">File to read</dd> 1873</dl> 1874<h5 class="returnvalue">Return Value</h5> 1875<p class="description">Choice data</p> 1876<h4 class="method"><a name="get_simple_profile">get_simple_profile</a></h4> 1877<p class="description"></p> 1878<p class="code"> 1879<a href="#ppdcProfile">ppdcProfile</a> *get_simple_profile (<br> 1880 <a href="#ppdcFile">ppdcFile</a> *fp<br> 1881);</p> 1882<h5 class="parameters">Parameters</h5> 1883<dl> 1884<dt>fp</dt> 1885<dd class="description">File to read</dd> 1886</dl> 1887<h5 class="returnvalue">Return Value</h5> 1888<p class="description">Color profile</p> 1889<h4 class="method"><a name="get_size">get_size</a></h4> 1890<p class="description"></p> 1891<p class="code"> 1892<a href="#ppdcMediaSize">ppdcMediaSize</a> *get_size (<br> 1893 <a href="#ppdcFile">ppdcFile</a> *fp<br> 1894);</p> 1895<h5 class="parameters">Parameters</h5> 1896<dl> 1897<dt>fp</dt> 1898<dd class="description">File to read</dd> 1899</dl> 1900<h5 class="returnvalue">Return Value</h5> 1901<p class="description">Media size</p> 1902<h4 class="method"><a name="get_token">get_token</a></h4> 1903<p class="description"></p> 1904<p class="code"> 1905char *get_token (<br> 1906 <a href="#ppdcFile">ppdcFile</a> *fp,<br> 1907 char *buffer,<br> 1908 int buflen<br> 1909);</p> 1910<h5 class="parameters">Parameters</h5> 1911<dl> 1912<dt>fp</dt> 1913<dd class="description">File to read</dd> 1914<dt>buffer</dt> 1915<dd class="description">Buffer</dd> 1916<dt>buflen</dt> 1917<dd class="description">Length of buffer</dd> 1918</dl> 1919<h5 class="returnvalue">Return Value</h5> 1920<p class="description">Token string or NULL</p> 1921<h4 class="method"><a name="get_variable">get_variable</a></h4> 1922<p class="description"></p> 1923<p class="code"> 1924<a href="#ppdcVariable">ppdcVariable</a> *get_variable (<br> 1925 <a href="#ppdcFile">ppdcFile</a> *fp<br> 1926);</p> 1927<h5 class="parameters">Parameters</h5> 1928<dl> 1929<dt>fp</dt> 1930<dd class="description">File to read</dd> 1931</dl> 1932<h5 class="returnvalue">Return Value</h5> 1933<p class="description">Variable</p> 1934<h4 class="method"><a name="import_ppd">import_ppd</a></h4> 1935<p class="description"></p> 1936<p class="code"> 1937int import_ppd (<br> 1938 const char *f<br> 1939);</p> 1940<h5 class="parameters">Parameters</h5> 1941<dl> 1942<dt>f</dt> 1943<dd class="description">Filename</dd> 1944</dl> 1945<h5 class="returnvalue">Return Value</h5> 1946<p class="description">1 on success, 0 on failure</p> 1947<h4 class="method"><a name="ppdcSource">ppdcSource</a></h4> 1948<p class="description"></p> 1949<p class="code"> 1950void ppdcSource (<br> 1951 const char *f,<br> 1952 cups_file_t *ffp<br> 1953);</p> 1954<h5 class="parameters">Parameters</h5> 1955<dl> 1956<dt>f</dt> 1957<dd class="description">File to read</dd> 1958<dt>ffp</dt> 1959<dd class="description">File pointer to use</dd> 1960</dl> 1961<h4 class="method"><a name="quotef">quotef</a></h4> 1962<p class="description"></p> 1963<p class="code"> 1964int quotef (<br> 1965 cups_file_t *fp,<br> 1966 const char *format,<br> 1967 ...<br> 1968);</p> 1969<h5 class="parameters">Parameters</h5> 1970<dl> 1971<dt>fp</dt> 1972<dd class="description">File to write to</dd> 1973<dt>format</dt> 1974<dd class="description">Printf-style format string</dd> 1975<dt>...</dt> 1976<dd class="description">Additional args as needed</dd> 1977</dl> 1978<h5 class="returnvalue">Return Value</h5> 1979<p class="description">Number bytes on success, -1 on failure</p> 1980<h4 class="method"><a name="read_file">read_file</a></h4> 1981<p class="description"></p> 1982<p class="code"> 1983void read_file (<br> 1984 const char *f,<br> 1985 cups_file_t *ffp<br> 1986);</p> 1987<h5 class="parameters">Parameters</h5> 1988<dl> 1989<dt>f</dt> 1990<dd class="description">File to read</dd> 1991<dt>ffp</dt> 1992<dd class="description">File pointer to use</dd> 1993</dl> 1994<h4 class="method"><a name="scan_file">scan_file</a></h4> 1995<p class="description"></p> 1996<p class="code"> 1997void scan_file (<br> 1998 <a href="#ppdcFile">ppdcFile</a> *fp,<br> 1999 <a href="#ppdcDriver">ppdcDriver</a> *td,<br> 2000 bool inc<br> 2001);</p> 2002<h5 class="parameters">Parameters</h5> 2003<dl> 2004<dt>fp</dt> 2005<dd class="description">File to read</dd> 2006<dt>td</dt> 2007<dd class="description">Driver template</dd> 2008<dt>inc</dt> 2009<dd class="description">Including?</dd> 2010</dl> 2011<h4 class="method"><a name="set_variable">set_variable</a></h4> 2012<p class="description"></p> 2013<p class="code"> 2014<a href="#ppdcVariable">ppdcVariable</a> *set_variable (<br> 2015 const char *name,<br> 2016 const char *value<br> 2017);</p> 2018<h5 class="parameters">Parameters</h5> 2019<dl> 2020<dt>name</dt> 2021<dd class="description">Name</dd> 2022<dt>value</dt> 2023<dd class="description">Value</dd> 2024</dl> 2025<h5 class="returnvalue">Return Value</h5> 2026<p class="description">Variable</p> 2027<h4 class="method"><a name="write_file">write_file</a></h4> 2028<p class="description"></p> 2029<p class="code"> 2030int write_file (<br> 2031 const char *f<br> 2032);</p> 2033<h5 class="parameters">Parameters</h5> 2034<dl> 2035<dt>f</dt> 2036<dd class="description">File to write</dd> 2037</dl> 2038<h5 class="returnvalue">Return Value</h5> 2039<p class="description">0 on success, -1 on error</p> 2040<h4 class="method"><a name="~ppdcSource">~ppdcSource</a></h4> 2041<p class="description"></p> 2042<p class="code"> 2043void ~ppdcSource (void);</p> 2044<h3 class="class"><a name="ppdcString">ppdcString</a></h3> 2045<p class="description">// Shared String</p> 2046<p class="code">class ppdcString : public ppdcShared {<br> 2047 public:<br> 2048 char *value;<br> 2049};</p> 2050<h4 class="members">Members</h4> 2051<dl> 2052<dt>value </dt> 2053<dd class="description">String value</dd> 2054</dl> 2055<h4 class="method"><a name="ppdcString">ppdcString</a></h4> 2056<p class="description"></p> 2057<p class="code"> 2058void ppdcString (<br> 2059 const char *v<br> 2060);</p> 2061<h5 class="parameters">Parameters</h5> 2062<dl> 2063<dt>v</dt> 2064<dd class="description">String</dd> 2065</dl> 2066<h4 class="method"><a name="~ppdcString">~ppdcString</a></h4> 2067<p class="description"></p> 2068<p class="code"> 2069void ~ppdcString (void);</p> 2070<h3 class="class"><a name="ppdcVariable">ppdcVariable</a></h3> 2071<p class="description">// Variable Definition</p> 2072<p class="code">class ppdcVariable : public ppdcShared {<br> 2073 public:<br> 2074 <a href="#ppdcString">ppdcString</a> *name, *value;<br> 2075};</p> 2076<h4 class="members">Members</h4> 2077<dl> 2078<dt>value </dt> 2079<dd class="description">Value of variable</dd> 2080</dl> 2081<h4 class="method"><a name="PPDC_NAME">PPDC_NAME</a></h4> 2082<p class="description"></p> 2083<p class="code"> 2084void PPDC_NAME (<br> 2085 void set_value(const char *v<br> 2086);</p> 2087<h5 class="parameters">Parameters</h5> 2088<dl> 2089<dt>v</dt> 2090</dl> 2091<h4 class="method"><a name="ppdcVariable">ppdcVariable</a></h4> 2092<p class="description"></p> 2093<p class="code"> 2094void ppdcVariable (<br> 2095 const char *n,<br> 2096 const char *v<br> 2097);</p> 2098<h5 class="parameters">Parameters</h5> 2099<dl> 2100<dt>n</dt> 2101<dd class="description">Name of variable</dd> 2102<dt>v</dt> 2103<dd class="description">Value of variable</dd> 2104</dl> 2105<h4 class="method"><a name="set_value">set_value</a></h4> 2106<p class="description"></p> 2107<p class="code"> 2108void set_value (<br> 2109 const char *v<br> 2110);</p> 2111<h5 class="parameters">Parameters</h5> 2112<dl> 2113<dt>v</dt> 2114</dl> 2115<h4 class="method"><a name="~ppdcVariable">~ppdcVariable</a></h4> 2116<p class="description"></p> 2117<p class="code"> 2118void ~ppdcVariable (void);</p> 2119<h2 class="title"><a name="TYPES">Data Types</a></h2> 2120<h3 class="typedef"><a name="ppdc_cs_t">ppdc_cs_t</a></h3> 2121<p class="description"></p> 2122<p class="code"> 2123typedef enum ppdc_cs_t; 2124</p> 2125<h2 class="title"><a name="VARIABLES">Variables</a></h2> 2126<h3 class="variable"><a name="ppdcSource">ppdcSource</a></h3> 2127<p class="description">// Printer Driver Data</p> 2128<p class="code">class ppdcSource;</p> 2129<h2 class="title"><a name="ENUMERATIONS">Constants</a></h2> 2130<h3 class="enumeration"><a name="ppdcCondFlags">ppdcCondFlags</a></h3> 2131<p class="description">// Condition flags</p> 2132<h4 class="constants">Constants</h4> 2133<dl> 2134<dt>PPDC_COND_NORMAL </dt> 2135<dd class="description">Normal state</dd> 2136<dt>PPDC_COND_SATISFIED </dt> 2137<dd class="description">At least one condition satisfied</dd> 2138<dt>PPDC_COND_SKIP </dt> 2139<dd class="description">Skip state</dd> 2140</dl> 2141<h3 class="enumeration"><a name="ppdcDrvType">ppdcDrvType</a></h3> 2142<p class="description">// Driver type</p> 2143<h4 class="constants">Constants</h4> 2144<dl> 2145<dt>PPDC_DRIVER_CUSTOM </dt> 2146<dd class="description">Custom driver</dd> 2147<dt>PPDC_DRIVER_EPSON </dt> 2148<dd class="description">rastertoepson driver</dd> 2149<dt>PPDC_DRIVER_ESCP </dt> 2150<dd class="description">rastertoescpx driver</dd> 2151<dt>PPDC_DRIVER_HP </dt> 2152<dd class="description">rastertohp driver</dd> 2153<dt>PPDC_DRIVER_LABEL </dt> 2154<dd class="description">rastertolabel/rastertodymo driver</dd> 2155<dt>PPDC_DRIVER_MAX </dt> 2156<dd class="description">Number of driver types defined</dd> 2157<dt>PPDC_DRIVER_PCL </dt> 2158<dd class="description">rastertopclx driver</dd> 2159<dt>PPDC_DRIVER_PS </dt> 2160<dd class="description">PostScript driver</dd> 2161</dl> 2162<h3 class="enumeration"><a name="ppdcFontStatus">ppdcFontStatus</a></h3> 2163<p class="description">// Load status of font</p> 2164<h4 class="constants">Constants</h4> 2165<dl> 2166<dt>PPDC_FONT_DISK </dt> 2167<dd class="description">Font is on disk</dd> 2168<dt>PPDC_FONT_ROM </dt> 2169<dd class="description">Font is in ROM</dd> 2170</dl> 2171<h3 class="enumeration"><a name="ppdcLineEnding">ppdcLineEnding</a></h3> 2172<p class="description">// Line endings</p> 2173<h4 class="constants">Constants</h4> 2174<dl> 2175<dt>PPDC_CRLF </dt> 2176<dd class="description">CR + LF</dd> 2177<dt>PPDC_CRONLY </dt> 2178<dd class="description">CR only</dd> 2179<dt>PPDC_LFONLY </dt> 2180<dd class="description">LF only</dd> 2181</dl> 2182<h3 class="enumeration"><a name="ppdcOptSection">ppdcOptSection</a></h3> 2183<p class="description">// Option section</p> 2184<h4 class="constants">Constants</h4> 2185<dl> 2186<dt>PPDC_SECTION_ANY </dt> 2187<dd class="description">AnySetup</dd> 2188<dt>PPDC_SECTION_DOCUMENT </dt> 2189<dd class="description">DocumentSetup</dd> 2190<dt>PPDC_SECTION_EXIT </dt> 2191<dd class="description">ExitServer</dd> 2192<dt>PPDC_SECTION_JCL </dt> 2193<dd class="description">JCLSetup</dd> 2194<dt>PPDC_SECTION_PAGE </dt> 2195<dd class="description">PageSetup</dd> 2196<dt>PPDC_SECTION_PROLOG </dt> 2197<dd class="description">Prolog</dd> 2198</dl> 2199<h3 class="enumeration"><a name="ppdcOptType">ppdcOptType</a></h3> 2200<p class="description">// Option type</p> 2201<h4 class="constants">Constants</h4> 2202<dl> 2203<dt>PPDC_BOOLEAN </dt> 2204<dd class="description">True/false option</dd> 2205<dt>PPDC_PICKMANY </dt> 2206<dd class="description">Multiple choices from list</dd> 2207<dt>PPDC_PICKONE </dt> 2208<dd class="description">Single choice from list</dd> 2209</dl> 2210</div> 2211</body> 2212</html> 2213