OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Constant defines used in the cloud print proxy code | 5 // Constant defines used in the cloud print proxy code |
6 | 6 |
7 #include "chrome/service/cloud_print/cloud_print_consts.h" | 7 #include "chrome/service/cloud_print/cloud_print_consts.h" |
8 | 8 |
9 const char kProxyIdValue[] = "proxy"; | 9 const char kProxyIdValue[] = "proxy"; |
10 const char kPrinterNameValue[] = "printer"; | 10 const char kPrinterNameValue[] = "printer"; |
11 const char kPrinterDescValue[] = "description"; | 11 const char kPrinterDescValue[] = "description"; |
12 const char kPrinterCapsValue[] = "capabilities"; | 12 const char kPrinterCapsValue[] = "capabilities"; |
13 const char kPrinterDefaultsValue[] = "defaults"; | 13 const char kPrinterDefaultsValue[] = "defaults"; |
14 const char kPrinterStatusValue[] = "status"; | 14 const char kPrinterStatusValue[] = "status"; |
15 const char kPrinterTagValue[] = "tag"; | 15 const char kPrinterTagValue[] = "tag"; |
16 const char kPrinterRemoveTagValue[] = "remove_tag"; | 16 const char kPrinterRemoveTagValue[] = "remove_tag"; |
17 | 17 |
18 // Values in the respone JSON from the cloud print server | 18 // Values in the respone JSON from the cloud print server |
19 const char kPrinterListValue[] = "printers"; | 19 const char kPrinterListValue[] = "printers"; |
20 const char kSuccessValue[] = "success"; | 20 const char kSuccessValue[] = "success"; |
21 const char kNameValue[] = "name"; | 21 const char kNameValue[] = "name"; |
22 const char kIdValue[] = "id"; | 22 const char kIdValue[] = "id"; |
23 const char kTicketUrlValue[] = "ticketUrl"; | 23 const char kTicketUrlValue[] = "ticketUrl"; |
24 const char kFileUrlValue[] = "fileUrl"; | 24 const char kFileUrlValue[] = "fileUrl"; |
25 const char kJobListValue[] = "jobs"; | 25 const char kJobListValue[] = "jobs"; |
26 const char kTitleValue[] = "title"; | 26 const char kTitleValue[] = "title"; |
27 const char kPrinterCapsHashValue[] = "capsHash"; | 27 const char kPrinterCapsHashValue[] = "capsHash"; |
28 const char kPrinterTagsValue[] = "tags"; | 28 const char kTagsValue[] = "tags"; |
29 const char kProxyTagPrefix[] = "__cp__"; | 29 const char kProxyTagPrefix[] = "__cp__"; |
30 const char kTagsHashTagName[] = "__cp__tagshash"; | 30 const char kTagsHashTagName[] = "__cp__tagshash"; |
| 31 const char kTagDryRunFlag[] = "__cp__dry_run"; |
31 | 32 |
32 | 33 |
33 const char kDefaultCloudPrintServerUrl[] = "https://www.google.com/cloudprint"; | 34 const char kDefaultCloudPrintServerUrl[] = "https://www.google.com/cloudprint"; |
34 const char kGaiaUrl[] = "https://www.google.com/accounts/ClientLogin"; | 35 const char kGaiaUrl[] = "https://www.google.com/accounts/ClientLogin"; |
35 const char kCloudPrintGaiaServiceId[] = "cloudprint"; | 36 const char kCloudPrintGaiaServiceId[] = "cloudprint"; |
36 const char kSyncGaiaServiceId[] = "chromiumsync"; | 37 const char kSyncGaiaServiceId[] = "chromiumsync"; |
37 const char kCloudPrintPushNotificationsSource[] = "cloudprint.google.com"; | 38 const char kCloudPrintPushNotificationsSource[] = "cloudprint.google.com"; |
38 // The cloud print server expects the X-Google-CloudPrint-Proxy header for | 39 // The cloud print server expects the X-Google-CloudPrint-Proxy header for |
39 // certain requests. | 40 // certain requests. |
40 const char kChromeCloudPrintProxyHeader[] = "X-CloudPrint-Proxy: Chrome"; | 41 const char kChromeCloudPrintProxyHeader[] = "X-CloudPrint-Proxy: Chrome"; |
41 | 42 |
42 // The string to be appended to the user-agent for cloudprint requests. | 43 // The string to be appended to the user-agent for cloudprint requests. |
43 const char kCloudPrintUserAgent[] = "GoogleCloudPrintProxy"; | 44 const char kCloudPrintUserAgent[] = "GoogleCloudPrintProxy"; |
44 | 45 |
45 // Reasons for fetching print jobs. | 46 // Reasons for fetching print jobs. |
46 // Job fetch on proxy startup. | 47 // Job fetch on proxy startup. |
47 const char kJobFetchReasonStartup[] = "startup"; | 48 const char kJobFetchReasonStartup[] = "startup"; |
48 // Job fetch because we are polling. | 49 // Job fetch because we are polling. |
49 const char kJobFetchReasonPoll[] = "poll"; | 50 const char kJobFetchReasonPoll[] = "poll"; |
50 // Job fetch on being notified by the server. | 51 // Job fetch on being notified by the server. |
51 const char kJobFetchReasonNotified[] = "notified"; | 52 const char kJobFetchReasonNotified[] = "notified"; |
52 // Job fetch after a successful print to query for more jobs. | 53 // Job fetch after a successful print to query for more jobs. |
53 const char kJobFetchReasonQueryMore[] = "querymore"; | 54 const char kJobFetchReasonQueryMore[] = "querymore"; |
54 | 55 |
OLD | NEW |