1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#ifndef _OSL_SOCKETIMPL_H_
21#define _OSL_SOCKETIMPL_H_
22
23#include <osl/pipe.h>
24#include <osl/socket.h>
25#include <osl/interlck.h>
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31struct oslSocketImpl {
32 int m_Socket;
33 int m_nLastError;
34 oslInterlockedCount m_nRefCount;
35#if defined(LINUX)
36 sal_Bool m_bIsAccepting;
37 sal_Bool m_bIsInShutdown;
38#endif
39};
40
41struct oslSocketAddrImpl
42{
43 sal_Int32 m_nRefCount;
44 struct sockaddr m_sockaddr;
45};
46
47struct oslPipeImpl {
48 int m_Socket;
49 sal_Char m_Name[PATH_MAX + 1];
50 oslInterlockedCount m_nRefCount;
51 sal_Bool m_bClosed;
52#if defined(LINUX)
53 sal_Bool m_bIsAccepting;
54 sal_Bool m_bIsInShutdown;
55#endif
56};
57
58oslSocket __osl_createSocketImpl(int Socket);
59void __osl_destroySocketImpl(oslSocket pImpl);
60
61#ifdef __cplusplus
62}
63#endif
64
65#endif
66
67/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
68