~ubuntu-branches/ubuntu/vivid/mediatomb/vivid

« back to all changes in this revision

Viewing changes to src/autoscan.cc

  • Committer: Bazaar Package Importer
  • Author(s): Andres Mejia
  • Date: 2008-03-02 13:09:16 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080302130916-zlljdze3kt7vuq4b
Tags: 0.11.0-1
* New upstream release.
* Include message about which inotify headers will be used when enabling
  inotify runtime support.
* Fixed error with use of INTERFACE in init script. Also removed use of -m
  option.
* Including new config.xml options.
* Added more build dependencies for new upstream release.
* Removed build dependency of libid3-dev, taglib is now preferred.
* mediatomb.xpm and manpage.xml is now included in orig tarball.
* inotify patch is not needed anymore.
* md5 patch has been committed upstream and is no longer needed. Also removed
  README.Debian.
* TwinHelix PNG fix is now used. Removed from TODO.
* Adding dependency of iceweasel for mediatomb package.
* Updated copyright file.
* Updated watch file.
* Updated rules file for proper configure options.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
    Copyright (C) 2005 Gena Batyan <bgeradz@mediatomb.cc>,
8
8
                       Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
9
9
    
10
 
    Copyright (C) 2006-2007 Gena Batyan <bgeradz@mediatomb.cc>,
 
10
    Copyright (C) 2006-2008 Gena Batyan <bgeradz@mediatomb.cc>,
11
11
                            Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>,
12
12
                            Leonhard Wimmer <leo@mediatomb.cc>
13
13
    
24
24
    version 2 along with MediaTomb; if not, write to the Free Software
25
25
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
26
26
    
27
 
    $Id: autoscan.cc 1376 2007-07-08 12:06:17Z jin_eld $
 
27
    $Id: autoscan.cc 1698 2008-02-23 20:48:30Z lww $
28
28
*/
29
29
 
30
30
/// \file autoscan.cc
35
35
 
36
36
#include "autoscan.h"
37
37
#include "storage.h"
 
38
#include "content_manager.h"
38
39
 
39
40
using namespace zmm;
40
41
 
45
46
    storageID = INVALID_OBJECT_ID;
46
47
    last_mod_previous_scan = 0;
47
48
    last_mod_current_scan = 0;
 
49
    timer_parameter = Ref<Object> ((Object *)new ContentManager::TimerParameter(ContentManager::TimerParameter::IDAutoscan, INVALID_SCAN_ID));
48
50
}
49
51
 
50
52
AutoscanDirectory::AutoscanDirectory(String location, scan_mode_t mode,
64
66
    storageID = INVALID_OBJECT_ID;
65
67
    last_mod_previous_scan = 0;
66
68
    last_mod_current_scan = 0;
 
69
    timer_parameter = Ref<Object> ((Object *)new ContentManager::TimerParameter(ContentManager::TimerParameter::IDAutoscan, INVALID_SCAN_ID));
67
70
}
68
71
 
69
72
void AutoscanDirectory::setCurrentLMT(time_t lmt) 
322
325
    {
323
326
        if (list->get(i) == nil)
324
327
            continue;
325
 
        
326
 
       cm->timerNotify(i);
 
328
       cm->timerNotify(list->get(i)->getTimerParameter());
327
329
    }
328
330
}
329
331
 
368
370
 
369
371
}
370
372
 
 
373
void AutoscanDirectory::setScanID(int id) 
 
374
{
 
375
    scanID = id; 
 
376
    RefCast(timer_parameter, ContentManager::TimerParameter)->setID(id); 
 
377
 
378
 
 
379
 
371
380
String AutoscanDirectory::mapScanmode(scan_mode_t scanmode)
372
381
{
373
382
    String scanmode_str = nil;
429
438
    copy->storageID = storageID;
430
439
    copy->last_mod_previous_scan = last_mod_previous_scan;
431
440
    copy->last_mod_current_scan = last_mod_current_scan;
432
 
}
 
441
    copy->timer_parameter = timer_parameter;
 
442
}
 
443
 
 
444
/*
 
445
void AutoscanDirectory::setTimerParamter(Ref<Object> parameter)
 
446
{
 
447
    timer_parameter = parameter;
 
448
}
 
449
*/
 
450
 
 
451
Ref<Object> AutoscanDirectory::getTimerParameter()
 
452
{
 
453
    return timer_parameter; 
 
454
}
 
455
 
433
456
 
434
457
/*
435
458
bool AutoscanDirectory::equals(Ref<AutoscanDirectory> dir)