Files
palemoon27/ipc/keystore/KeyStoreConnector.h
T
roytam1 04e8424ea3 import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1109592 - Cleanup unused variables and fields from NFC's IPC code. r=allstars.chh (4772c44e7)
- Bug 1109592 - Move |NfcConnector| to a more public place. r=allstars.chh (da26d99ba)
- Bug 1109592 - Add |NfcListenSocket|. r=allstars.chh (721edbb6f)
- Bug 1161020: Implement new socket-connector interface for NFC, r=allstars.chh (848533b8c)
- Bug 1161020: Remove old interface and implementation from socket-connector classes, r=kmachulis (722d7082c)
- Bug 1164417: Add |UnixSocketConnector::Duplicate|, r=kmachulis (43ccdc20b)
- Bug 1137330 - Set opcode as 'PutFinal' instead of 'Put' for file header packet if file size is 0, r=shuang (4448f4d2f)
- Bug 1159179 - Patch 1/3: [PBAP] Add OBEX related functions, r=shuang (7c297c5e2)
- Bug 1159179 - Patch 2/3: [PBAP] Revise profile disconnection when BT stops, r=shuang (f67fefe7d)
- Bug 1159179 - Patch 3/3: [PBAP] Implement PBAP manger, r=shuang (1b8d75174)
- Bug 1162902 - Implement PBAP SetPhoneBook function, r=shuang (a1bd282e4)
- Bug 1158876: Rename |SocketConsumerBase| to |DataSocket|, r=kmachulis (3df8eb5bf)
- Bug 1158876: Move management of socket I/O buffers into socket I/O classes, r=kmachulis (f834e3803)
- Bug 1158876: Move |DataSocket::ReceiveSocketData| into sub classes, r=kmachulis (0d4ea7708)
- Bug 1159209: Remove template parameters from |SocketIOEventRunnable|, r=kmachulis (15644b5c2)
- Bug 1159209: Remove template parameters from |SocketIORequestClosingRunnable|, r=kmachulis (5dc4851d3)
- Bug 1136729: Make destructor of |SocketBase| protected, r=qdot (3df9d9088)
- Bug 1159209: Remove template parameters from |SocketIODeleteInstanceRunnable|, r=kmachulis (b203f4ac2)
- Bug 1159209: Remove template parameters from |SocketIOShutdownTask|, r=kmachulis (25e340c57)
- Bug 1156352: Refactor |UnixSocketIOBuffer|, r=kmachulis (d361f8a5a)
- Bug 1158818: Only store Bluetooth result runnable after command has been sent successfully, r=shuang (a81e4ed81)
- Bug 1159709: Inherit |BluetoothDaemonConnection| from |DataSocket|, r=kmachulis (3f6de0126)
- Bug 1159709: Integrate |ConnectionOrientedSocket| into socket I/O class hierarchy, r=kmachulis (4de49e482)
- Bug 1159709: Cleanup inherited methods of |StreamSocket|, r=kmachulis (15d587cc0)
- Bug 1159709: Cleanup inherited methods of |ListenSocket|, r=kmachulis (443baf020)
- Bug 1159709: Cleanup inherited methods of BlueZ's |BluetoothSocket|, r=kmachulis (1b683a700)
- Bug 1164425: Rename |SocketBase::CloseSocket| to |SocketBase::Close|, r=kmachulis (b0e1fece4)
- Bug 1164425: Cleanup interfaces of |BluetoothDaemonConnection|, r=shuang (1a9d0339f)
- Bug 1164417: Store PDU consumer in |BluetoothDaemonConnection|, r=kmachulis (18f34692f)
- Bug 1162524: Move |accept| out of |UnixSocketWatcher|, r=kmachulis (4ced7ee1d)
- Bug 1162585: Set socket flags after socket has been created, r=kmachulis (1131301f4)
- Bug 1161020: Use new socket-connector interface in socket classes, r=kmachulis (0aae9f6e7)
- Bug 1164425: Cleanup interfaces of |StreamSocket|, r=kmachulis (9f8c20fd9)
2021-02-10 10:13:21 +08:00

58 lines
1.8 KiB
C++

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set sw=2 ts=2 et ft=cpp: 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 http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_ipc_KeyStoreConnector_h
#define mozilla_ipc_KeyStoreConnector_h
#include "mozilla/ipc/UnixSocketConnector.h"
namespace mozilla {
namespace ipc {
class KeyStoreConnector final : public UnixSocketConnector
{
public:
KeyStoreConnector(const char** const aAllowedUsers);
~KeyStoreConnector();
// Methods for |UnixSocketConnector|
//
nsresult ConvertAddressToString(const struct sockaddr& aAddress,
socklen_t aAddressLength,
nsACString& aAddressString) override;
nsresult CreateListenSocket(struct sockaddr* aAddress,
socklen_t* aAddressLength,
int& aListenFd) override;
nsresult AcceptStreamSocket(int aListenFd,
struct sockaddr* aAddress,
socklen_t* aAddressLength,
int& aStreamFd) override;
nsresult CreateStreamSocket(struct sockaddr* aAddress,
socklen_t* aAddressLength,
int& aStreamFd) override;
nsresult Duplicate(UnixSocketConnector*& aConnector) override;
private:
nsresult CreateSocket(int& aFd) const;
nsresult SetSocketFlags(int aFd) const;
nsresult CheckPermission(int aFd) const;
nsresult CreateAddress(struct sockaddr& aAddress,
socklen_t& aAddressLength) const;
const char** const mAllowedUsers;
};
}
}
#endif