1a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com// Copyright (C) 2014 Google Inc. 2a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com// 3a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com// Licensed under the Apache License, Version 2.0 (the "License"); 4a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com// you may not use this file except in compliance with the License. 5a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com// You may obtain a copy of the License at 6a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com// 7a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com// http://www.apache.org/licenses/LICENSE-2.0 8a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com// 9a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com// Unless required by applicable law or agreed to in writing, software 10a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com// distributed under the License is distributed on an "AS IS" BASIS, 11a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com// See the License for the specific language governing permissions and 13a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com// limitations under the License. 14a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com 15a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com#include <libaddressinput/null_storage.h> 16a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com 17128ae075bbf50996c1068740746f27430f89136droubert@google.com#include <cassert> 18128ae075bbf50996c1068740746f27430f89136droubert@google.com#include <cstddef> 19a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com#include <string> 20a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com 21a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.comnamespace i18n { 22a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.comnamespace addressinput { 23a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com 24a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.comNullStorage::NullStorage() { 25a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com} 26a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com 27a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.comNullStorage::~NullStorage() { 28a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com} 29a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com 30128ae075bbf50996c1068740746f27430f89136droubert@google.comvoid NullStorage::Put(const std::string& key, std::string* data) { 31128ae075bbf50996c1068740746f27430f89136droubert@google.com assert(data != NULL); // Sanity check. 32128ae075bbf50996c1068740746f27430f89136droubert@google.com delete data; 33a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com} 34a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com 35a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.comvoid NullStorage::Get(const std::string& key, 36a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com const Callback& data_ready) const { 37128ae075bbf50996c1068740746f27430f89136droubert@google.com data_ready(false, key, NULL); 38a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com} 39a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com 40a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com} // namespace addressinput 41a87723fb1e673a04a9c06a49801e96497c635a35roubert@google.com} // namespace i18n 42