Home
last modified time | relevance | path

Searched refs:Value (Results 1 – 13 of 13) sorted by relevance

/bootable/recovery/edify/include/edify/
Dexpr.h57 struct Value { struct
63 Value(Type type, std::string str) : type(type), data(std::move(str)) {} in Value() function
71 using Function = Value* (*)(const char* name, State* state, argument
88 Value* EvaluateValue(State* state, const std::unique_ptr<Expr>& expr);
96 Value* Literal(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv);
101 Value* ConcatFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv);
102 Value* LogicalAndFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv);
103 Value* LogicalOrFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv);
104 Value* LogicalNotFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv);
105 Value* SubstringFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv);
[all …]
/bootable/recovery/edify/
Dexpr.cpp50 std::unique_ptr<Value> v(expr->fn(expr->name.c_str(), state, expr->argv)); in Evaluate()
54 if (v->type != Value::Type::STRING) { in Evaluate()
63 Value* EvaluateValue(State* state, const std::unique_ptr<Expr>& expr) { in EvaluateValue()
67 Value* StringValue(const char* str) { in StringValue()
71 return new Value(Value::Type::STRING, str); in StringValue()
74 Value* StringValue(const std::string& str) { in StringValue()
78 Value* ConcatFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) { in ConcatFn()
94 Value* IfElseFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) { in IfElseFn()
114 Value* AbortFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) { in AbortFn()
124 Value* AssertFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) { in AssertFn()
[all …]
/bootable/recovery/updater/
Ddynamic_partitions.cpp45 std::vector<std::unique_ptr<Value>> args; in ReadStringArgs()
53 if (args[i]->type != Value::Type::STRING) { in ReadStringArgs()
66 Value* UnmapPartitionFn(const char* name, State* state, in UnmapPartitionFn()
76 Value* MapPartitionFn(const char* name, State* state, in MapPartitionFn()
89 Value* UpdateDynamicPartitionsFn(const char* name, State* state, in UpdateDynamicPartitionsFn()
95 std::vector<std::unique_ptr<Value>> args; in UpdateDynamicPartitionsFn()
99 const std::unique_ptr<Value>& op_list_value = args[0]; in UpdateDynamicPartitionsFn()
100 if (op_list_value->type != Value::Type::BLOB) { in UpdateDynamicPartitionsFn()
Dinstall.cpp85 Value* UIPrintFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) { in UIPrintFn()
100 Value* PackageExtractFileFn(const char* name, State* state, in PackageExtractFileFn()
191 return new Value(Value::Type::BLOB, buffer); in PackageExtractFileFn()
203 Value* PatchPartitionCheckFn(const char* name, State* state, in PatchPartitionCheckFn()
244 Value* PatchPartitionFn(const char* name, State* state, in PatchPartitionFn()
269 std::vector<std::unique_ptr<Value>> values; in PatchPartitionFn()
270 if (!ReadValueArgs(state, argv, &values, 2, 1) || values[0]->type != Value::Type::BLOB) { in PatchPartitionFn()
287 Value* MountFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) { in MountFn()
334 Value* IsMountedFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) { in IsMountedFn()
357 Value* UnmountFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) { in UnmountFn()
[all …]
Dblockimg.cpp1394 Value patch_value( in PerformCommandDiff()
1395 Value::Type::BLOB, in PerformCommandDiff()
1626 static Value* PerformBlockImageUpdate(const char* name, State* state, in PerformBlockImageUpdate()
1644 std::vector<std::unique_ptr<Value>> args; in PerformBlockImageUpdate()
1654 const std::unique_ptr<Value>& blockdev_filename = args[0]; in PerformBlockImageUpdate()
1655 const std::unique_ptr<Value>& transfer_list_value = args[1]; in PerformBlockImageUpdate()
1656 const std::unique_ptr<Value>& new_data_fn = args[2]; in PerformBlockImageUpdate()
1657 const std::unique_ptr<Value>& patch_data_fn = args[3]; in PerformBlockImageUpdate()
1659 if (blockdev_filename->type != Value::Type::STRING) { in PerformBlockImageUpdate()
1663 if (transfer_list_value->type != Value::Type::BLOB) { in PerformBlockImageUpdate()
[all …]
Dupdate_simulator_main.cpp47 Value* SimulatorPlaceHolderFn(const char* name, State* /* state */, in SimulatorPlaceHolderFn()
/bootable/recovery/applypatch/include/applypatch/
Dapplypatch.h31 struct Value;
79 bool PatchPartition(const Partition& target, const Partition& source, const Value& patch,
80 const Value* bonus, bool backup_source);
109 int ApplyBSDiffPatch(const unsigned char* old_data, size_t old_size, const Value& patch,
117 int ApplyImagePatch(const unsigned char* old_data, size_t old_size, const Value& patch, SinkFn sink,
118 const Value* bonus_data);
/bootable/recovery/applypatch/
Dapplypatch_modes.cpp79 Value patch(Value::Type::BLOB, std::move(patch_contents)); in PatchMode()
80 std::unique_ptr<Value> bonus; in PatchMode()
87 bonus = std::make_unique<Value>(Value::Type::BLOB, std::move(bonus_contents)); in PatchMode()
Dimgpatch.cpp54 const Value& patch, size_t patch_offset, in ApplyBSDiffPatchAndStreamOutput()
137 Value patch(Value::Type::BLOB, in ApplyImagePatch()
142 int ApplyImagePatch(const unsigned char* old_data, size_t old_size, const Value& patch, SinkFn sink, in ApplyImagePatch()
143 const Value* bonus_data) { in ApplyImagePatch()
Dapplypatch.cpp50 const Value& patch, const Value* bonus_data, bool backup_source);
268 bool PatchPartition(const Partition& target, const Partition& source, const Value& patch, in PatchPartition()
269 const Value* bonus, bool backup_source) { in PatchPartition()
329 const Value& patch, const Value* bonus_data, bool backup_source) { in GenerateTarget()
336 if (patch.type != Value::Type::BLOB) { in GenerateTarget()
Dbspatch.cpp68 int ApplyBSDiffPatch(const unsigned char* old_data, size_t old_size, const Value& patch, in ApplyBSDiffPatch()
/bootable/recovery/tests/unit/
Dapplypatch_test.cpp138 Value patch(Value::Type::BLOB, std::string(patch_fc.data.cbegin(), patch_fc.data.cend())); in TEST_F()
142 Value bonus(Value::Type::BLOB, std::string(bonus_fc.data.cbegin(), bonus_fc.data.cend())); in TEST_F()
152 Value patch(Value::Type::BLOB, std::string(patch_fc.data.cbegin(), patch_fc.data.cend())); in TEST_F()
Dupdater_test.cpp115 static Value* BlobToString(const char* name, State* state, in BlobToString()
121 std::vector<std::unique_ptr<Value>> args; in BlobToString()
126 if (args[0]->type != Value::Type::BLOB) { in BlobToString()
130 args[0]->type = Value::Type::STRING; in BlobToString()