first check-in of feisty meow codebase. many things broken still due to recent
[feisty_meow.git] / octopi / library / synchronic / list_synchronizer.h
1 #ifndef LIST_SYNCHRONIZER_CLASS
2 #define LIST_SYNCHRONIZER_CLASS
3
4 /*****************************************************************************\
5 *                                                                             *
6 *  Name   : list_synchronizer                                                 *
7 *  Author : Chris Koeritz                                                     *
8 *                                                                             *
9 *  Purpose:                                                                   *
10 *                                                                             *
11 *    Manages a collection of lists of synchronizable state information.       *
12 *                                                                             *
13 *******************************************************************************
14 * Copyright (c) 2002-$now By Author.  This program is free software; you can  *
15 * redistribute it and/or modify it under the terms of the GNU General Public  *
16 * License as published by the Free Software Foundation; either version 2 of   *
17 * the License or (at your option) any later version.  This is online at:      *
18 *     http://www.fsf.org/copyleft/gpl.html                                    *
19 * Please send any updates to: fred@gruntose.com                               *
20 \*****************************************************************************/
21
22 #include <octopus/octopus.h>
23
24 namespace synchronic {
25
26 // forward.
27 class list_manager;
28
29 class list_synchronizer : public octopi::octopus
30 {
31 public:
32   list_synchronizer();
33   ~list_synchronizer();
34
35   basis::outcome add_list(list_manager *to_add);
36     // adds a new list synchronization manager "to_add" to the crew of lists.
37
38   basis::outcome zap_list(const structures::string_array &list_name);
39     // takes a list registered under "list_name" back out of the synchronizer.
40     // the list_manager for the "list_name" is destroyed on success.
41
42   void clean(int older_than);
43     // cleans out any items that are older than the "older_than" number of
44     // milliseconds.
45
46   bool update(const structures::string_array &object_id);
47     // marks the item specified by the "object_id" as updated.
48 };
49
50 }
51
52 #endif
53