Fawkes API
Fawkes Development Version
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
service_browse_handler.h
1
2
/***************************************************************************
3
* service_browser.h - Webview service browser
4
*
5
* Created: Thu Jul 02 17:54:57 2009 (RoboCup 2009, Graz)
6
* Copyright 2006-2009 Tim Niemueller [www.niemueller.de]
7
*
8
****************************************************************************/
9
10
/* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
14
*
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU Library General Public License for more details.
19
*
20
* Read the full text in the LICENSE.GPL file in the doc directory.
21
*/
22
23
#ifndef __PLUGINS_WEBVIEW_SERVICE_BROWSER_H_
24
#define __PLUGINS_WEBVIEW_SERVICE_BROWSER_H_
25
26
#include <netcomm/service_discovery/service.h>
27
#include <netcomm/service_discovery/browse_handler.h>
28
29
#include <map>
30
#include <string>
31
32
namespace
fawkes {
33
class
Logger;
34
}
35
36
class
WebviewServiceBrowseHandler
:
public
fawkes::ServiceBrowseHandler
37
{
38
public
:
39
WebviewServiceBrowseHandler
(
fawkes::Logger
*logger,
fawkes::NetworkService
*webview_service);
40
41
virtual
void
all_for_now
();
42
virtual
void
cache_exhausted
();
43
virtual
void
browse_failed
(
const
char
*name,
44
const
char
*type,
45
const
char
*domain);
46
virtual
void
service_added
(
const
char
*name,
47
const
char
*type,
48
const
char
*domain,
49
const
char
*host_name,
50
const
struct
sockaddr *addr,
51
const
socklen_t addr_size,
52
uint16_t port,
53
std::list<std::string> &txt,
54
int
flags);
55
virtual
void
service_removed
(
const
char
*name,
56
const
char
*type,
57
const
char
*domain);
58
59
/** A map of services.
60
* Maps service names to NetworkService instances describing the service
61
* in more detail. */
62
typedef
std::map<std::string, fawkes::NetworkService *>
ServiceList
;
63
64
ServiceList
&
service_list
();
65
66
private
:
67
fawkes::Logger
*__logger;
68
fawkes::NetworkService
*__webview_service;
69
ServiceList
__service_list;
70
};
71
72
#endif
src
plugins
webview
service_browse_handler.h
Generated by
1.8.3.1