blob: b32933be48ea85b8812763fe399ffdc8a84fb61f [file] [log] [blame]
// Copyright 2015 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <stdint.h>
#include <base/callback.h>
#include "binder_export.h" // NOLINT(build/include)
#include "ibinder.h" // NOLINT(build/include)
namespace protobinder {
class Parcel;
// Maintains the client side of a binder.
class BINDER_EXPORT BinderProxy : public IBinder {
explicit BinderProxy(uint32_t handle);
uint32_t handle() const { return handle_; }
int Transact(uint32_t code,
Parcel* data,
Parcel* reply,
uint32_t flags);
// Set a callback to be invoked when the remote (host/server) side of the
// connection is closed.
void SetDeathCallback(const base::Closure& closure);
// Called by BinderManager() in response to notification that the remote side
// of the connection has been closed.
void HandleDeathNotification();
virtual const BinderProxy* GetBinderProxy() const;
// Binder handle.
const uint32_t handle_;
// Called when the remote side of the connection is closed.
base::Closure death_callback_;
} // namespace protobinder