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

Unified Diff: third_party/grpc/src/core/client_config/lb_policy_factory.h

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
Index: third_party/grpc/src/core/client_config/lb_policy_factory.h
diff --git a/third_party/WebKit/Source/modules/webmidi/MIDIOutput.idl b/third_party/grpc/src/core/client_config/lb_policy_factory.h
similarity index 52%
copy from third_party/WebKit/Source/modules/webmidi/MIDIOutput.idl
copy to third_party/grpc/src/core/client_config/lb_policy_factory.h
index 58a86353dee4056db99e9aba9db14136447cc5f6..04610316ee4300bed4b5bfa1804928d2366a44fe 100644
--- a/third_party/WebKit/Source/modules/webmidi/MIDIOutput.idl
+++ b/third_party/grpc/src/core/client_config/lb_policy_factory.h
@@ -1,5 +1,7 @@
/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
+ *
+ * Copyright 2015, Google Inc.
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -26,15 +28,46 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
*/
-// http://www.w3.org/TR/webmidi/#idl-def-MIDIOutput
-// http://cwilso.github.io/web-midi-api/#idl-def-MIDIOutput
+#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICY_FACTORY_H
+#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICY_FACTORY_H
+
+#include "src/core/client_config/lb_policy.h"
+#include "src/core/client_config/subchannel.h"
+
+typedef struct grpc_lb_policy_factory grpc_lb_policy_factory;
+typedef struct grpc_lb_policy_factory_vtable grpc_lb_policy_factory_vtable;
+
+/** grpc_lb_policy provides grpc_client_config objects to grpc_channel
+ objects */
+struct grpc_lb_policy_factory {
+ const grpc_lb_policy_factory_vtable *vtable;
+};
+
+typedef struct grpc_lb_policy_args {
+ grpc_subchannel **subchannels;
+ size_t num_subchannels;
+} grpc_lb_policy_args;
+
+struct grpc_lb_policy_factory_vtable {
+ void (*ref)(grpc_lb_policy_factory *factory);
+ void (*unref)(grpc_lb_policy_factory *factory);
+
+ /** Implementation of grpc_lb_policy_factory_create_lb_policy */
+ grpc_lb_policy *(*create_lb_policy)(grpc_lb_policy_factory *factory,
+ grpc_lb_policy_args *args);
-[
- SetWrapperReferenceTo(MIDIAccess midiAccess),
-] interface MIDIOutput : MIDIPort {
- // TODO(toyoshim): implement void clear()
- [RaisesException] void send(Uint8Array data, optional double timestamp);
- [RaisesException] void send(sequence<unsigned long> data, optional double timestamp);
+ /** Name for the LB policy this factory implements */
+ const char *name;
};
+
+void grpc_lb_policy_factory_ref(grpc_lb_policy_factory *factory);
+void grpc_lb_policy_factory_unref(grpc_lb_policy_factory *factory);
+
+/** Create a lb_policy instance. */
+grpc_lb_policy *grpc_lb_policy_factory_create_lb_policy(
+ grpc_lb_policy_factory *factory, grpc_lb_policy_args *args);
+
+#endif /* GRPC_INTERNAL_CORE_CONFIG_LB_POLICY_FACTORY_H */
« no previous file with comments | « third_party/grpc/src/core/client_config/lb_policy.c ('k') | third_party/grpc/src/core/client_config/lb_policy_factory.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698