summaryrefslogtreecommitdiffstats
path: root/chromeos/binder/constants.h
blob: d039b1812125be23b530cf7e299d487392878ece (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright 2015 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.

#ifndef CHROMEOS_BINDER_CONSTANTS_H_
#define CHROMEOS_BINDER_CONSTANTS_H_

#define BINDER_PACK_CHARS(c1, c2, c3, c4) \
  (((c1) << 24) | ((c2) << 16) | ((c3) << 8) | (c4))

namespace binder {

// Context manager's handle is always 0.
const uint32 kContextManagerHandle = 0;

// Transaction code constants.
const uint32 kFirstTransactionCode = 0x00000001;
const uint32 kLastTransactionCode = 0x00ffffff;
const uint32 kPingTransactionCode = BINDER_PACK_CHARS('_', 'P', 'N', 'G');

}  // namespace binder

#endif  // CHROMEOS_BINDER_CONSTANTS_H_