2015-03-04 17:14:04 -06:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/*
|
|
|
|
* 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/.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define LOK_USE_UNSTABLE_API
|
|
|
|
#include <LibreOfficeKit/LibreOfficeKit.h>
|
|
|
|
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
|
|
|
|
|
|
|
|
#include <Poco/Net/WebSocket.h>
|
|
|
|
#include <Poco/StringTokenizer.h>
|
|
|
|
|
2015-03-07 05:23:46 -06:00
|
|
|
struct LOOLConnectionServer
|
2015-03-04 17:14:04 -06:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
LOOLConnectionServer(Poco::Net::WebSocket& ws, LibreOfficeKit *loKit);
|
2015-03-07 05:23:46 -06:00
|
|
|
~LOOLConnectionServer();
|
|
|
|
bool handleInput(char *buffer, int length);
|
2015-03-04 17:14:04 -06:00
|
|
|
void sendTextFrame(std::string text);
|
|
|
|
void sendBinaryFrame(const char *buffer, int length);
|
|
|
|
void loadDocument(Poco::StringTokenizer& tokens);
|
|
|
|
std::string getStatus();
|
|
|
|
void sendTile(Poco::StringTokenizer& tokens);
|
|
|
|
|
|
|
|
Poco::Net::WebSocket& _ws;
|
|
|
|
LibreOfficeKit *_loKit;
|
|
|
|
LibreOfficeKitDocument *_loKitDocument;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|