2015-04-13 04:09:02 -05:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
|
2015-03-17 18:56:15 -05:00
|
|
|
/*
|
|
|
|
* 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_UTIL_HPP
|
|
|
|
#define INCLUDED_UTIL_HPP
|
|
|
|
|
2015-04-24 04:49:19 -05:00
|
|
|
#include <string>
|
|
|
|
|
2015-04-22 03:14:11 -05:00
|
|
|
#include <Poco/Net/WebSocket.h>
|
|
|
|
|
2015-03-26 10:07:52 -05:00
|
|
|
namespace Util
|
2015-03-17 18:56:15 -05:00
|
|
|
{
|
2015-03-26 10:07:52 -05:00
|
|
|
std::string logPrefix();
|
2015-04-24 04:49:47 -05:00
|
|
|
|
2015-03-28 06:53:44 -05:00
|
|
|
bool windowingAvailable();
|
2015-04-24 04:49:47 -05:00
|
|
|
|
2015-04-10 04:39:12 -05:00
|
|
|
// Sadly, older libpng headers don't use const for the pixmap pointer parameter to
|
|
|
|
// png_write_row(), so can't use const here for pixmap.
|
|
|
|
bool encodePNGAndAppendToBuffer(unsigned char *pixmap, int width, int height, std::vector<char>& output);
|
2015-04-22 03:14:11 -05:00
|
|
|
|
|
|
|
// Call WebSocket::shutdown() ignoring Poco::IOException
|
|
|
|
void shutdownWebSocket(Poco::Net::WebSocket& ws);
|
2015-04-24 04:49:19 -05:00
|
|
|
|
|
|
|
std::string signalName(int signo);
|
2015-03-17 18:56:15 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|