4 * Copyright 2012 Samsung Electronics Co., Ltd
6 * Licensed under the Flora License, Version 1.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
10 * http://floralicense.org/license/
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.
20 #ifndef _PREVIEW_MODEL_H_INCLUDED_
21 #define _PREVIEW_MODEL_H_INCLUDED_
25 #include <paper_size.h>
28 #include "preview_task_model.h"
31 enum preview_page_state {
32 PREVIEW_PAGE_STATE_NA = 0,
33 PREVIEW_PAGE_STATE_PROCESSING,
34 /*PREVIEW_PAGE_STATE_SIZE_READY,*/ /* TODO */
35 PREVIEW_PAGE_STATE_READY,
36 PREVIEW_PAGE_STATE_ERROR
40 struct preview_page_info {
41 enum preview_page_state page_state;
46 struct preview_engine;
52 char *ppd; /*PPD file name*/
53 //int is_original_size;
54 struct page_scale scale;
56 enum page_orientation orientation;
57 struct paper_size_pts paper_size;
58 struct size_px max_available_size_px;
62 struct preview_model {
64 enum preview_page_state *pages_state;
65 struct preview_conf conf;
66 //struct preview_task_model *task_model;
67 struct preview_engine *engine;
70 #include "preview_engine.h"
73 int init_preview_model(struct preview_model *model,
74 const struct preview_conf *conf,
75 struct preview_engine *engine);
76 void destroy_preview_model(struct preview_model *model);
77 int preview_model_request_page(struct preview_model *model, int page);
78 int preview_model_page_available(struct preview_model *model,
79 enum preview_engine_event_status status, int page);
82 #endif /* _PREVIEW_MODEL_H_INCLUDED_ */