773c15f710
With the help of clang-format. For reference, the following command was used, but not all changes were commited: clang-format-3.9 -style='{BasedOnStyle: WebKit, AlignAfterOpenBracket: Align, AlwaysBreakAfterReturnType: None, BreakBeforeBraces: Allman, DerivePointerAlignment: 'true', ExperimentalAutoDetectBinPacking: 'true', IndentWrappedFunctionNames: 'true', UseTab: Never}' Change-Id: I0f7490c7ee38aeefeefcf9d5d4c3dab380cd63b8 Reviewed-on: https://gerrit.libreoffice.org/30416 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
41 lines
1.2 KiB
C++
41 lines
1.2 KiB
C++
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
|
|
/*
|
|
* This file is part of the LibreOffice project.
|
|
*
|
|
* 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 INCLUDED_PRISONERSESSION_HPP
|
|
#define INCLUDED_PRISONERSESSION_HPP
|
|
|
|
#include "LOOLSession.hpp"
|
|
|
|
class DocumentBroker;
|
|
class ClientSession;
|
|
|
|
/// Represents a session to a Kit process, in the WSD process.
|
|
class PrisonerSession final : public LOOLSession, public std::enable_shared_from_this<PrisonerSession>
|
|
{
|
|
public:
|
|
PrisonerSession(const std::string& id,
|
|
std::shared_ptr<DocumentBroker> docBroker);
|
|
|
|
virtual ~PrisonerSession();
|
|
|
|
void setPeer(const std::shared_ptr<ClientSession>& peer) { _peer = peer; }
|
|
bool shutdownPeer(Poco::UInt16 statusCode);
|
|
|
|
private:
|
|
virtual bool _handleInput(const char* buffer, int length) override;
|
|
|
|
private:
|
|
std::shared_ptr<DocumentBroker> _docBroker;
|
|
std::weak_ptr<ClientSession> _peer;
|
|
int _curPart;
|
|
};
|
|
|
|
#endif
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|