author Michael Froman <>
Tue, 21 Mar 2017 19:59:05 -0500
changeset 397137 af9901df3d48f0c683551331507c3c0810e9fc8f
parent 289857 92d2843b5938ad6c2f29212780382f13edabc241
child 289888 019492cdccf98e6edea0dc23ac41817b07c562a8
child 505383 6f3709b3878117466168c40affa7bca0b60cf75b
permissions -rw-r--r--
Bug 1345511 - pt 2 - add IPC mechanism for getting stun addrs on main process. r=bwc PStunAddrsRequest.ipdl defines the new IPC protocol to get stun addrs on the main process. StunAddrsRequestChild requests the stun addrs from the parent. StunAddrsRequestParent uses a static method on NrIceCtx to get the stun addrs from the STS thead and sends the addrs back to the child process. NrIceStunAddr (nricestunaddr.{cpp|h}) wraps nr_local_addr and makes it easier to serialize/deserialize over IPC. NrIceStunAddrMessageUtils follows the pattern used by other Necko IPC classes to define top-level serialization/deserialization calls used by the IPC framework. Modifications under netwerk/ipc are to connect the new IPC protocol to get stun addrs to PNecko since it is a network related IPC protocol. MozReview-Commit-ID: GyEapBe5krl

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at */

#ifndef mozilla_dom_PermissionUtils_h_
#define mozilla_dom_PermissionUtils_h_

#include "mozilla/dom/PermissionsBinding.h"
#include "mozilla/dom/PermissionStatusBinding.h"
#include "mozilla/Maybe.h"

namespace mozilla {
namespace dom {

const char* PermissionNameToType(PermissionName aName);
Maybe<PermissionName> TypeToPermissionName(const char* aType);

PermissionState ActionToPermissionState(uint32_t aAction);

} // namespace dom
} // namespace mozilla