ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/DecentralizedMedia/Share.cpp
(Generate patch)

Comparing DecentralizedMedia/Share.cpp (file contents):
Revision 529 by douglas, 2005-06-27T18:01:23-07:00 vs.
Revision 534 by douglas, 2005-06-29T23:01:02-07:00

# Line 8 | Line 8
8  
9   #include "Share.hpp"
10  
11 < Share::Share(const _H<dbi::Connection>& connection, const ext::String& host, const ext::String& share) : connection(connection), host(host), share(share)
11 > Share::Share(const _H<dbi::Connection>& connection, const api::Address& host, const cse::String& share) : connection(connection), host(host), share(share)
12   {
13          api::Path shares(_B("Shares"));
14  
15          if (!shares.Exists())
16                  shares.CreateDirectory();
17  
18 <        api::Path host_(shares.GetRealPath().GetChild(host));
18 >        api::Path host_(shares.GetRealPath().GetChild(/*lexical_cast<cse::String>(host)*/_B("192.168.1.8")));
19  
20          if (!host_.Exists())
21                  host_.CreateDirectory();
# Line 26 | Line 26 | Share::Share(const _H<dbi::Connection>&
26                  path.CreateDirectory();
27   }
28  
29 < void Share::Mount() const
30 < {
31 <        api::Cout << "MOUNT: //" << host << "/" << share << " TO " << path.GetPath() << ios::NewLine;
32 <
33 <        // XXX: implement
34 < }
35 <
36 < void Share::Unmount() const
29 > Share::~Share()
30   {
31          connection->Parse(_B("UPDATE files SET live = FALSE WHERE root = ?"))->Execute(path.GetPath());
39
40        api::Cout << "UNMOUNT: //" << path.GetPath() << ios::NewLine;
41
42        // XXX: implement
32   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines