| 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 #ifndef CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_CONSTS_H_ | 5 #ifndef CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_CONSTS_H_ |
| 6 #define CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_CONSTS_H_ | 6 #define CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_CONSTS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 | 10 |
| 11 // Constant defines used in the cloud print proxy code | 11 // Constant defines used in the cloud print proxy code |
| 12 extern const char kProxyIdValue[]; | 12 extern const char kProxyIdValue[]; |
| 13 extern const char kPrinterNameValue[]; | 13 extern const char kPrinterNameValue[]; |
| 14 extern const char kPrinterDescValue[]; | 14 extern const char kPrinterDescValue[]; |
| 15 extern const char kPrinterCapsValue[]; | 15 extern const char kPrinterCapsValue[]; |
| 16 extern const char kPrinterDefaultsValue[]; | 16 extern const char kPrinterDefaultsValue[]; |
| 17 extern const char kPrinterStatusValue[]; | 17 extern const char kPrinterStatusValue[]; |
| 18 extern const char kPrinterTagValue[]; | 18 extern const char kPrinterTagValue[]; |
| 19 extern const char kPrinterRemoveTagValue[]; | 19 extern const char kPrinterRemoveTagValue[]; |
| 20 extern const char kMessageTextValue[]; |
| 20 // Values in the respone JSON from the cloud print server | 21 // Values in the respone JSON from the cloud print server |
| 21 extern const char kPrinterListValue[]; | 22 extern const char kPrinterListValue[]; |
| 22 extern const char kSuccessValue[]; | 23 extern const char kSuccessValue[]; |
| 23 extern const char kNameValue[]; | 24 extern const char kNameValue[]; |
| 24 extern const char kIdValue[]; | 25 extern const char kIdValue[]; |
| 25 extern const char kTicketUrlValue[]; | 26 extern const char kTicketUrlValue[]; |
| 26 extern const char kFileUrlValue[]; | 27 extern const char kFileUrlValue[]; |
| 27 extern const char kJobListValue[]; | 28 extern const char kJobListValue[]; |
| 28 extern const char kTitleValue[]; | 29 extern const char kTitleValue[]; |
| 29 extern const char kPrinterCapsHashValue[]; | 30 extern const char kPrinterCapsHashValue[]; |
| 30 extern const char kTagsValue[]; | 31 extern const char kTagsValue[]; |
| 31 extern const char kProxyTagPrefix[]; | 32 extern const char kProxyTagPrefix[]; |
| 32 extern const char kTagsHashTagName[]; | 33 extern const char kTagsHashTagName[]; |
| 33 extern const char kTagDryRunFlag[]; | 34 extern const char kTagDryRunFlag[]; |
| 34 extern const char kDefaultCloudPrintServerUrl[]; | 35 extern const char kDefaultCloudPrintServerUrl[]; |
| 35 extern const char kGaiaUrl[]; | 36 extern const char kGaiaUrl[]; |
| 36 extern const char kCloudPrintGaiaServiceId[]; | 37 extern const char kCloudPrintGaiaServiceId[]; |
| 37 extern const char kSyncGaiaServiceId[]; | 38 extern const char kSyncGaiaServiceId[]; |
| 38 extern const char kCloudPrintPushNotificationsSource[]; | 39 extern const char kCloudPrintPushNotificationsSource[]; |
| 39 extern const char kChromeCloudPrintProxyHeader[]; | 40 extern const char kChromeCloudPrintProxyHeader[]; |
| 40 extern const char kCloudPrintUserAgent[]; | 41 extern const char kCloudPrintUserAgent[]; |
| 41 extern const char kJobFetchReasonStartup[]; | 42 extern const char kJobFetchReasonStartup[]; |
| 42 extern const char kJobFetchReasonPoll[]; | 43 extern const char kJobFetchReasonPoll[]; |
| 43 extern const char kJobFetchReasonNotified[]; | 44 extern const char kJobFetchReasonNotified[]; |
| 44 extern const char kJobFetchReasonQueryMore[]; | 45 extern const char kJobFetchReasonQueryMore[]; |
| 46 extern const char kPrintSystemFailedMessageId[]; |
| 47 extern const char kGetPrinterCapsFailedMessageId[]; |
| 45 | 48 |
| 46 // Max retry count for job data fetch requests. | 49 // Max retry count for job data fetch requests. |
| 47 const int kJobDataMaxRetryCount = 5; | 50 const int kJobDataMaxRetryCount = 5; |
| 48 // Max retry count (infinity) for API fetch requests. | 51 // Max retry count (infinity) for API fetch requests. |
| 49 const int kCloudPrintAPIMaxRetryCount = -1; | 52 const int kCloudPrintAPIMaxRetryCount = -1; |
| 50 | 53 |
| 51 // When we don't have XMPP notifications available, we resort to polling for | 54 // When we don't have XMPP notifications available, we resort to polling for |
| 52 // print jobs. We choose a random interval in seconds between these 2 values. | 55 // print jobs. We choose a random interval in seconds between these 2 values. |
| 53 const int kMinJobPollIntervalSecs = 5*60; // 5 minutes in seconds | 56 const int kMinJobPollIntervalSecs = 5*60; // 5 minutes in seconds |
| 54 const int kMaxJobPollIntervalSecs = 8*60; // 8 minutes in seconds | 57 const int kMaxJobPollIntervalSecs = 8*60; // 8 minutes in seconds |
| 55 | 58 |
| 56 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_CONSTS_H_ | 59 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_CONSTS_H_ |
| 57 | 60 |
| OLD | NEW |