13bf66744d61d18c66d46f2608de0467ad3df0268Mopria/*
23bf66744d61d18c66d46f2608de0467ad3df0268Mopria * Copyright (C) 2016 The Android Open Source Project
33bf66744d61d18c66d46f2608de0467ad3df0268Mopria * Copyright (C) 2016 Mopria Alliance, Inc.
43bf66744d61d18c66d46f2608de0467ad3df0268Mopria * Copyright (C) 2013 Hewlett-Packard Development Company, L.P.
53bf66744d61d18c66d46f2608de0467ad3df0268Mopria *
63bf66744d61d18c66d46f2608de0467ad3df0268Mopria * Licensed under the Apache License, Version 2.0 (the "License");
73bf66744d61d18c66d46f2608de0467ad3df0268Mopria * you may not use this file except in compliance with the License.
83bf66744d61d18c66d46f2608de0467ad3df0268Mopria * You may obtain a copy of the License at
93bf66744d61d18c66d46f2608de0467ad3df0268Mopria *
103bf66744d61d18c66d46f2608de0467ad3df0268Mopria *      http://www.apache.org/licenses/LICENSE-2.0
113bf66744d61d18c66d46f2608de0467ad3df0268Mopria *
123bf66744d61d18c66d46f2608de0467ad3df0268Mopria * Unless required by applicable law or agreed to in writing, software
133bf66744d61d18c66d46f2608de0467ad3df0268Mopria * distributed under the License is distributed on an "AS IS" BASIS,
143bf66744d61d18c66d46f2608de0467ad3df0268Mopria * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
153bf66744d61d18c66d46f2608de0467ad3df0268Mopria * See the License for the specific language governing permissions and
163bf66744d61d18c66d46f2608de0467ad3df0268Mopria * limitations under the License.
173bf66744d61d18c66d46f2608de0467ad3df0268Mopria */
183bf66744d61d18c66d46f2608de0467ad3df0268Mopria#ifndef __IFC_PRINTER_CAPABILITIES_H__
193bf66744d61d18c66d46f2608de0467ad3df0268Mopria#define __IFC_PRINTER_CAPABILITIES_H__
203bf66744d61d18c66d46f2608de0467ad3df0268Mopria
213bf66744d61d18c66d46f2608de0467ad3df0268Mopria#include "printer_capabilities_types.h"
223bf66744d61d18c66d46f2608de0467ad3df0268Mopria
233bf66744d61d18c66d46f2608de0467ad3df0268Mopria/*
243bf66744d61d18c66d46f2608de0467ad3df0268Mopria * Interface for handling printer capabilities
253bf66744d61d18c66d46f2608de0467ad3df0268Mopria */
263bf66744d61d18c66d46f2608de0467ad3df0268Mopriatypedef struct ifc_printer_capabilities_st {
273bf66744d61d18c66d46f2608de0467ad3df0268Mopria    /*
283bf66744d61d18c66d46f2608de0467ad3df0268Mopria     * Initialize capabilities handle with conn params
293bf66744d61d18c66d46f2608de0467ad3df0268Mopria     */
303bf66744d61d18c66d46f2608de0467ad3df0268Mopria    void (*init)(const struct ifc_printer_capabilities_st *this_p,
313bf66744d61d18c66d46f2608de0467ad3df0268Mopria            const wprint_connect_info_t *connect_info);
323bf66744d61d18c66d46f2608de0467ad3df0268Mopria
333bf66744d61d18c66d46f2608de0467ad3df0268Mopria    /*
343bf66744d61d18c66d46f2608de0467ad3df0268Mopria     * Fetch printer capabilities and load them into supplied capabilities structure
353bf66744d61d18c66d46f2608de0467ad3df0268Mopria     */
363bf66744d61d18c66d46f2608de0467ad3df0268Mopria    status_t (*get_capabilities)(const struct ifc_printer_capabilities_st *this_p,
373bf66744d61d18c66d46f2608de0467ad3df0268Mopria            printer_capabilities_t *capabilities);
383bf66744d61d18c66d46f2608de0467ad3df0268Mopria
393bf66744d61d18c66d46f2608de0467ad3df0268Mopria    /*
403bf66744d61d18c66d46f2608de0467ad3df0268Mopria     * Gets margin info for given paper size
413bf66744d61d18c66d46f2608de0467ad3df0268Mopria     */
423bf66744d61d18c66d46f2608de0467ad3df0268Mopria    status_t (*get_margins)(const struct ifc_printer_capabilities_st *this_p,
433bf66744d61d18c66d46f2608de0467ad3df0268Mopria            const media_size_t paper_size, unsigned char borderless, unsigned char duplex,
443bf66744d61d18c66d46f2608de0467ad3df0268Mopria            float *top_margin, float *left_margin, float *right_margin, float *bottom_margin);
453bf66744d61d18c66d46f2608de0467ad3df0268Mopria
463bf66744d61d18c66d46f2608de0467ad3df0268Mopria    /*
473bf66744d61d18c66d46f2608de0467ad3df0268Mopria     * Destroys printer capabilities handle
483bf66744d61d18c66d46f2608de0467ad3df0268Mopria     */
493bf66744d61d18c66d46f2608de0467ad3df0268Mopria    void (*destroy)(const struct ifc_printer_capabilities_st *this_p);
503bf66744d61d18c66d46f2608de0467ad3df0268Mopria} ifc_printer_capabilities_t;
513bf66744d61d18c66d46f2608de0467ad3df0268Mopria
523bf66744d61d18c66d46f2608de0467ad3df0268Mopria#endif // __IFC_PRINTER_CAPABILITIES_H__