2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 * @file SignatureHandler.h
19 * @brief This is the header file for the %SignatureHandler class.
21 * This header file contains the declarations of the %SignatureHandler class.
23 #ifndef _SIGNATURE_HANDLER_H_
24 #define _SIGNATURE_HANDLER_H_
26 #include "XmlHandler.h"
27 #include "InstallationContext.h"
30 * @class SignatureHandler
31 * @brief This class represents the class of SignatureHandler.
34 * This class represents the class of SignatureHandler.
37 class SignatureHandler
41 SignatureHandler(void);
42 virtual ~SignatureHandler(void);
44 bool Construct(InstallationContext *pConext);
45 bool Parse(const char *pFilepath);
47 Tizen::Base::Collection::ArrayList* GetAuthorCertChain(void);
48 Tizen::Base::Collection::ArrayList* GetDistributorCertChain(void);
49 Tizen::Base::Collection::HashMap* GetReferenceMap();
52 SignatureHandler(const SignatureHandler& value);
53 SignatureHandler& operator =(const SignatureHandler& source);
55 virtual bool OnStartElement(const char *pName);
56 virtual bool OnEndElement(const char *pName);
57 virtual bool OnCharacters(const char *pCharacters);
59 bool OnSignatureStartElement(void);
60 bool OnReferenceStartElement(void);
61 bool OnDigestMethodStartElement(void);
63 bool OnCertificateValue(const char *pCharacters);
64 bool OnDigestValue(const char* pCharacters);
66 bool OnReferenceEndElement();
69 InstallationContext* __pContext;
70 Tizen::Base::Collection::ArrayList* __pAuthorCertChain;
71 Tizen::Base::Collection::ArrayList* __pDistributorCertChain;
72 bool __isAuthorSignature;
73 bool __isDistributorSignature;
75 Tizen::Base::String __referenceUri;
76 Tizen::Base::String __digestValue;
78 Tizen::Base::Collection::HashMap* __pReferenceMap;
79 bool __isReferenceDetected;
82 }; // SignatureHandler
84 #endif // _SIGNATURE_HANDLER_H_