summaryrefslogtreecommitdiffstats
path: root/cloud_print/gcp20/prototype/local_print_job.h
blob: 4959affaa6b7d6670f8775e99f709c2ac564a056 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CLOUD_PRINT_GCP20_PROTOTYPE_LOCAL_PRINT_JOB_H_
#define CLOUD_PRINT_GCP20_PROTOTYPE_LOCAL_PRINT_JOB_H_

#include <string>

struct LocalPrintJob {
  enum CreateResult {
    CREATE_SUCCESS,
    CREATE_INVALID_TICKET,
    CREATE_PRINTER_BUSY,
    CREATE_PRINTER_ERROR,
  };

  enum SaveResult {
    SAVE_SUCCESS,
    SAVE_INVALID_PRINT_JOB,
    SAVE_INVALID_DOCUMENT_TYPE,
    SAVE_INVALID_DOCUMENT,
    SAVE_DOCUMENT_TOO_LARGE,
    SAVE_PRINTER_BUSY,
    SAVE_PRINTER_ERROR,
  };

  enum State {
    STATE_DRAFT,
    STATE_ABORTED,
    STATE_DONE,
  };

  struct Info {
    Info();
    ~Info();

    State state;
    int expires_in;
  };

  LocalPrintJob();
  ~LocalPrintJob();

  std::string user_name;
  std::string client_name;
  std::string job_name;
  std::string content;
  std::string content_type;
  bool offline;
};

#endif  // CLOUD_PRINT_GCP20_PROTOTYPE_LOCAL_PRINT_JOB_H_