117fd14ceSopenharmony_ci/*
217fd14ceSopenharmony_ci * Copyright (C) 2023 Huawei Device Co., Ltd.
317fd14ceSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
417fd14ceSopenharmony_ci * you may not use this file except in compliance with the License.
517fd14ceSopenharmony_ci * You may obtain a copy of the License at
617fd14ceSopenharmony_ci *
717fd14ceSopenharmony_ci *    http://www.apache.org/licenses/LICENSE-2.0
817fd14ceSopenharmony_ci *
917fd14ceSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1017fd14ceSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1117fd14ceSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1217fd14ceSopenharmony_ci * See the License for the specific language governing permissions and
1317fd14ceSopenharmony_ci * limitations under the License.
1417fd14ceSopenharmony_ci */
1517fd14ceSopenharmony_ci
1617fd14ceSopenharmony_ci#ifndef PSEUDONYM_MANAGER_H
1717fd14ceSopenharmony_ci#define PSEUDONYM_MANAGER_H
1817fd14ceSopenharmony_ci
1917fd14ceSopenharmony_ci#include <stdint.h>
2017fd14ceSopenharmony_ci#include "common_defs.h"
2117fd14ceSopenharmony_ci#include "string_util.h"
2217fd14ceSopenharmony_ci
2317fd14ceSopenharmony_citypedef struct {
2417fd14ceSopenharmony_ci    void (*loadPseudonymData)(void);
2517fd14ceSopenharmony_ci    int32_t (*getRealInfo)(int32_t osAccountId, const char *pseudonymId, char **realInfo);
2617fd14ceSopenharmony_ci    int32_t (*getPseudonymId)(int32_t osAccountId, const char *indexKey, char **pseudonymId);
2717fd14ceSopenharmony_ci    int32_t (*savePseudonymId)(int32_t osAccountId, const char *pseudonymId, const char *realInfo,
2817fd14ceSopenharmony_ci        const char *deviceId, const char *indexKey);
2917fd14ceSopenharmony_ci    int32_t (*deleteAllPseudonymId)(int32_t osAccountId, const char *deviceId);
3017fd14ceSopenharmony_ci    int32_t (*deletePseudonymId)(int32_t osAccountId, const char *indexKey);
3117fd14ceSopenharmony_ci    bool (*isNeedRefreshPseudonymId)(int32_t osAccountId, const char *indexKey);
3217fd14ceSopenharmony_ci} PseudonymManager;
3317fd14ceSopenharmony_ci
3417fd14ceSopenharmony_ci#ifdef __cplusplus
3517fd14ceSopenharmony_ciextern "C" {
3617fd14ceSopenharmony_ci#endif
3717fd14ceSopenharmony_ci
3817fd14ceSopenharmony_ciPseudonymManager *GetPseudonymInstance(void);
3917fd14ceSopenharmony_civoid DestroyPseudonymManager(void);
4017fd14ceSopenharmony_ci
4117fd14ceSopenharmony_ci#ifdef __cplusplus
4217fd14ceSopenharmony_ci}
4317fd14ceSopenharmony_ci#endif
4417fd14ceSopenharmony_ci#endif
45