diff --git a/dsoftbus/depend/device_auth/device_auth.c b/dsoftbus/depend/device_auth/device_auth.c index 395449c35980e82bfaf194c06ddf1644457775fe..db5c6a3877f3c172828ce4825ffb3a079cfef858 100644 --- a/dsoftbus/depend/device_auth/device_auth.c +++ b/dsoftbus/depend/device_auth/device_auth.c @@ -18,7 +18,7 @@ static int32_t ProcessData(int64_t authReqId, const uint8_t *data, uint32_t data } -static int32_t AuthDevice(int64_t authReqId, const char *authParams, +static int32_t AuthDevice(int32_t OsAccountId, int64_t authReqId, const char *authParams, const DeviceAuthCallback *callback) { callback->onTransmit(authReqId, (const uint8_t *)AUTH_START, strlen(AUTH_START)); diff --git a/dsoftbus/depend/device_auth/include/device_auth.h b/dsoftbus/depend/device_auth/include/device_auth.h index 200705eaa8a94cba5dfe7cffdcb40963e0073ebd..2c7a076927e799aec4efc4d91b170411fc45b206 100644 --- a/dsoftbus/depend/device_auth/include/device_auth.h +++ b/dsoftbus/depend/device_auth/include/device_auth.h @@ -4,6 +4,23 @@ #include #include +typedef enum { + DEFAULT_OS_ACCOUNT = 0, + INVALID_OS_ACCOUNT = -1, + ANY_OS_ACCOUNT = -2, +} OsAccountEnum; + +typedef enum { + GROUP_TYPE_INVALID = -1, + ALL_GROUP = 0, + IDENTICAL_ACCOUNT_GROUP = 1, + PEER_TO_PEER_GROUP = 256, + COMPATIBLE_GROUP = 512, + ACROSS_ACCOUNT_AUTHORIZE_GROUP = 1282 +} GroupType; + +#define FIELD_GROUP_ID "groupId" +#define FIELD_GROUP_TYPE "groupType" #define FIELD_PEER_CONN_DEVICE_ID "peerConnDeviceId" #define FIELD_SERVICE_PKG_NAME "servicePkgName" #define FIELD_IS_CLIENT "isClient" @@ -22,11 +39,13 @@ typedef struct { typedef struct { int32_t (*processData)(int64_t authReqId, const uint8_t *data, uint32_t dataLen, const DeviceAuthCallback *gaCallback); - int32_t (*authDevice)(int64_t authReqId, const char *authParams, const DeviceAuthCallback *gaCallback); + int32_t (*authDevice)(int32_t osAccountId, int64_t authReqId, const char *authParams, const DeviceAuthCallback *gaCallback); } GroupAuthManager; typedef struct { void (*onDeviceNotTrusted)(const char *peerUdid); + void (*onGroupCreated)(const char *groupInfo); + void (*onGroupDeleted)(const char *groupInfo); } DataChangeListener; typedef struct {