sync with tizen_2.0
[platform/framework/native/appfw.git] / src / system / FSys_DeviceId.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                FSys_DeviceId.h
20  * @brief               This is the header file for _DeviceId class.
21  */
22
23
24 #ifndef _FSYS_INTERNAL_DEVICE_ID_H_
25 #define _FSYS_INTERNAL_DEVICE_ID_H_
26
27
28 #include <FOspConfig.h>
29
30 namespace Tizen { namespace Base
31 {
32 class String;
33 class ByteBuffer;
34 }}
35
36 namespace Tizen { namespace System
37 {
38
39
40 class _DeviceId
41 {
42 public:
43         /**
44          * Gets device unique ID.
45          *
46          * @since   1.0
47          * @return  An error code
48          * @param[out]  deviceId          The device unique ID.
49          * @exception   E_SUCCESS         The method is successful.
50          * @exception   E_OUT_OF_MEMORY   The memory is insufficient.
51          * @exception   E_SYSTEM          A system error has occurred.
52          */     
53         static result GetId(Tizen::Base::String& deviceId);
54
55 private:
56         /**
57      * This is the default constructor for this class.
58      */
59         _DeviceId(void);
60
61         /**
62      * This is the destructor for this class.
63      */
64         ~_DeviceId(void);
65
66         static result GenerateCrc64(Tizen::Base::ByteBuffer& input, unsigned long long int& value);
67         static result Base32Encode(Tizen::Base::ByteBuffer& input, Tizen::Base::ByteBuffer& output);
68         static Tizen::Base::String __deviceId;
69 }; //_DeviceId
70
71 }}
72
73 #endif // _FSYS_INTERNAL_DEVICE_ID_H_