source: gsdl/trunk/src/recpt/dynamicclassifieraction.cpp@ 15744

Last change on this file since 15744 was 15744, checked in by mdewsnip, 16 years ago

(Adding dynamic classifiers) Added a stub dynamic classifier action.

  • Property svn:executable set to *
File size: 2.8 KB
Line 
1/**********************************************************************
2 *
3 * dynamicclassifieraction.cpp --
4 * Copyright (C) 2008 DL Consulting Ltd
5 *
6 * A component of the Greenstone digital library software
7 * from the New Zealand Digital Library Project at the
8 * University of Waikato, New Zealand.
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 General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 *
24 *********************************************************************/
25
26#include "dynamicclassifieraction.h"
27
28
29dynamicclassifieraction::dynamicclassifieraction ()
30{
31 recpt = NULL;
32}
33
34
35dynamicclassifieraction::~dynamicclassifieraction()
36{
37}
38
39
40bool dynamicclassifieraction::check_cgiargs (cgiargsinfoclass &argsinfo, cgiargsclass &args,
41 recptprotolistclass *protos, ostream &logout)
42{
43 return true;
44}
45
46
47void dynamicclassifieraction::get_cgihead_info (cgiargsclass &args, recptprotolistclass *protos,
48 response_t &response,text_t &response_data,
49 ostream &logout)
50{
51 response = content;
52 response_data = "text/html";
53}
54
55
56// define all the macros which might be used by other actions
57// to produce pages.
58void dynamicclassifieraction::define_external_macros (displayclass &disp, cgiargsclass &args,
59 recptprotolistclass *protos, ostream &logout)
60{
61 // define_external_macros sets the following macros:
62}
63
64
65// define all the macros which are related to pages generated
66// by this action. we also load up the formatinfo structure
67// here (it's used in do_action as well as here)
68void dynamicclassifieraction::define_internal_macros (displayclass &disp, cgiargsclass &args,
69 recptprotolistclass *protos, ostream &logout)
70{
71 // define_internal_macros sets the following macros:
72}
73
74
75bool dynamicclassifieraction::do_action(cgiargsclass &args, recptprotolistclass *protos,
76 browsermapclass *browsers, displayclass &disp,
77 outconvertclass &outconvert, ostream &textout,
78 ostream &logout)
79{
80 // must have a valid collection server
81 recptproto *collectproto = protos->getrecptproto (args["c"], logout);
82 if (collectproto == NULL)
83 {
84 logout << "dynamicclassifieraction::do_action called with NULL collectproto\n";
85 return false;
86 }
87
88 return true;
89}
Note: See TracBrowser for help on using the repository browser.