1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 #ifndef ZEROCONF_SERVICE
10 #define ZEROCONF_SERVICE
17 * The port used by LO's custom remote server discovery protocol.
19 #define PORT_DISCOVERY 1598
20 #define BUFFER_SIZE 200
22 #define kREG_TYPE "_impressremote._tcp"
24 #define CHARSET RTL_TEXTENCODING_UTF8
28 typedef unsigned int uint
;
39 explicit ZeroconfService(const std::string
& aname
, uint aport
)
40 :name(aname
), port(aport
){}
41 virtual ~ZeroconfService(){}
43 std::string
getName() const {return name
;}
44 void setName(const char * n
) {name
= n
;}
45 uint
getPort() const {return port
;}
47 // Clean up the service when closing
48 virtual void clear() = 0;
49 // Bonjour for OSX, Avahi for Linux
50 virtual void setup() = 0;