13e5483f6Sopenharmony_ci/*
23e5483f6Sopenharmony_ci * Copyright (C) 2024 Huawei Device Co., Ltd.
33e5483f6Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
43e5483f6Sopenharmony_ci * you may not use this file except in compliance with the License.
53e5483f6Sopenharmony_ci * You may obtain a copy of the License at
63e5483f6Sopenharmony_ci *
73e5483f6Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
83e5483f6Sopenharmony_ci *
93e5483f6Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
103e5483f6Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
113e5483f6Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
123e5483f6Sopenharmony_ci * See the License for the specific language governing permissions and
133e5483f6Sopenharmony_ci * limitations under the License.
143e5483f6Sopenharmony_ci */
153e5483f6Sopenharmony_ci
163e5483f6Sopenharmony_ci#ifndef VIBRATE_METADATA_H
173e5483f6Sopenharmony_ci#define VIBRATE_METADATA_H
183e5483f6Sopenharmony_ci
193e5483f6Sopenharmony_ci#include "ringtone_db_const.h"
203e5483f6Sopenharmony_ci#include "ringtone_type.h"
213e5483f6Sopenharmony_ci#include "vibrate_type.h"
223e5483f6Sopenharmony_ci
233e5483f6Sopenharmony_ci
243e5483f6Sopenharmony_cinamespace OHOS {
253e5483f6Sopenharmony_cinamespace Media {
263e5483f6Sopenharmony_ci#define EXPORT __attribute__ ((visibility ("default")))
273e5483f6Sopenharmony_ci
283e5483f6Sopenharmony_ciclass VibrateMetadata {
293e5483f6Sopenharmony_cipublic:
303e5483f6Sopenharmony_ci    EXPORT VibrateMetadata();
313e5483f6Sopenharmony_ci    EXPORT ~VibrateMetadata() = default;
323e5483f6Sopenharmony_ci    using VariantData = std::variant<int32_t, std::string, int64_t, double>;
333e5483f6Sopenharmony_ci
343e5483f6Sopenharmony_ci    EXPORT void SetVibrateId(const VariantData &vibrateId);
353e5483f6Sopenharmony_ci    EXPORT int32_t GetVibrateId() const;
363e5483f6Sopenharmony_ci
373e5483f6Sopenharmony_ci    EXPORT void SetData(const VariantData &data);
383e5483f6Sopenharmony_ci    EXPORT const std::string &GetData() const;
393e5483f6Sopenharmony_ci
403e5483f6Sopenharmony_ci    EXPORT void SetSize(const VariantData &size);
413e5483f6Sopenharmony_ci    EXPORT int64_t GetSize() const;
423e5483f6Sopenharmony_ci
433e5483f6Sopenharmony_ci    EXPORT void SetDisplayName(const VariantData &displayName);
443e5483f6Sopenharmony_ci    EXPORT const std::string &GetDisplayName() const;
453e5483f6Sopenharmony_ci
463e5483f6Sopenharmony_ci    EXPORT void SetTitle(const VariantData &title);
473e5483f6Sopenharmony_ci    EXPORT const std::string &GetTitle() const;
483e5483f6Sopenharmony_ci
493e5483f6Sopenharmony_ci    EXPORT void SetDisplayLanguage(const VariantData &displayLanguage);
503e5483f6Sopenharmony_ci    EXPORT const std::string &GetDisplayLanguage() const;
513e5483f6Sopenharmony_ci
523e5483f6Sopenharmony_ci    EXPORT void SetVibrateType(const VariantData &vibrateType);
533e5483f6Sopenharmony_ci    EXPORT int32_t GetVibrateType() const;
543e5483f6Sopenharmony_ci
553e5483f6Sopenharmony_ci    EXPORT void SetSourceType(const VariantData &sourceType);
563e5483f6Sopenharmony_ci    EXPORT int32_t GetSourceType() const;
573e5483f6Sopenharmony_ci
583e5483f6Sopenharmony_ci    EXPORT void SetDateAdded(const VariantData &dateAdded);
593e5483f6Sopenharmony_ci    EXPORT int64_t GetDateAdded() const;
603e5483f6Sopenharmony_ci
613e5483f6Sopenharmony_ci    EXPORT void SetDateModified(const VariantData &dateModified);
623e5483f6Sopenharmony_ci    EXPORT int64_t GetDateModified() const;
633e5483f6Sopenharmony_ci
643e5483f6Sopenharmony_ci    EXPORT void SetDateTaken(const VariantData &dateTaken);
653e5483f6Sopenharmony_ci    EXPORT int64_t GetDateTaken() const;
663e5483f6Sopenharmony_ci
673e5483f6Sopenharmony_ci    EXPORT void SetPlayMode(const VariantData &dateTaken);
683e5483f6Sopenharmony_ci    EXPORT int32_t GetPlayMode() const;
693e5483f6Sopenharmony_ci
703e5483f6Sopenharmony_ci    EXPORT void Init();
713e5483f6Sopenharmony_ci
723e5483f6Sopenharmony_ci    using VibrateMetadataFnPtr = void (VibrateMetadata::*)(const VariantData &);
733e5483f6Sopenharmony_ci    std::unordered_map<std::string, std::pair<RingtoneResultSetDataType, VibrateMetadataFnPtr>> memberFuncMap_;
743e5483f6Sopenharmony_ci
753e5483f6Sopenharmony_ci    EXPORT std::string ToString() const;
763e5483f6Sopenharmony_ciprivate:
773e5483f6Sopenharmony_ci    int32_t vibrateId_;
783e5483f6Sopenharmony_ci    std::string data_;
793e5483f6Sopenharmony_ci    int64_t size_;
803e5483f6Sopenharmony_ci    std::string displayName_;
813e5483f6Sopenharmony_ci    std::string title_;
823e5483f6Sopenharmony_ci    std::string displayLanguage_;
833e5483f6Sopenharmony_ci    int32_t vibrateType_;
843e5483f6Sopenharmony_ci    int32_t sourceType_;
853e5483f6Sopenharmony_ci    int64_t dateAdded_;
863e5483f6Sopenharmony_ci    int64_t dateModified_;
873e5483f6Sopenharmony_ci    int64_t dateTaken_;
883e5483f6Sopenharmony_ci    int32_t vibratePlayMode_;
893e5483f6Sopenharmony_ci};
903e5483f6Sopenharmony_ci} // namespace Media
913e5483f6Sopenharmony_ci} // namespace OHOS
923e5483f6Sopenharmony_ci
933e5483f6Sopenharmony_ci#endif // VIBRATE_METADATA_H
94