OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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"; | |
10 const char kPrinterNameValue[] = "printer"; | |
11 const char kPrinterDescValue[] = "description"; | |
12 const char kPrinterCapsValue[] = "capabilities"; | |
13 const char kPrinterDefaultsValue[] = "defaults"; | |
14 const char kPrinterStatusValue[] = "status"; | |
15 const char kPrinterTagValue[] = "tag"; | |
16 const char kPrinterRemoveTagValue[] = "remove_tag"; | |
17 const char kMessageTextValue[] = "message"; | |
18 | |
19 // Values in the respone JSON from the cloud print server | |
20 const char kNameValue[] = "name"; | |
21 const char kIdValue[] = "id"; | |
22 const char kTicketUrlValue[] = "ticketUrl"; | |
23 const char kFileUrlValue[] = "fileUrl"; | |
24 const char kJobListValue[] = "jobs"; | |
25 const char kTitleValue[] = "title"; | |
26 const char kPrinterCapsHashValue[] = "capsHash"; | |
27 const char kTagsValue[] = "tags"; | |
28 const char kXMPPJidValue[] = "xmpp_jid"; | |
29 const char kOAuthCodeValue[] = "authorization_code"; | |
30 | |
31 const char kProxyTagPrefix[] = "__cp__"; | 9 const char kProxyTagPrefix[] = "__cp__"; |
32 const char kTagsHashTagName[] = "__cp__tagshash"; | 10 const char kTagsHashTagName[] = "__cp__tagshash"; |
33 const char kTagDryRunFlag[] = "__cp__dry_run"; | 11 const char kTagDryRunFlag[] = "__cp__dry_run"; |
34 // Don't need prefixes. They will be added on submit. | |
35 const char kChromeVersionTagName[] = "chrome_version"; | |
36 const char kSystemNameTagName[] = "system_name"; | |
37 const char kSystemVersionTagName[] = "system_version"; | |
38 | 12 |
39 extern const char kChromeVersionTagName[]; | |
40 extern const char kOsTagName[]; | |
41 | |
42 const char kCloudPrintGaiaServiceId[] = "cloudprint"; | |
43 const char kProxyAuthUserAgent[] = "ChromiumBrowser"; | 13 const char kProxyAuthUserAgent[] = "ChromiumBrowser"; |
44 const char kCloudPrintPushNotificationsSource[] = "cloudprint.google.com"; | |
45 | 14 |
46 // The string to be appended to the user-agent for cloudprint requests. | 15 // The string to be appended to the user-agent for cloudprint requests. |
47 const char kCloudPrintUserAgent[] = "GoogleCloudPrintProxy"; | 16 const char kCloudPrintUserAgent[] = "GoogleCloudPrintProxy"; |
48 | 17 |
49 // Reasons for fetching print jobs. | 18 // Reasons for fetching print jobs. |
50 // Job fetch on proxy startup. | 19 // Job fetch on proxy startup. |
51 const char kJobFetchReasonStartup[] = "startup"; | 20 const char kJobFetchReasonStartup[] = "startup"; |
52 // Job fetch because we are polling. | 21 // Job fetch because we are polling. |
53 const char kJobFetchReasonPoll[] = "poll"; | 22 const char kJobFetchReasonPoll[] = "poll"; |
54 // Job fetch on being notified by the server. | 23 // Job fetch on being notified by the server. |
55 const char kJobFetchReasonNotified[] = "notified"; | 24 const char kJobFetchReasonNotified[] = "notified"; |
56 // Job fetch after a successful print to query for more jobs. | 25 // Job fetch after a successful print to query for more jobs. |
57 const char kJobFetchReasonQueryMore[] = "querymore"; | 26 const char kJobFetchReasonQueryMore[] = "querymore"; |
58 | 27 |
59 // Short message ids for diagnostic messages sent to the server. | |
60 const char kPrintSystemFailedMessageId[] = "printsystemfail"; | |
61 const char kGetPrinterCapsFailedMessageId[] = "getprncapsfail"; | |
62 const char kEnumPrintersFailedMessageId[] = "enumfail"; | |
63 const char kZombiePrinterMessageId[] = "zombieprinter"; | |
OLD | NEW |