| 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_STATUS_H_ | 5 #ifndef CHROMEOS_BINDER_TRANSACTION_STATUS_H_ |
| 6 #define CHROMEOS_BINDER_TRANSACTION_STATUS_H_ | 6 #define CHROMEOS_BINDER_TRANSACTION_STATUS_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
| 9 #include "base/macros.h" | 11 #include "base/macros.h" |
| 10 #include "chromeos/binder/status.h" | 12 #include "chromeos/binder/status.h" |
| 11 #include "chromeos/binder/transaction_data.h" | 13 #include "chromeos/binder/transaction_data.h" |
| 12 #include "chromeos/chromeos_export.h" | 14 #include "chromeos/chromeos_export.h" |
| 13 | 15 |
| 14 namespace binder { | 16 namespace binder { |
| 15 | 17 |
| 16 // TransactionData whose contents is a status code. | 18 // TransactionData whose contents is a status code. |
| 17 // Use this class to return an error for transactions. | 19 // Use this class to return an error for transactions. |
| 18 // GetSenderPID() and GetSenderEUID() return 0. | 20 // GetSenderPID() and GetSenderEUID() return 0. |
| 19 class CHROMEOS_EXPORT TransactionStatus : public TransactionData { | 21 class CHROMEOS_EXPORT TransactionStatus : public TransactionData { |
| 20 public: | 22 public: |
| 21 explicit TransactionStatus(Status status); | 23 explicit TransactionStatus(Status status); |
| 22 ~TransactionStatus() override; | 24 ~TransactionStatus() override; |
| 23 | 25 |
| 24 // TransactionData override: | 26 // TransactionData override: |
| 25 uintptr_t GetCookie() const override; | 27 uintptr_t GetCookie() const override; |
| 26 uint32 GetCode() const override; | 28 uint32_t GetCode() const override; |
| 27 pid_t GetSenderPID() const override; | 29 pid_t GetSenderPID() const override; |
| 28 uid_t GetSenderEUID() const override; | 30 uid_t GetSenderEUID() const override; |
| 29 bool IsOneWay() const override; | 31 bool IsOneWay() const override; |
| 30 bool HasStatus() const override; | 32 bool HasStatus() const override; |
| 31 Status GetStatus() const override; | 33 Status GetStatus() const override; |
| 32 const void* GetData() const override; | 34 const void* GetData() const override; |
| 33 size_t GetDataSize() const override; | 35 size_t GetDataSize() const override; |
| 34 const uintptr_t* GetObjectOffsets() const override; | 36 const uintptr_t* GetObjectOffsets() const override; |
| 35 size_t GetNumObjectOffsets() const override; | 37 size_t GetNumObjectOffsets() const override; |
| 36 | 38 |
| 37 private: | 39 private: |
| 38 Status status_; | 40 Status status_; |
| 39 DISALLOW_COPY_AND_ASSIGN(TransactionStatus); | 41 DISALLOW_COPY_AND_ASSIGN(TransactionStatus); |
| 40 }; | 42 }; |
| 41 | 43 |
| 42 } // namespace binder | 44 } // namespace binder |
| 43 | 45 |
| 44 #endif // CHROMEOS_BINDER_TRANSACTION_STATUS_H_ | 46 #endif // CHROMEOS_BINDER_TRANSACTION_STATUS_H_ |
| OLD | NEW |