Compare commits

...

2 commits

4 changed files with 46 additions and 20 deletions

View file

@ -304,6 +304,22 @@ BluetoothAudioProvider::getLeAudioBroadcastDatapathConfiguration(
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
ndk::ScopedAStatus BluetoothAudioProvider::getLeAudioAseCodecConfiguredParameters(
const std::optional<std::vector<std::optional<
::aidl::android::hardware::bluetooth::audio::LeAudioAseConfiguration>>>&
in_sinkAseConfiguration,
const std::optional<std::vector<std::optional<
::aidl::android::hardware::bluetooth::audio::LeAudioAseConfiguration>>>&
in_sourceAseConfiguration,
std::optional<::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
LeAudioAseCodecConfiguredResponse>* _aidl_return) {
/* TODO: Implement */
(void)in_sinkAseConfiguration;
(void)in_sourceAseConfiguration;
(void)_aidl_return;
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
} // namespace audio
} // namespace bluetooth
} // namespace hardware

View file

@ -136,6 +136,16 @@ class BluetoothAudioProvider : public BnBluetoothAudioProvider {
const A2dpConfigurationHint& hint,
std::optional<audio::A2dpConfiguration>* _aidl_return);
ndk::ScopedAStatus getLeAudioAseCodecConfiguredParameters(
const std::optional<std::vector<std::optional<
::aidl::android::hardware::bluetooth::audio::LeAudioAseConfiguration>>>&
in_sinkAseConfiguration,
const std::optional<std::vector<std::optional<
::aidl::android::hardware::bluetooth::audio::LeAudioAseConfiguration>>>&
in_sourceAseConfiguration,
std::optional<::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
LeAudioAseCodecConfiguredResponse>* _aidl_return);
virtual bool isValid(const SessionType& sessionType) = 0;
protected:

View file

@ -104,7 +104,7 @@ void mv_f(const char *source, const char *destination) {
struct stat st;
xlstat(source, &st);
int src, dest;
struct file_attr a;
struct file_attribute a;
if (S_ISDIR(st.st_mode)) {
xmkdirs(destination, st.st_mode & 0777);
@ -127,7 +127,7 @@ void mv_dir(int src, int dest) {
struct dirent *entry;
DIR *dir;
int newsrc, newdest;
struct file_attr a;
struct file_attribute a;
dir = xfdopendir(src);
while ((entry = xreaddir(dir))) {
@ -156,7 +156,7 @@ void mv_dir(int src, int dest) {
void cp_afc(const char *source, const char *destination) {
int src, dest;
struct file_attr a;
struct file_attribute a;
getattr(source, &a);
if (S_ISDIR(a.st.st_mode)) {
@ -188,7 +188,7 @@ void clone_dir(int src, int dest, bool overwrite) {
DIR *dir;
int srcfd, destfd, newsrc, newdest;
char buf[PATH_MAX];
struct file_attr a;
struct file_attribute a;
dir = xfdopendir(src);
while ((entry = xreaddir(dir))) {
@ -229,7 +229,7 @@ void link_dir(int src, int dest) {
struct dirent *entry;
DIR *dir;
int newsrc, newdest;
struct file_attr a;
struct file_attribute a;
dir = xfdopendir(src);
while ((entry = xreaddir(dir))) {
@ -250,7 +250,7 @@ void link_dir(int src, int dest) {
}
}
int getattr(const char *path, struct file_attr *a) {
int getattr(const char *path, struct file_attribute *a) {
if (xlstat(path, &a->st) == -1)
return -1;
char *con;
@ -261,13 +261,13 @@ int getattr(const char *path, struct file_attr *a) {
return 0;
}
int getattrat(int dirfd, const char *name, struct file_attr *a) {
int getattrat(int dirfd, const char *name, struct file_attribute *a) {
char path[4096];
fd_pathat(dirfd, name, path, sizeof(path));
return getattr(path, a);
}
int fgetattr(int fd, struct file_attr *a) {
int fgetattr(int fd, struct file_attribute *a) {
if (xfstat(fd, &a->st) < 0)
return -1;
char *con;
@ -278,7 +278,7 @@ int fgetattr(int fd, struct file_attr *a) {
return 0;
}
int setattr(const char *path, struct file_attr *a) {
int setattr(const char *path, struct file_attribute *a) {
if (chmod(path, a->st.st_mode & 0777) < 0)
return -1;
if (chown(path, a->st.st_uid, a->st.st_gid) < 0)
@ -288,13 +288,13 @@ int setattr(const char *path, struct file_attr *a) {
return 0;
}
int setattrat(int dirfd, const char *name, struct file_attr *a) {
int setattrat(int dirfd, const char *name, struct file_attribute *a) {
char path[4096];
fd_pathat(dirfd, name, path, sizeof(path));
return setattr(path, a);
}
int fsetattr(int fd, struct file_attr *a) {
int fsetattr(int fd, struct file_attribute *a) {
if (fchmod(fd, a->st.st_mode & 0777) < 0)
return -1;
if (fchown(fd, a->st.st_uid, a->st.st_gid) < 0)
@ -305,13 +305,13 @@ int fsetattr(int fd, struct file_attr *a) {
}
void clone_attr(const char *source, const char *target) {
struct file_attr a;
struct file_attribute a;
getattr(source, &a);
setattr(target, &a);
}
void fclone_attr(int sourcefd, int targetfd) {
struct file_attr a;
struct file_attribute a;
fgetattr(sourcefd, &a);
fsetattr(targetfd, &a);
}

View file

@ -3,7 +3,7 @@
#define do_align(p, a) (((p) + (a) - 1) / (a) * (a))
#define align_off(p, a) (do_align(p, a) - (p))
struct file_attr {
struct file_attribute {
struct stat st;
char con[128];
};
@ -20,12 +20,12 @@ void mv_f(const char *source, const char *destination);
void mv_dir(int src, int dest);
void cp_afc(const char *source, const char *destination);
void link_dir(int src, int dest);
int getattr(const char *path, struct file_attr *a);
int getattrat(int dirfd, const char *name, struct file_attr *a);
int fgetattr(int fd, struct file_attr *a);
int setattr(const char *path, struct file_attr *a);
int setattrat(int dirfd, const char *name, struct file_attr *a);
int fsetattr(int fd, struct file_attr *a);
int getattr(const char *path, struct file_attribute *a);
int getattrat(int dirfd, const char *name, struct file_attribute *a);
int fgetattr(int fd, struct file_attribute *a);
int setattr(const char *path, struct file_attribute *a);
int setattrat(int dirfd, const char *name, struct file_attribute *a);
int fsetattr(int fd, struct file_attribute *a);
void fclone_attr(int sourcefd, int targetfd);
void clone_attr(const char *source, const char *target);
void fd_full_read(int fd, void **buf, size_t *size);