Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: cloud_print/gcp20/prototype/privet_http_server.h

Issue 23271004: GCP2.0 Device: Adding advanced printing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@local-printing
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cloud_print/gcp20/prototype/printer.cc ('k') | cloud_print/gcp20/prototype/privet_http_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cloud_print/gcp20/prototype/privet_http_server.h
diff --git a/cloud_print/gcp20/prototype/privet_http_server.h b/cloud_print/gcp20/prototype/privet_http_server.h
index db113de402c5bd36cd4cca0a8bd88841916abeff..eb082c6b908fa4b6d323fd88ca67e4009ba2075c 100644
--- a/cloud_print/gcp20/prototype/privet_http_server.h
+++ b/cloud_print/gcp20/prototype/privet_http_server.h
@@ -98,17 +98,33 @@ class PrivetHttpServer: public net::HttpServer::Delegate {
virtual scoped_ptr<base::DictionaryValue> GetCapabilities() = 0;
// Invoked for creating a job.
- virtual void CreateJob(const std::string& ticket) = 0;
+ virtual LocalPrintJob::CreateResult CreateJob(
+ const std::string& ticket,
+ std::string* job_id,
+ int* expires_in,
+ // TODO(maksymb): Use base::TimeDelta for timeouts
+ int* error_timeout,
+ std::string* error_description) = 0;
// Invoked for simple local printing.
virtual LocalPrintJob::SaveResult SubmitDoc(
const LocalPrintJob& job,
std::string* job_id,
+ int* expires_in,
+ std::string* error_description,
+ int* timeout) = 0;
+
+ // Invoked for advanced local printing.
+ virtual LocalPrintJob::SaveResult SubmitDocWithId(
+ const LocalPrintJob& job,
+ const std::string& job_id,
+ int* expires_in,
std::string* error_description,
int* timeout) = 0;
// Invoked for getting job status.
- virtual void GetJobStatus(int job_id) = 0;
+ virtual bool GetJobState(const std::string& job_id,
+ LocalPrintJob::Info* info) = 0;
};
// Constructor doesn't start server.
@@ -155,12 +171,24 @@ class PrivetHttpServer: public net::HttpServer::Delegate {
// Pivet API methods. Return reference to NULL if output should be empty.
scoped_ptr<base::DictionaryValue> ProcessInfo(
net::HttpStatusCode* status_code) const;
+
scoped_ptr<base::DictionaryValue> ProcessCapabilities(
net::HttpStatusCode* status_code) const;
+
+ scoped_ptr<base::DictionaryValue> ProcessCreateJob(
+ const GURL& url,
+ const std::string& body,
+ net::HttpStatusCode* status_code) const;
+
scoped_ptr<base::DictionaryValue> ProcessSubmitDoc(
const GURL& url,
const net::HttpServerRequestInfo& info,
net::HttpStatusCode* status_code) const;
+
+ scoped_ptr<base::DictionaryValue> ProcessJobState(
+ const GURL& url,
+ net::HttpStatusCode* status_code) const;
+
scoped_ptr<base::DictionaryValue> ProcessRegister(
const GURL& url,
net::HttpStatusCode* status_code) const;
« no previous file with comments | « cloud_print/gcp20/prototype/printer.cc ('k') | cloud_print/gcp20/prototype/privet_http_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698