2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 * @file SignatureFinder.h
18 * @author Bartlomiej Grzelewski (b.grzelewski@samsung.com)
20 * @brief Search for author-signature.xml and signatureN.xml files.
21 * This class is WAC 2.0 specific and shuld be moved to
24 #ifndef _VALIDATION_CORE_SIGNATUREFINDER_H_
25 #define _VALIDATION_CORE_SIGNATUREFINDER_H_
30 namespace ValidationCore {
32 class SignatureFileInfo {
34 SignatureFileInfo(const std::string &fileName, int num)
35 : m_fileName(fileName)
39 std::string getFileName() const
44 int getFileNumber() const
49 bool operator<(const SignatureFileInfo &second) const
51 return m_fileNumber < second.m_fileNumber;
55 std::string m_fileName;
59 typedef std::set<SignatureFileInfo> SignatureFileInfoSet;
61 class SignatureFinder {
70 SignatureFinder() = delete;
71 explicit SignatureFinder(const std::string &dir);
73 virtual ~SignatureFinder();
75 Result find(SignatureFileInfoSet &set);
81 SignatureFinder(const SignatureFinder &);
82 const SignatureFinder &operator=(const SignatureFinder &);
85 } // namespace ValidationCore
87 #endif // _VALIDATION_CORE_SIGNATUREFINDER_H_