blob: eabd0cc09795f19f935f2eeb7ae058d31f7ccc47 [file] [log] [blame]
Martijn Coenen1b7297c2016-05-19 09:23:46 +02001// Boilerplate code for the passthrough client to get a service
2// proxy object. Not auto-generated, but probably cut-and-pasted.
3
4#include "MathImplementations.h"
5#include <string>
6
7using android::hardware::MathImplementation;
8
9ptrdiff_t findServiceSingleton(std::string name)
10{
11 (void)name;
12 static MathImplementation serviceSingleton;
13 // We don't need this anymore, since the handle we're returning is the object we're calling into
14 // registerService(name, serviceSingleton);
15 return (ptrdiff_t) &serviceSingleton;
16}
17extern "C" {
18struct {
19 ptrdiff_t (*findService)(std::string name) = findServiceSingleton;
20} hidlServiceFinderFunctionHolder; // This name is magic
21}