flutter_flutter/shell/platform/darwin/common/buffer_conversions.h
Mikkel Nygaard Ravn b97103b441 Flutter channels for iOS (#3470)
Flutter channels now also supported on iOS. Use FlutterMessageChannel or FlutterMethodChannel with binary/string/json/standard codecs.
2017-03-13 23:57:46 +01:00

21 lines
591 B
C++

// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_BUFFER_CONVERSIONS_H_
#define FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_BUFFER_CONVERSIONS_H_
#include <Foundation/Foundation.h>
#include <vector>
namespace shell {
std::vector<uint8_t> GetVectorFromNSData(NSData* data);
NSData* GetNSDataFromVector(const std::vector<uint8_t>& buffer);
} // namespace shell
#endif // FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_BUFFER_CONVERSIONS_H_