1 /* 2 * Copyright (C) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef OHOS_VCARD_RAW_DATA_H 17 #define OHOS_VCARD_RAW_DATA_H 18 #include <map> 19 #include <string> 20 21 namespace OHOS { 22 namespace Telephony { 23 class VCardRawData { 24 public: 25 void SetName(const std::string &name); 26 void SetRawValue(const std::string &rawValue); 27 void SetValues(const std::vector<std::string> &values); 28 void SetByte(const std::string &byte); 29 void AppendValues(const std::vector<std::string> &values); 30 void AppendGroup(const std::string &group); 31 void AppendParameter(const std::string ¶m, const std::string &value); 32 std::string GetName(); 33 std::string GetRawValue(); 34 std::string GetByte(); 35 std::vector<std::string> GetValue(); 36 std::vector<std::string> GetGroup(); 37 std::map<std::string, std::vector<std::string>> GetParasMap(); 38 std::vector<std::string> GetParameters(const std::string &key); 39 40 private: 41 std::string name_; 42 std::string rawValue_; 43 std::string bytes_; 44 std::vector<std::string> values_; 45 std::vector<std::string> groups_; 46 std::map<std::string, std::vector<std::string>> parasMap_; 47 }; 48 } // namespace Telephony 49 } // namespace OHOS 50 #endif // OHOS_VCARD_RAW_DATA_H