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 #include "unified_record.h" 17 18 namespace OHOS { 19 namespace UDMF { UnifiedRecord()20UnifiedRecord::UnifiedRecord() 21 { 22 dataType_ = UD_BUTT; 23 } 24 UnifiedRecord(UDType type)25UnifiedRecord::UnifiedRecord(UDType type) 26 { 27 if (type < ENTITY || type > UD_BUTT) { 28 dataType_ = UD_BUTT; 29 } 30 dataType_ = type; 31 } 32 GetType() const33UDType UnifiedRecord::GetType() const 34 { 35 return this->dataType_; 36 } 37 SetType(const UDType & type)38void UnifiedRecord::SetType(const UDType &type) 39 { 40 this->dataType_ = type; 41 } 42 GetSize()43int64_t UnifiedRecord::GetSize() 44 { 45 return 0; 46 } 47 GetUid() const48std::string UnifiedRecord::GetUid() const 49 { 50 return this->uid_; 51 } 52 SetUid(const std::string & id)53void UnifiedRecord::SetUid(const std::string &id) 54 { 55 this->uid_ = id; 56 } 57 } // namespace UDMF 58 } // namespace OHOS