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/.
|
|
|
|
*/
|
|
|
|
|
2015-03-09 03:01:30 -05:00
|
|
|
#ifndef INCLUDED_LOOLSESSION_HPP
|
|
|
|
#define INCLUDED_LOOLSESSION_HPP
|
|
|
|
|
2015-03-04 17:14:04 -06:00
|
|
|
#define LOK_USE_UNSTABLE_API
|
|
|
|
#include <LibreOfficeKit/LibreOfficeKit.h>
|
|
|
|
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
|
|
|
|
|
|
|
|
#include <Poco/Net/WebSocket.h>
|
|
|
|
#include <Poco/StringTokenizer.h>
|
|
|
|
|
2015-03-09 03:01:30 -05:00
|
|
|
struct LOOLSession
|
2015-03-04 17:14:04 -06:00
|
|
|
{
|
|
|
|
public:
|
2015-03-09 03:01:30 -05:00
|
|
|
LOOLSession(Poco::Net::WebSocket& ws, LibreOfficeKit *loKit);
|
|
|
|
~LOOLSession();
|
2015-03-07 05:23:46 -06:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2015-03-09 03:01:30 -05:00
|
|
|
#endif
|
|
|
|
|
2015-03-04 17:14:04 -06:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|