Revision: 6383
Author: [email protected]
Date: Thu Oct 15 10:50:37 2009
Log: Moved remotemessage.proto to the com.google.gwt.dev.shell.remoteui
package located under dev/core. Also added some comments to the file.
http://code.google.com/p/google-web-toolkit/source/detail?r=6383
Added:
/branches/remote-ui-communication/dev/core/src/com/google/gwt/dev/shell/remoteui
/branches/remote-ui-communication/dev/core/src/com/google/gwt/dev/shell/remoteui/remotemessage.proto
Deleted:
/branches/remote-ui-communication/dev/oophm/src/com/google/gwt/dev/shell/log/remotemessage.proto
=======================================
--- /dev/null
+++
/branches/remote-ui-communication/dev/core/src/com/google/gwt/dev/shell/remoteui/remotemessage.proto
Thu Oct 15 10:50:37 2009
@@ -0,0 +1,210 @@
+/*
+ * Copyright 2009 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may
not
+ * use this file except in compliance with the License. You may obtain a
copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
under
+ * the License.
+ */
+package com.google.gwt.dev.shell.remoteui;
+
+option java_outer_classname = "RemoteMessageProto";
+
+// Outer envelope for all messages
+message Message {
+
+ // Two types of messages - either a request, or a response
+ enum MessageType {
+ REQUEST = 0;
+ RESPONSE = 1;
+ }
+
+ // A request message. This is the root type for all request messages
+ message Request {
+
+ // Every request must be addressed to a service. The two types of
+ // services are the ViewerService, and the DevModeService. The
ViewerService
+ // accepts commands for a Viewer. The DevModeService accepts requests
for
+ // the Development Mode Server.
+ enum ServiceType {
+ VIEWER = 0;
+ DEV_MODE = 1;
+ }
+
+ // The root type for all requests for the ViewerService
+ message ViewerRequest {
+
+ // The different types of requests for a ViewerService
+ enum RequestType {
+ ADD_LOG = 0;
+ ADD_LOG_BRANCH = 1;
+ ADD_LOG_ENTRY = 2;
+ DISCONNECT_LOG = 3;
+ }
+
+ // Add a log message to the view
+ message AddLog {
+
+ // The type of log - either a server log, a module log, or
+ // the main log
+ enum LogType {
+ BROWSER = 0;
+ MODULE = 1;
+ MAIN = 2;
+ }
+
+ // Information needed for creating a Module Log
+ message ModuleLog {
+ required string name = 1;
+ optional bytes icon = 2;
+ required string sessionKey = 3;
+ required string userAgent = 4;
+ required string url = 5;
+ required string tabKey = 6;
+ required string remoteHost = 7;
+ }
+
+ // Information needed for creating a Server Log
+ message ServerLog {
+ required string name = 1;
+ optional bytes icon = 2;
+ }
+
+ // Information needed for creating the Main Log. At this time, no
+ // additional information is needed.
+ message MainLog {
+ }
+
+ required LogType type = 1;
+ optional ModuleLog moduleLog = 2;
+ optional ServerLog serverLog = 3;
+ optional MainLog mainLog = 4;
+ }
+
+ // The data for a log entry
+ message LogData {
+
+ // The HelpInfo portion of the log entry
+ message HelpInfo {
+ optional string url = 1;
+ optional string text = 2;
+ }
+
+ required string summary = 1;
+ optional string level = 2; // TODO: Maybe use an enum here
+ optional string details = 3;
+ optional HelpInfo helpInfo = 4;
+ }
+
+ // Add a new log branch to an existing log
+ message AddLogBranch {
+ required uint32 parentLogHandle = 1;
+ required uint32 indexInParent = 2;
+ required LogData logData = 3;
+ }
+
+ // Add a log entry to a log
+ message AddLogEntry {
+ required uint32 logHandle = 1;
+ required uint32 indexInLog = 2;
+ required LogData logData = 3;
+ }
+
+ // Disconnect the given log (i.e. process for which information was
+ // being logged is dead)
+ message DisconnectLog {
+ required uint32 logHandle = 1;
+ }
+
+ required RequestType requestType = 1;
+ optional AddLog addLog = 2;
+ optional AddLogBranch addLogBranch = 3;
+ optional AddLogEntry addLogEntry = 4;
+ optional DisconnectLog disconnectLog = 5;
+ }
+
+ // The root type for all requests for the DevModeService
+ message DevModeRequest {
+
+ // The different types of requests for the DevModeService
+ enum RequestType {
+ RESTART_SERVER = 0;
+ }
+
+ // Restart the server. No additional information is needed at this
time.
+ message RestartServer {
+ }
+
+ required RequestType requestType = 1;
+ optional RestartServer restartServer = 2;
+ }
+
+ required ServiceType serviceType = 1;
+ optional uint32 requestId = 2;
+ optional ViewerRequest viewerRequest = 3;
+ optional DevModeRequest devModeRequest = 4;
+ }
+
+ // A response message for a request. This is the root type for all
response
+ // messages.
+ message Response {
+
+ // The root type for all response messages from the ViewerService
+ message ViewerResponse {
+
+ // The different types of response messages that can come from the
+ // ViewerService
+ enum ResponseType {
+ ADD_LOG = 0;
+ ADD_LOG_BRANCH = 1;
+ }
+
+ // Response to an AddLog request
+ message AddLog {
+ required uint32 logHandle = 1;
+ }
+
+ // Response to an AddLogBranch request
+ message AddLogBranch {
+ required uint32 logHandle = 1;
+ }
+
+ required ResponseType responseType = 1;
+ optional AddLog addLog = 2;
+ optional AddLogBranch addLogBranch = 3;
+ }
+
+ // The root type for all response messages from the DevModeService
+ message DevModeResponse {
+
+ // The different types of response messages from the DevModeService
+ enum ResponseType {
+ RESTART_SERVER = 0;
+ }
+
+ // Response to a RestartServer request. Right now, there is no
information
+ // that needs to be passed back (TODO: Provide a success code?)
+ message RestartServer {
+ }
+
+ required ResponseType responseType = 1;
+ optional RestartServer restartServer = 2;
+ }
+
+ required uint32 requestId = 1;
+ optional ViewerResponse viewerResponse = 2;
+ optional DevModeResponse devModeResponse = 3;
+ }
+
+ required MessageType messageType = 1;
+ optional Request request = 2;
+ optional Response response = 3;
+
+}
=======================================
---
/branches/remote-ui-communication/dev/oophm/src/com/google/gwt/dev/shell/log/remotemessage.proto
Thu Oct 15 10:50:31 2009
+++ /dev/null
@@ -1,153 +0,0 @@
-package com.google.gwt.dev.shell.log;
-
-option java_outer_classname = "RemoteMessageProto";
-
-message Message {
-
- enum MessageType {
- REQUEST = 0;
- RESPONSE = 1;
- }
-
- message Request {
-
- enum ServiceType {
- VIEWER = 0;
- DEV_MODE = 1;
- }
-
- message ViewerRequest {
- enum RequestType {
- ADD_LOG = 0;
- ADD_LOG_BRANCH = 1;
- ADD_LOG_ENTRY = 2;
- DISCONNECT_LOG = 3;
- }
-
- message AddLog {
- enum LogType {
- BROWSER = 0;
- SERVER = 1;
- MAIN = 2;
- }
-
- message BrowserLog {
- required string name = 1;
- optional bytes icon = 2;
- required string sessionKey = 3;
- required string userAgent = 4;
- required string url = 5;
- required string tabKey = 6;
- required string remoteHost = 7;
- }
-
- message ServerLog {
- required string name = 1;
- optional bytes icon = 2;
- }
-
- message MainLog {
- }
-
- required LogType type = 1;
- optional BrowserLog browserLog = 2;
- optional ServerLog serverLog = 3;
- optional MainLog mainLog = 4;
- }
-
- message LogData {
- message HelpInfo {
- optional string url = 1;
- optional string text = 2;
- }
-
- required string summary = 1;
- optional string level = 2;
- optional string details = 3;
- optional HelpInfo helpInfo = 4;
- }
-
- message AddLogBranch {
- required uint32 parentLogHandle = 1;
- required uint32 indexInParent = 2;
- required LogData logData = 3;
- }
-
- message AddLogEntry {
- required uint32 logHandle = 1;
- required uint32 indexInLog = 2;
- required LogData logData = 3;
- }
-
- message DisconnectLog {
- required uint32 logHandle = 1;
- }
-
- required RequestType requestType = 1;
- optional AddLog addLog = 2;
- optional AddLogBranch addLogBranch = 3;
- optional AddLogEntry addLogEntry = 4;
- optional DisconnectLog disconnectLog = 5;
- }
-
- message DevModeRequest {
- enum RequestType {
- RESTART_SERVER = 0;
- }
-
- message RestartServer {
- }
-
- required RequestType requestType = 1;
- optional RestartServer restartServer = 2;
- }
-
- required ServiceType serviceType = 1;
- optional uint32 requestId = 2;
- optional ViewerRequest viewerRequest = 3;
- optional DevModeRequest devModeRequest = 4;
- }
-
- message Response {
-
- message ViewerResponse {
- enum ResponseType {
- ADD_LOG = 0;
- ADD_LOG_BRANCH = 1;
- }
-
- message AddLog {
- required uint32 logHandle = 1;
- }
-
- message AddLogBranch {
- required uint32 logHandle = 1;
- }
-
- required ResponseType responseType = 1;
- optional AddLog addLog = 2;
- optional AddLogBranch addLogBranch = 3;
- }
-
- message DevModeResponse {
- enum ResponseType {
- RESTART_SERVER = 0;
- }
-
- message RestartServer {
- }
-
- required ResponseType responseType = 1;
- optional RestartServer restartServer = 2;
- }
-
- required uint32 requestId = 1;
- optional ViewerResponse viewerResponse = 2;
- optional DevModeResponse devModeResponse = 3;
- }
-
- required MessageType messageType = 1;
- optional Request request = 2;
- optional Response response = 3;
-
-}
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---