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

Unified Diff: ceee/ie/broker/broker_rpc_client.h

Issue 4508002: COM replaced with RPC for firing events in broker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 | « ceee/ie/broker/broker_module.cc ('k') | ceee/ie/broker/broker_rpc_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ceee/ie/broker/broker_rpc_client.h
===================================================================
--- ceee/ie/broker/broker_rpc_client.h (revision 0)
+++ ceee/ie/broker/broker_rpc_client.h (revision 0)
@@ -0,0 +1,47 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Broker RPC Client.
+
+#ifndef CEEE_IE_BROKER_BROKER_RPC_CLIENT_H_
+#define CEEE_IE_BROKER_BROKER_RPC_CLIENT_H_
+
+#include <wtypes.h>
+#include "base/basictypes.h"
+
+// Class provides comunication with BrokerRpcServer.
+class BrokerRpcClient {
+ public:
+ BrokerRpcClient();
+ ~BrokerRpcClient();
+
+ // Initialize connection with server.
+ bool Connect();
+
+ // Relese connection with server
+ void Disconnect();
+
+ // Returns true if object ready for remote calls.
+ bool is_connected() const {
+ return context_ != NULL && binding_handle_ != NULL;
+ }
+
+ // @name Remote calls.
+ // @{
+ // Calls FireEvent on server side.
+ bool FireEvent(BSTR event_name, BSTR event_args);
+ // @}
+
+ private:
+ void LockContext();
+ void ReleaseContext();
+
+ RPC_BINDING_HANDLE binding_handle_;
+ // Context handle. It is required to make RPC server know number of active
+ // clients.
+ void* context_;
+ DISALLOW_COPY_AND_ASSIGN(BrokerRpcClient);
+};
+
+#endif // CEEE_IE_BROKER_BROKER_RPC_CLIENT_H_
Property changes on: ceee\ie\broker\broker_rpc_client.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « ceee/ie/broker/broker_module.cc ('k') | ceee/ie/broker/broker_rpc_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698