summaryrefslogtreecommitdiffstats
path: root/aidl_language.h
diff options
context:
space:
mode:
Diffstat (limited to 'aidl_language.h')
-rw-r--r--aidl_language.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/aidl_language.h b/aidl_language.h
index be6e4a2..362f9ea 100644
--- a/aidl_language.h
+++ b/aidl_language.h
@@ -56,14 +56,22 @@ class AidlNode {
class AidlArgument : public AidlNode {
public:
+ enum Direction { IN_DIR = 1, OUT_DIR = 2, INOUT_DIR = 3 };
+
AidlArgument(buffer_type direction, type_type type, buffer_type name);
virtual ~AidlArgument() = default;
- buffer_type direction;
+ Direction GetDirection() const { return direction_; }
+ bool DirectionWasSpecified() const { return direction_specified_; }
+ std::string ToString() const;
+
buffer_type name;
type_type type;
private:
+ Direction direction_;
+ bool direction_specified_;
+
DISALLOW_COPY_AND_ASSIGN(AidlArgument);
};
@@ -123,13 +131,6 @@ struct interface_type {
extern "C" {
#endif
-// in, out or inout
-enum {
- IN_PARAMETER = 1,
- OUT_PARAMETER = 2,
- INOUT_PARAMETER = 3
-};
-
// callbacks from within the parser
// these functions all take ownership of the strings
struct ParserCallbacks {