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
16 * The port used by LO's custom remote server discovery protocol.
18 #define PORT_DISCOVERY 1598
19 #define BUFFER_SIZE 200
21 #define kREG_TYPE "_impressremote._tcp"
25 typedef unsigned int uint
;
36 explicit ZeroconfService(std::string aname
, uint aport
)
37 :name(std::move(aname
)), port(aport
){}
38 virtual ~ZeroconfService(){}
40 const std::string
& getName() const {return name
;}
41 void setName(const char * n
) {name
= n
;}
43 // Clean up the service when closing
44 virtual void clear() = 0;
45 // Bonjour for OSX, Avahi for Linux
46 virtual void setup() = 0;