Fawkes API
Fawkes Development Version
bb_cleanup.cpp
1
2
/***************************************************************************
3
* bb_cleanup.cpp - cleanup unused Fawkes BlackBoard shared memory segments
4
*
5
* Generated: Thu Oct 19 14:56:13 2006 (Anne's 25th Birthday)
6
* Copyright 2005-2006 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
#include <blackboard/local.h>
24
#include <config/sqlite.h>
25
26
#include <iostream>
27
28
using namespace
std;
29
using namespace
fawkes
;
30
31
int
32
main(
int
argc,
char
**argv)
33
{
34
SQLiteConfiguration
config(CONFDIR);
35
config.
load
();
36
37
std::string token =
""
;
38
try
{
39
token = config.
get_string
(
"/fawkes/mainapp/blackboard_magic_token"
);
40
}
catch
(
Exception
&e) {
41
cout <<
"Could not read shared memory token for blackboard."
<< endl;
42
cout <<
"BlackBoard is probably running without shared memory."
<< endl;
43
return
-1;
44
}
45
46
LocalBlackBoard::cleanup(token.c_str());
47
return
0;
48
}
fawkes::Configuration::load
virtual void load(const char *file_path)=0
fawkes
fawkes::Configuration::get_string
virtual std::string get_string(const char *path)=0
fawkes::SQLiteConfiguration
Definition:
sqlite.h:40
fawkes::Exception
Definition:
exception.h:41
src
tools
blackboard
bb_cleanup.cpp
Generated by
1.8.17