1 /*
2  * Copyright (C) 2016 The Android Open Source Project
3  * Copyright (C) 2016 Mopria Alliance, Inc.
4  * Copyright (C) 2013 Hewlett-Packard Development Company, L.P.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *      http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 #ifndef __WPRINT_IO_PLUGIN_H__
19 #define __WPRINT_IO_PLUGIN_H__
20 
21 #include "ifc_printer_capabilities.h"
22 #include "ifc_print_job.h"
23 #include "ifc_status_monitor.h"
24 #include "ifc_wprint.h"
25 
26 /*
27  * Structure for handling input to and output from wprint.
28  * Includes interfaces for capabilities, status, and job handling.
29  */
30 typedef struct {
31     int version;
32     port_t port_num;
33 
34     /*
35      * Returns capabilities interface
36      */
37     const ifc_printer_capabilities_t *(*getCapsIFC)(const ifc_wprint_t *wprint_ifc);
38 
39     /*
40      * Returns status interface
41      */
42     const ifc_status_monitor_t *(*getStatusIFC)(const ifc_wprint_t *wprint_ifc);
43 
44     /*
45      * Returns print job handle interface
46      */
47     const ifc_print_job_t *(*getPrintIFC)(const ifc_wprint_t *wprint_ifc);
48 } wprint_io_plugin_t;
49 
50 typedef wprint_io_plugin_t *(*plugin_io_reg_t)(void);
51 
52 #endif // __WPRINT_IO_PLUGIN_H__