blob: 43aa32e5af72e7e973c70bcb0d2c02ac1e9c12a3 [file] [log] [blame]
Alexander Afanasyev5e9e46e2013-01-02 14:12:50 -08001/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
2/*
3 * Copyright (c) 2013 University of California, Los Angeles
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
19 * Zhenkai Zhu <zhenkai@cs.ucla.edu>
20 */
21
22#include "notify-i.h"
Alexander Afanasyeva199f972013-01-02 19:37:26 -080023#include <hash-helper.h>
Alexander Afanasyev5e9e46e2013-01-02 14:12:50 -080024
25using namespace std;
26
Alexander Afanasyeva199f972013-01-02 19:37:26 -080027// NotifyI::NotifyI (DbHelperPtr &db)
28// : m_db (db)
29// {
30// }
31
Alexander Afanasyev5e9e46e2013-01-02 14:12:50 -080032void
33NotifyI::updateFile (const ::std::string &filename,
Alexander Afanasyeva199f972013-01-02 19:37:26 -080034 const ::std::pair<const Ice::Byte*, const Ice::Byte*> &hashRaw,
Alexander Afanasyev433ecda2013-01-02 22:13:45 -080035 ::Ice::Long atime,
36 ::Ice::Long mtime,
37 ::Ice::Long ctime,
Alexander Afanasyev5e9e46e2013-01-02 14:12:50 -080038 ::Ice::Int mode,
39 const ::Ice::Current&)
40{
Alexander Afanasyeva199f972013-01-02 19:37:26 -080041 Hash hash (hashRaw.first, hashRaw.second-hashRaw.first);
42
43 // m_db->AddActionUpdate (filename, hash, atime, mtime, ctime, mode);
44
45 // cout << "updateFile " << filename << " with hash " << hash << endl;
Alexander Afanasyev5e9e46e2013-01-02 14:12:50 -080046}
47
Alexander Afanasyeva199f972013-01-02 19:37:26 -080048void
49NotifyI::moveFile (const ::std::string &oldFilename,
50 const ::std::string &newFilename,
51 const ::Ice::Current&)
52{
53 // cout << "moveFile from " << oldFilename << " to " << newFilename << endl;
54 // m_db->AddActionMove (filename, oldFilename);
55}
Alexander Afanasyev5e9e46e2013-01-02 14:12:50 -080056
57void
58NotifyI::deleteFile (const ::std::string &filename,
59 const ::Ice::Current&)
60{
Alexander Afanasyeva199f972013-01-02 19:37:26 -080061 // m_db->AddActionDelete (filename, oldFilename);
62
63 // cout << "deleteFile " << filename << endl;
Alexander Afanasyev5e9e46e2013-01-02 14:12:50 -080064}
65