|
Line 0
a/Source/WebKit2/Shared/efl/KeyedDecoder.cpp_sec1
|
|
|
1 |
/* |
| 2 |
* Copyright (C) 2015 Naver Corp. All rights reserved. |
| 3 |
* |
| 4 |
* Redistribution and use in source and binary forms, with or without |
| 5 |
* modification, are permitted provided that the following conditions |
| 6 |
* are met: |
| 7 |
* 1. Redistributions of source code must retain the above copyright |
| 8 |
* notice, this list of conditions and the following disclaimer. |
| 9 |
* 2. Redistributions in binary form must reproduce the above copyright |
| 10 |
* notice, this list of conditions and the following disclaimer in the |
| 11 |
* documentation and/or other materials provided with the distribution. |
| 12 |
* |
| 13 |
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' |
| 14 |
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
| 15 |
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 16 |
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS |
| 17 |
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 18 |
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 19 |
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 20 |
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 21 |
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 22 |
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
| 23 |
* THE POSSIBILITY OF SUCH DAMAGE. |
| 24 |
*/ |
| 25 |
|
| 26 |
#include "config.h" |
| 27 |
#include "KeyedDecoder.h" |
| 28 |
|
| 29 |
#include <wtf/text/CString.h> |
| 30 |
|
| 31 |
namespace WebKit { |
| 32 |
|
| 33 |
KeyedDecoder::KeyedDecoder(const uint8_t* data, size_t size) |
| 34 |
{ |
| 35 |
} |
| 36 |
|
| 37 |
KeyedDecoder::~KeyedDecoder() |
| 38 |
{ |
| 39 |
} |
| 40 |
|
| 41 |
bool KeyedDecoder::decodeBytes(const String& key, const uint8_t*& bytes, size_t& size) |
| 42 |
{ |
| 43 |
return false; |
| 44 |
} |
| 45 |
|
| 46 |
template<typename T, typename F> |
| 47 |
bool KeyedDecoder::decodeSimpleValue(const String& key, T& result, F getFunction) |
| 48 |
{ |
| 49 |
return false; |
| 50 |
} |
| 51 |
|
| 52 |
bool KeyedDecoder::decodeBool(const String& key, bool& result) |
| 53 |
{ |
| 54 |
return decodeSimpleValue(key, result, g_variant_get_boolean); |
| 55 |
} |
| 56 |
|
| 57 |
bool KeyedDecoder::decodeUInt32(const String& key, uint32_t& result) |
| 58 |
{ |
| 59 |
return decodeSimpleValue(key, result, g_variant_get_uint32); |
| 60 |
} |
| 61 |
|
| 62 |
bool KeyedDecoder::decodeInt32(const String& key, int32_t& result) |
| 63 |
{ |
| 64 |
return decodeSimpleValue(key, result, g_variant_get_int32); |
| 65 |
} |
| 66 |
|
| 67 |
bool KeyedDecoder::decodeInt64(const String& key, int64_t& result) |
| 68 |
{ |
| 69 |
return decodeSimpleValue(key, result, g_variant_get_int64); |
| 70 |
} |
| 71 |
|
| 72 |
bool KeyedDecoder::decodeFloat(const String& key, float& result) |
| 73 |
{ |
| 74 |
return decodeSimpleValue(key, result, g_variant_get_double); |
| 75 |
} |
| 76 |
|
| 77 |
bool KeyedDecoder::decodeDouble(const String& key, double& result) |
| 78 |
{ |
| 79 |
return decodeSimpleValue(key, result, g_variant_get_double); |
| 80 |
} |
| 81 |
|
| 82 |
bool KeyedDecoder::decodeString(const String& key, String& result) |
| 83 |
{ |
| 84 |
return false; |
| 85 |
} |
| 86 |
|
| 87 |
bool KeyedDecoder::beginObject(const String& key) |
| 88 |
{ |
| 89 |
return false; |
| 90 |
} |
| 91 |
|
| 92 |
void KeyedDecoder::endObject() |
| 93 |
{ |
| 94 |
} |
| 95 |
|
| 96 |
bool KeyedDecoder::beginArray(const String& key) |
| 97 |
{ |
| 98 |
return false; |
| 99 |
} |
| 100 |
|
| 101 |
bool KeyedDecoder::beginArrayElement() |
| 102 |
{ |
| 103 |
return false; |
| 104 |
} |
| 105 |
|
| 106 |
void KeyedDecoder::endArrayElement() |
| 107 |
{ |
| 108 |
} |
| 109 |
|
| 110 |
void KeyedDecoder::endArray() |
| 111 |
{ |
| 112 |
} |
| 113 |
|
| 114 |
} // namespace WebKit |