Home | History | Annotate | Download | only in prototype
      1 // Copyright 2013 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef CLOUD_PRINT_GCP20_PROTOTYPE_LOCAL_PRINT_JOB_H_
      6 #define CLOUD_PRINT_GCP20_PROTOTYPE_LOCAL_PRINT_JOB_H_
      7 
      8 #include <string>
      9 
     10 struct LocalPrintJob {
     11   enum CreateResult {
     12     CREATE_SUCCESS,
     13     CREATE_INVALID_TICKET,
     14     CREATE_PRINTER_BUSY,
     15     CREATE_PRINTER_ERROR,
     16   };
     17 
     18   enum SaveResult {
     19     SAVE_SUCCESS,
     20     SAVE_INVALID_PRINT_JOB,
     21     SAVE_INVALID_DOCUMENT_TYPE,
     22     SAVE_INVALID_DOCUMENT,
     23     SAVE_DOCUMENT_TOO_LARGE,
     24     SAVE_PRINTER_BUSY,
     25     SAVE_PRINTER_ERROR,
     26   };
     27 
     28   enum State {
     29     STATE_DRAFT,
     30     STATE_ABORTED,
     31     STATE_DONE,
     32   };
     33 
     34   struct Info {
     35     Info();
     36     ~Info();
     37 
     38     State state;
     39     int expires_in;
     40   };
     41 
     42   LocalPrintJob();
     43   ~LocalPrintJob();
     44 
     45   std::string user_name;
     46   std::string client_name;
     47   std::string job_name;
     48   std::string content;
     49   std::string content_type;
     50   bool offline;
     51 };
     52 
     53 #endif  // CLOUD_PRINT_GCP20_PROTOTYPE_LOCAL_PRINT_JOB_H_
     54 
     55