Add stubs for UpdateEngine.AllocateSpaceForPayload

This API preallocates space for a Virtual A/B update.
Right now, it also returns an error (which becomes a
ServiceSpecificException in Java) when space is insufficient. This will
be fixed in a follow up CL.

Test: pass
Bug: 138808058

Change-Id: I587615ba765acb5a52c1918d6a4acc57a95d75f7
diff --git a/service_delegate_android_interface.h b/service_delegate_android_interface.h
index 6bd75b6..7f0169e 100644
--- a/service_delegate_android_interface.h
+++ b/service_delegate_android_interface.h
@@ -83,6 +83,19 @@
   virtual bool VerifyPayloadApplicable(const std::string& metadata_filename,
                                        brillo::ErrorPtr* error) = 0;
 
+  // Allocates space for a payload.
+  // Returns 0 if space is successfully preallocated.
+  // Return non-zero if not enough space is not available; returned value is
+  // the total space required (in bytes) to be free on the device for this
+  // update to be applied, and |error| is unset.
+  // In case of error, returns 0, and sets |error| accordingly.
+  //
+  // This function may block for several minutes in the worst case.
+  virtual uint64_t AllocateSpaceForPayload(
+      const std::string& metadata_filename,
+      const std::vector<std::string>& key_value_pair_headers,
+      brillo::ErrorPtr* error) = 0;
+
  protected:
   ServiceDelegateAndroidInterface() = default;
 };