netatalk 4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
queries.c File Reference
`#include <string.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <atalk/logger.h>`
`#include <sys/param.h>`
`#include <sys/time.h>`
`#include <sys/types.h>`
`#include <netatalk/at.h>`
`#include <atalk/atp.h>`
`#include "file.h"`
`#include "comment.h"`
`#include "printer.h"`
`#include "ppd.h"`
`#include "lp.h"`
`#include "uam_auth.h"`

## Data Structures
struct | genquery

## Functions
int | cq_default (struct papfile *, struct papfile *, struct sockaddr_at *)
int | cq_k4login (struct papfile *, struct papfile *, struct sockaddr_at *)
int | cq_uameth (struct papfile *, struct papfile *, struct sockaddr_at *)
int | gq_balance (struct papfile *)
int | gq_pagecost (struct papfile *)
int | gq_true (struct papfile *)
int | gq_rbispoolerid (struct papfile *)
int | gq_rbiuamlist (struct papfile *)
int | gq_product (struct papfile *)
int | cq_query (struct papfile *, struct papfile *, struct sockaddr_at *)
void | cq_font_answer (char *, char *, struct papfile *)
int | cq_fontlist (struct papfile *, struct papfile *, struct sockaddr_at *)
int | cq_font (struct papfile *, struct papfile *, struct sockaddr_at *)
int | cq_feature (struct papfile *, struct papfile *, struct sockaddr_at *)
int | cq_printer (struct papfile *, struct papfile *, struct sockaddr_at *)
int | cq_rmjob (struct papfile *, struct papfile *, struct sockaddr_at *)
int | cq_end (struct papfile *, struct papfile *, struct sockaddr_at *)
int | cq_rbilogin (struct papfile *in, struct papfile *out, struct sockaddr_at *sat)

## Variables
static const char * | spoolerid = "(PAPD Spooler) 1.0 (" VERSION ")\n"
static const char * | nouams = "*\n"
struct genquery | genqueries []
static const char * | psver = "*PSVersion\n"
static const char * | prod = "*Product\n"
static struct uam_obj * | papd_uam = NULL
static const char * | rbiloginok = "0\r"
static const char * | rbiloginbad = "-1\r"
static const char * | rbiloginerrstr
struct papd_comment | queries []

## Function Documentation

## ◆ cq_default()

int cq_default | ( | struct papfile * | in,
|  | struct papfile * | out,
|  | struct sockaddr_at * | sat )

## ◆ cq_end()

int cq_end | ( | struct papfile * | in,
|  | struct papfile * | out,
|  | struct sockaddr_at * | sat )

## ◆ cq_feature()

int cq_feature | ( | struct papfile * | in,
|  | struct papfile * | out,
|  | struct sockaddr_at * | sat )

## ◆ cq_font()

int cq_font | ( | struct papfile * | in,
|  | struct papfile * | out,
|  | struct sockaddr_at * | sat )

## ◆ cq_font_answer()

void cq_font_answer | ( | char * | start,
|  | char * | stop,
|  | struct papfile * | out )

## ◆ cq_fontlist()

int cq_fontlist | ( | struct papfile * | in,
|  | struct papfile * | out,
|  | struct sockaddr_at * | sat )

## ◆ cq_k4login()

int cq_k4login | ( | struct papfile * | ,
|  | struct papfile * | ,
|  | struct sockaddr_at * | )

## ◆ cq_printer()

int cq_printer | ( | struct papfile * | in,
|  | struct papfile * | out,
|  | struct sockaddr_at * | sat )

## ◆ cq_query()

int cq_query | ( | struct papfile * | in,
|  | struct papfile * | out,
|  | struct sockaddr_at * | sat )

## ◆ cq_rbilogin()

int cq_rbilogin | ( | struct papfile * | in,
|  | struct papfile * | out,
|  | struct sockaddr_at * | sat )

Handler for RBILogin

## ◆ cq_rmjob()

int cq_rmjob | ( | struct papfile * | ,
|  | struct papfile * | ,
|  | struct sockaddr_at * | )

## ◆ cq_uameth()

int cq_uameth | ( | struct papfile * | ,
|  | struct papfile * | ,
|  | struct sockaddr_at * | )

## ◆ gq_balance()

int gq_balance | ( | struct papfile * |  | ) |

## ◆ gq_pagecost()

int gq_pagecost | ( | struct papfile * | out | ) |

## ◆ gq_product()

int gq_product | ( | struct papfile * | out | ) |

## ◆ gq_rbispoolerid()

int gq_rbispoolerid | ( | struct papfile * | out | ) |

Handler for RBISpoolerID

## ◆ gq_rbiuamlist()

int gq_rbiuamlist | ( | struct papfile * | out | ) |

Handler for RBIUAMListQuery

## ◆ gq_true()

int gq_true | ( | struct papfile * | out | ) |

## Variable Documentation

## ◆ genqueries

struct genquery genqueries[]

Initial value:
= {
{ "UMICHCostPerPage", gq_pagecost },
{ "RBISpoolerID", gq_rbispoolerid },
{ "RBIUAMListQuery", gq_rbiuamlist },
{ "Product", gq_product },
{ "ADOIsBinaryOK?", gq_true },
{ "UMICHListQueue", gq_true },
{ "UMICHDeleteJob", gq_true },
{ NULL, NULL },
}
gq_rbispoolerid
int gq_rbispoolerid(struct papfile *)
Definition queries.c:161
gq_true
int gq_true(struct papfile *)
Definition queries.c:109
gq_product
int gq_product(struct papfile *)
Definition queries.c:190
gq_pagecost
int gq_pagecost(struct papfile *)
Definition queries.c:119
gq_rbiuamlist
int gq_rbiuamlist(struct papfile *)
Definition queries.c:172
NULL
#define NULL
Definition utf8util.c:47

## ◆ nouams

const char* nouams = "*\n"
| static

## ◆ papd_uam

struct uam_obj* papd_uam = NULL
| static

## ◆ prod

const char* prod = "*Product\n"
| static

## ◆ psver

const char* psver = "*PSVersion\n"
| static

## ◆ queries

struct papd_comment queries[]

Initial value:
= {
{ "%%?BeginQuery: RBILogin ", "%%?EndQuery", cq_rbilogin, 0 },
{ "%%?BeginQuery", "%%?EndQuery", cq_query, 0 },
{ "%%?BeginFeatureQuery", "%%?EndFeatureQuery", cq_feature, 0 },
{ "%%?BeginFontQuery", "%%?EndFontQuery", cq_font, 0 },
{ "%%?BeginFontListQuery", "%%?EndFontListQuery", cq_fontlist, 0 },
{ "%%?BeginPrinterQuery", "%%?EndPrinterQuery", cq_printer, C_FULL },
{ "%%?Begin", "%%?End", cq_default, 0 },
{ "%%EOF", NULL, cq_end, 0 },
{ NULL, NULL, NULL, 0 },
}
C_FULL
#define C_FULL
Definition comment.h:47
cq_font
int cq_font(struct papfile *, struct papfile *, struct sockaddr_at *)
Definition queries.c:398
cq_query
int cq_query(struct papfile *, struct papfile *, struct sockaddr_at *)
Definition queries.c:217
cq_default
int cq_default(struct papfile *, struct papfile *, struct sockaddr_at *)
Definition queries.c:52
cq_feature
int cq_feature(struct papfile *, struct papfile *, struct sockaddr_at *)
Definition queries.c:464
cq_rbilogin
int cq_rbilogin(struct papfile *in, struct papfile *out, struct sockaddr_at *sat)
Definition queries.c:704
cq_end
int cq_end(struct papfile *, struct papfile *, struct sockaddr_at *)
Definition queries.c:770
cq_printer
int cq_printer(struct papfile *, struct papfile *, struct sockaddr_at *)
Definition queries.c:536
cq_fontlist
int cq_fontlist(struct papfile *, struct papfile *, struct sockaddr_at *)
Definition queries.c:326

All queries start with %%?Begin and end with %%?End. Note that the "Begin"/"End" general queries have to be last.

## ◆ rbiloginbad

const char* rbiloginbad = "-1\r"
| static

## ◆ rbiloginerrstr

const char* rbiloginerrstr
| static

Initial value:
= "%%[Error: SecurityError; \
SecurityViolation: Unknown user, incorrect password or log on is \
disabled ]%%\r%%[Flushing: rest of job (to end-of-file) will be \
ignored ]%%\r"

## ◆ rbiloginok

const char* rbiloginok = "0\r"
| static

## ◆ spoolerid

const char* spoolerid = "(PAPD Spooler) 1.0 (" VERSION ")\n"
| static