Switch to unified view

a/src/common/beaglequeuecache.cpp b/src/common/beaglequeuecache.cpp
1
/* Copyright (C) 2011 J.F.Dockes
2
 *   This program is free software; you can redistribute it and/or modify
3
 *   it under the terms of the GNU General Public License as published by
4
 *   the Free Software Foundation; either version 2 of the License, or
5
 *   (at your option) any later version.
6
 *
7
 *   This program is distributed in the hope that it will be useful,
8
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
 *   GNU General Public License for more details.
11
 *
12
 *   You should have received a copy of the GNU General Public License
13
 *   along with this program; if not, write to the
14
 *   Free Software Foundation, Inc.,
15
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
16
 */
17
1
#include "autoconfig.h"
18
#include "autoconfig.h"
2
19
20
#include "cstr.h"
3
#include "beaglequeuecache.h"
21
#include "beaglequeuecache.h"
4
#include "circache.h"
22
#include "circache.h"
5
#include "debuglog.h"
23
#include "debuglog.h"
6
#include "rclconfig.h"
24
#include "rclconfig.h"
7
#include "pathut.h"
25
#include "pathut.h"
...
...
40
        return false;
58
        return false;
41
59
42
    ConfSimple cf(dict, 1);
60
    ConfSimple cf(dict, 1);
43
    
61
    
44
    if (htt)
62
    if (htt)
45
        cf.get(Rcl::Doc::keybght, *htt, "");
63
        cf.get(Rcl::Doc::keybght, *htt, cstr_null);
46
64
47
    // Build a doc from saved metadata 
65
    // Build a doc from saved metadata 
48
    cf.get("url", dotdoc.url, "");
66
    cf.get(cstr_url, dotdoc.url, cstr_null);
49
    cf.get("mimetype", dotdoc.mimetype, "");
67
    cf.get(cstr_mimetype, dotdoc.mimetype, cstr_null);
50
    cf.get("fmtime", dotdoc.fmtime, "");
68
    cf.get(cstr_fmtime, dotdoc.fmtime, cstr_null);
51
    cf.get("fbytes", dotdoc.fbytes, "");
69
    cf.get(cstr_fbytes, dotdoc.fbytes, cstr_null);
52
    dotdoc.sig = "";
70
    dotdoc.sig.clear();
53
    list<string> names = cf.getNames("");
71
    list<string> names = cf.getNames(cstr_null);
54
    for (list<string>::const_iterator it = names.begin();
72
    for (list<string>::const_iterator it = names.begin();
55
         it != names.end(); it++) {
73
         it != names.end(); it++) {
56
        cf.get(*it, dotdoc.meta[*it], "");
74
        cf.get(*it, dotdoc.meta[*it], cstr_null);
57
    }
75
    }
58
    dotdoc.meta[Rcl::Doc::keyudi] = udi;
76
    dotdoc.meta[Rcl::Doc::keyudi] = udi;
59
    return true;
77
    return true;
60
}
78
}