dom/bluetooth/bluez/BluetoothUtils.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
     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/. */
     7 #ifndef mozilla_dom_bluetooth_bluetoothutils_h__
     8 #define mozilla_dom_bluetooth_bluetoothutils_h__
    10 #include "BluetoothCommon.h"
    11 #include "js/TypeDecls.h"
    13 BEGIN_BLUETOOTH_NAMESPACE
    15 class BluetoothNamedValue;
    16 class BluetoothValue;
    17 class BluetoothReplyRunnable;
    19 bool
    20 SetJsObject(JSContext* aContext,
    21             const BluetoothValue& aValue,
    22             JS::Handle<JSObject*> aObj);
    24 nsString
    25 GetObjectPathFromAddress(const nsAString& aAdapterPath,
    26                          const nsAString& aDeviceAddress);
    28 nsString
    29 GetAddressFromObjectPath(const nsAString& aObjectPath);
    31 bool
    32 BroadcastSystemMessage(const nsAString& aType,
    33                        const InfallibleTArray<BluetoothNamedValue>& aData);
    35 void
    36 DispatchBluetoothReply(BluetoothReplyRunnable* aRunnable,
    37                        const BluetoothValue& aValue,
    38                        const nsAString& aErrorStr);
    40 void
    41 ParseAtCommand(const nsACString& aAtCommand, const int aStart,
    42                nsTArray<nsCString>& aRetValues);
    44 void
    45 DispatchStatusChangedEvent(const nsAString& aType,
    46                            const nsAString& aDeviceAddress,
    47                            bool aStatus);
    49 END_BLUETOOTH_NAMESPACE
    51 #endif

mercurial