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

Comparing Spectre2/Share.hpp (file contents):
Revision 415 by douglas, 2005-01-15T18:26:13-08:00 vs.
Revision 428 by douglas, 2005-03-24T17:38:00-08:00

# Line 7 | Line 7
7   #ifndef _Share_hpp_
8   #define _Share_hpp_
9  
10 + #include "Error.hpp"
11   #include "Spectre2.hpp"
12  
13   #ifdef MENES_PRAGMA_ONCE
# Line 15 | Line 16
16  
17   class Share
18   {
19 + private:
20 +        static bool initialized;
21 +        ext::String host, name, owner, user, group;
22 + public:
23 +        Share::Share(const ext::String& host, const ext::String& name, const ext::String& owner = ext::String(), const ext::String& user = ext::String(), const ext::String& group = ext::String());
24 +        static ext::RedBlackMap<ext::String, ext::String> passwords;
25 +        static api::ThreadMutex passwordsLock;
26 +        const ext::String& getHost() const { return host; }
27 +        const ext::String& getName() const { return name; }
28 +        const ext::String& getOwner() const { return owner; }
29 +        const ext::String& getUser() const { return user; }
30 +        const ext::String& getGroup() const { return group; }
31 +        ext::String getPassword() const;
32 +        ext::String getUri() const { return "smb://" + operator ext::String(); }
33 +        ext::String getService() const;
34 +        ext::String getMount() const { return Spectre2::root + "/" + operator ext::String(); }
35 +        bool mounted() const;
36 +        bool mountable() const;
37 +        operator ext::String() const { return host + "/" + name; }
38 +        bool operator<(const Share& share) const { return operator ext::String() < share.operator ext::String(); }
39   };
40  
41 < #endif // _Share_hpp_
41 > inline ios::PrintWriter& operator<<(ios::PrintWriter& out, const Share& share)
42 > {
43 >        return out << share.operator ext::String();
44 > }
45 >
46 > #endif//_Share_hpp_

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines