Fix the logic for getting DeviceUniqueKey
[platform/framework/native/appfw.git] / inc / FBaseColIHashCodeProvider.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17
18 /**
19  * @file                FBaseColIHashCodeProvider.h
20  * @brief               This is the header file for the %IHashCodeProvider interface.
21  *
22  * This header file contains the declarations of the %IHashCodeProvider interface.
23  */
24 #ifndef _FBASE_COL_IHASH_CODE_PROVIDER_H_
25 #define _FBASE_COL_IHASH_CODE_PROVIDER_H_
26
27 namespace Tizen {namespace Base
28 {
29 class Object;
30 }}
31
32 namespace Tizen { namespace Base { namespace Collection
33 {
34
35 /**
36  * @interface   IHashCodeProvider
37  * @brief       This interface represents classes that can provide the hash code of a specific type of object.
38  *
39  * @since 2.0
40  *
41  * The %IHashCodeProvider interface represents classes that can provide the hash code of a specific type of object.
42  */
43 class _OSP_EXPORT_ IHashCodeProvider
44 {
45 public:
46         /**
47          * This polymorphic destructor should be overridden if required. @n
48          * This way, the destructors of the derived classes are called when the destructor of this interface is called.
49          *
50          * @since 2.0
51          */
52         virtual ~IHashCodeProvider(void) {}
53
54         /**
55          * Gets the hash code of the specified object.
56          *
57          * @since 2.0
58          *
59          * @return              The hash code of the specified object
60          * @param[in]   obj A pointer to the object whose hash code is required
61          * @remarks     The hash algorithm is usually specific to a type.
62          *                              Two equal instances must return the same hash value.
63          *                              For better performance, the used hash function must generate a random distribution for all inputs.
64          */
65         virtual int GetHashCode(const Tizen::Base::Object& obj) const = 0;
66
67 protected:
68         //
69         // This method is for internal use only. Using this method can cause behavioral, security-related,
70         // and consistency-related issues in the application.
71         // This method is reserved and may change its name at any time without prior notice.
72         //
73         // @since 2.0
74         //
75         virtual void IHashCodeProvider_Reserved1(void) { }
76
77
78         //
79         // This method is for internal use only. Using this method can cause behavioral, security-related,
80         // and consistency-related issues in the application.
81         // This method is reserved and may change its name at any time without prior notice.
82         //
83         // @since 2.0
84         //
85         virtual void IHashCodeProvider_Reserved2(void) { }
86
87 }; // IHashCodeProvider
88
89 }}} // Tizen::Base::Collection
90
91 #endif // _FBASE_COL_IHASH_CODE_PROVIDER_H_