mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 07:19:45 +03:00
Remove the verbose #ifndef/#define/#endif pattern for maintaining header idempotency, and replace it with a simple #pragma once. This simplifies the headers, and prevents redundant changes when header files get moved. Tracepoints.h.in is not modified to use the pragma as it requires self-inclusion. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
47 lines
1,007 B
C++
47 lines
1,007 B
C++
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
/*
|
|
* Copyright (C) 2020, Google Inc.
|
|
*
|
|
* ipc_pipe_unixsocket.h - Image Processing Algorithm IPC module using unix socket
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <map>
|
|
#include <memory>
|
|
#include <vector>
|
|
|
|
#include "libcamera/internal/ipc_pipe.h"
|
|
#include "libcamera/internal/ipc_unixsocket.h"
|
|
|
|
namespace libcamera {
|
|
|
|
class Process;
|
|
|
|
class IPCPipeUnixSocket : public IPCPipe
|
|
{
|
|
public:
|
|
IPCPipeUnixSocket(const char *ipaModulePath, const char *ipaProxyWorkerPath);
|
|
~IPCPipeUnixSocket();
|
|
|
|
int sendSync(const IPCMessage &in,
|
|
IPCMessage *out = nullptr) override;
|
|
|
|
int sendAsync(const IPCMessage &data) override;
|
|
|
|
private:
|
|
struct CallData {
|
|
IPCUnixSocket::Payload *response;
|
|
bool done;
|
|
};
|
|
|
|
void readyRead();
|
|
int call(const IPCUnixSocket::Payload &message,
|
|
IPCUnixSocket::Payload *response, uint32_t seq);
|
|
|
|
std::unique_ptr<Process> proc_;
|
|
std::unique_ptr<IPCUnixSocket> socket_;
|
|
std::map<uint32_t, CallData> callData_;
|
|
};
|
|
|
|
} /* namespace libcamera */
|