65 lines
2.6 KiB
C++
65 lines
2.6 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_CHILDPROCESSSESSION_HPP
|
||
|
#define INCLUDED_CHILDPROCESSSESSION_HPP
|
||
|
|
||
|
#include "LOOLSession.hpp"
|
||
|
|
||
|
class ChildProcessSession final : public LOOLSession
|
||
|
{
|
||
|
public:
|
||
|
ChildProcessSession(std::shared_ptr<Poco::Net::WebSocket> ws, LibreOfficeKit *loKit, std::string _childId);
|
||
|
virtual ~ChildProcessSession();
|
||
|
|
||
|
virtual bool handleInput(const char *buffer, int length) override;
|
||
|
|
||
|
virtual bool getStatus(const char *buffer, int length);
|
||
|
|
||
|
virtual bool getCommandValues(const char *buffer, int length, Poco::StringTokenizer& tokens);
|
||
|
|
||
|
virtual bool getPartPageRectangles(const char *buffer, int length) override;
|
||
|
|
||
|
LibreOfficeKitDocument *_loKitDocument;
|
||
|
std::string _docType;
|
||
|
|
||
|
protected:
|
||
|
virtual bool loadDocument(const char *buffer, int length, Poco::StringTokenizer& tokens) override;
|
||
|
|
||
|
virtual void sendTile(const char *buffer, int length, Poco::StringTokenizer& tokens);
|
||
|
|
||
|
virtual void sendFontRendering(const char *buffer, int length, Poco::StringTokenizer& tokens);
|
||
|
|
||
|
bool clientZoom(const char *buffer, int length, Poco::StringTokenizer& tokens);
|
||
|
bool downloadAs(const char *buffer, int length, Poco::StringTokenizer& tokens);
|
||
|
bool getChildId();
|
||
|
bool getTextSelection(const char *buffer, int length, Poco::StringTokenizer& tokens);
|
||
|
bool paste(const char *buffer, int length, Poco::StringTokenizer& tokens);
|
||
|
bool insertFile(const char *buffer, int length, Poco::StringTokenizer& tokens);
|
||
|
bool keyEvent(const char *buffer, int length, Poco::StringTokenizer& tokens);
|
||
|
bool mouseEvent(const char *buffer, int length, Poco::StringTokenizer& tokens);
|
||
|
bool unoCommand(const char *buffer, int length, Poco::StringTokenizer& tokens);
|
||
|
bool selectText(const char *buffer, int length, Poco::StringTokenizer& tokens);
|
||
|
bool selectGraphic(const char *buffer, int length, Poco::StringTokenizer& tokens);
|
||
|
bool resetSelection(const char *buffer, int length, Poco::StringTokenizer& tokens);
|
||
|
bool saveAs(const char *buffer, int length, Poco::StringTokenizer& tokens);
|
||
|
bool setClientPart(const char *buffer, int length, Poco::StringTokenizer& tokens);
|
||
|
bool setPage(const char *buffer, int length, Poco::StringTokenizer& tokens);
|
||
|
|
||
|
std::string _loSubPath;
|
||
|
LibreOfficeKit *_loKit;
|
||
|
std::string _childId;
|
||
|
|
||
|
private:
|
||
|
int _clientPart;
|
||
|
};
|
||
|
|
||
|
#endif
|
||
|
|