RsdparsaSdpGlue.h (1202B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=2 et sw=2 tw=80: */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 5 * You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 #ifndef _RUSTSDPGLUE_H_ 7 #define _RUSTSDPGLUE_H_ 8 9 #include <string> 10 #include <utility> 11 #include <vector> 12 13 #include "SdpEnum.h" 14 #include "mozilla/UniquePtr.h" 15 #include "sdp/RsdparsaSdpInc.h" 16 17 namespace mozilla { 18 19 struct FreeRustSdpSession { 20 void operator()(RustSdpSession* aSess) { sdp_free_session(aSess); } 21 }; 22 23 typedef UniquePtr<RustSdpSession, FreeRustSdpSession> RsdparsaSessionHandle; 24 25 std::string convertStringView(StringView str); 26 std::vector<std::string> convertStringVec(StringVec* vec); 27 std::string convertAddress(RustAddress* address); 28 std::pair<sdp::AddrType, std::string> convertExplicitlyTypedAddress( 29 RustExplicitlyTypedAddress* addr); 30 std::vector<uint8_t> convertU8Vec(U8Vec* vec); 31 std::vector<uint16_t> convertU16Vec(U16Vec* vec); 32 std::vector<uint32_t> convertU32Vec(U32Vec* vec); 33 std::vector<float> convertF32Vec(F32Vec* vec); 34 35 } // namespace mozilla 36 37 #endif