tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / sd / source / ui / remotecontrol / ZeroconfService.hxx
blob98abe410853eddd81d49ed09c2eeb91ae801bd59
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
9 #ifndef ZEROCONF_SERVICE
10 #define ZEROCONF_SERVICE
12 #include <string>
13 #include <utility>
15 /**
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"
23 struct sockaddr_in;
25 typedef unsigned int uint;
27 namespace sd{
29 class ZeroconfService
31 protected:
32 std::string name;
33 uint port;
35 public:
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;
50 #endif