OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROMEOS_BINDER_TRANSACTION_DATA_H_ | 5 #ifndef CHROMEOS_BINDER_TRANSACTION_DATA_H_ |
6 #define CHROMEOS_BINDER_TRANSACTION_DATA_H_ | 6 #define CHROMEOS_BINDER_TRANSACTION_DATA_H_ |
7 | 7 |
8 #include "base/basictypes.h" | |
9 #include "chromeos/binder/status.h" | 8 #include "chromeos/binder/status.h" |
10 | 9 |
11 namespace binder { | 10 namespace binder { |
12 | 11 |
13 // Data passed via transactions. | 12 // Data passed via transactions. |
14 class TransactionData { | 13 class TransactionData { |
15 public: | 14 public: |
16 virtual ~TransactionData() {} | 15 virtual ~TransactionData() {} |
17 | 16 |
18 // Returns the cookie which can be used to identify the target object. | 17 // Returns the cookie which can be used to identify the target object. |
19 virtual uintptr_t GetCookie() const = 0; | 18 virtual uintptr_t GetCookie() const = 0; |
20 | 19 |
21 // Returns the transaction code. | 20 // Returns the transaction code. |
22 virtual uint32 GetCode() const = 0; | 21 virtual uint32_t GetCode() const = 0; |
23 | 22 |
24 // Returns the PID of the sender. | 23 // Returns the PID of the sender. |
25 virtual pid_t GetSenderPID() const = 0; | 24 virtual pid_t GetSenderPID() const = 0; |
26 | 25 |
27 // Returns the EUID of the sender. | 26 // Returns the EUID of the sender. |
28 virtual uid_t GetSenderEUID() const = 0; | 27 virtual uid_t GetSenderEUID() const = 0; |
29 | 28 |
30 // Returns true if there is no need to send reply for the transaction. | 29 // Returns true if there is no need to send reply for the transaction. |
31 virtual bool IsOneWay() const = 0; | 30 virtual bool IsOneWay() const = 0; |
32 | 31 |
(...skipping 13 matching lines...) Expand all Loading... |
46 // Returns the offsets of objects stored in the payload. | 45 // Returns the offsets of objects stored in the payload. |
47 virtual const uintptr_t* GetObjectOffsets() const = 0; | 46 virtual const uintptr_t* GetObjectOffsets() const = 0; |
48 | 47 |
49 // Returns the number of objects. | 48 // Returns the number of objects. |
50 virtual size_t GetNumObjectOffsets() const = 0; | 49 virtual size_t GetNumObjectOffsets() const = 0; |
51 }; | 50 }; |
52 | 51 |
53 } // namespace binder | 52 } // namespace binder |
54 | 53 |
55 #endif // CHROMEOS_BINDER_TRANSACTION_DATA_H_ | 54 #endif // CHROMEOS_BINDER_TRANSACTION_DATA_H_ |
OLD | NEW |