bump product version to 6.3.0.0.beta1
[LibreOffice.git] / sd / source / ui / remotecontrol / ZeroconfService.hxx
blob8516cf7404fea83a80932a4384da83c7aee4df44
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 <stdio.h>
14 #include <stdlib.h>
16 /**
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
26 struct sockaddr_in;
28 typedef unsigned int uint;
30 namespace sd{
32 class ZeroconfService
34 protected:
35 std::string name;
36 uint const port;
38 public:
39 explicit ZeroconfService(const std::string& aname, uint aport)
40 :name(aname), port(aport){}
41 virtual ~ZeroconfService(){}
43 const std::string& getName() const {return name;}
44 void setName(const char * n) {name = n;}
46 // Clean up the service when closing
47 virtual void clear() = 0;
48 // Bonjour for OSX, Avahi for Linux
49 virtual void setup() = 0;
53 #endif