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.
5 #ifndef CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_SERVICE_HELPERS_H_
6 #define CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_SERVICE_HELPERS_H_
11 #include "chrome/service/cloud_print/print_system.h"
14 namespace cloud_print
{
16 // Helper methods for the cloud print proxy code.
17 GURL
GetUrlForJobStatusUpdate(const GURL
& cloud_print_server_url
,
18 const std::string
& job_id
,
19 PrintJobStatus status
,
22 GURL
GetUrlForJobStatusUpdate(const GURL
& cloud_print_server_url
,
23 const std::string
& job_id
,
24 const PrintJobDetails
& details
);
26 // Returns an MD5 hash for printer tags in the given |printer_info|.
27 std::string
GetHashOfPrinterInfo(
28 const printing::PrinterBasicInfo
& printer_info
);
30 // Returns any post data for printer tags in the given |printer_info|.
31 std::string
GetPostDataForPrinterInfo(
32 const printing::PrinterBasicInfo
& printer_info
,
33 const std::string
& mime_boundary
);
35 // Returns true if tags indicate a dry run (test) job.
36 bool IsDryRunJob(const std::vector
<std::string
>& tags
);
38 // Created cloud print auth header from the auth token stored in the store.
39 std::string
GetCloudPrintAuthHeaderFromStore();
41 } // namespace cloud_print
43 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_SERVICE_HELPERS_H_