summaryrefslogtreecommitdiff
path: root/lib/DeWeave/BO
diff options
context:
space:
mode:
Diffstat (limited to 'lib/DeWeave/BO')
-rw-r--r--lib/DeWeave/BO/Form.pm20
-rw-r--r--lib/DeWeave/BO/History.pm49
-rw-r--r--lib/DeWeave/BO/Password.pm50
-rw-r--r--lib/DeWeave/BO/Pref.pm14
-rw-r--r--lib/DeWeave/BO/Tab.pm26
5 files changed, 159 insertions, 0 deletions
diff --git a/lib/DeWeave/BO/Form.pm b/lib/DeWeave/BO/Form.pm
new file mode 100644
index 0000000..e1762fb
--- /dev/null
+++ b/lib/DeWeave/BO/Form.pm
@@ -0,0 +1,20 @@
+package DeWeave::BO::Form;
+use Moose;
+use namespace::autoclean;
+use MooseX::Types::Moose qw(Str);
+
+extends 'DeWeave::EDO';
+
+has name => (
+ isa => Str,
+ required => 1,
+ is => 'ro',
+);
+
+has value => (
+ isa => Str,
+ required => 1,
+ is => 'ro',
+);
+
+1;
diff --git a/lib/DeWeave/BO/History.pm b/lib/DeWeave/BO/History.pm
new file mode 100644
index 0000000..3e9040e
--- /dev/null
+++ b/lib/DeWeave/BO/History.pm
@@ -0,0 +1,49 @@
+package DeWeave::BO::History;
+use Moose;
+use namespace::autoclean;
+use MooseX::Types::Moose qw(Str ArrayRef Int);
+use MooseX::Types::Structured qw(Dict);
+
+extends 'DeWeave::EDO';
+
+has histUri => (
+ isa => Str,
+ required => 1,
+ is => 'ro',
+);
+
+has title => (
+ isa => Str,
+ required => 0,
+ is => 'ro',
+);
+
+has visits => (
+ isa => ArrayRef[Dict[date => Int, type => Int]],
+ required => 1,
+ is => 'ro',
+);
+
+{
+my @visit_types=(
+ undef,
+ 'link',
+ 'typed',
+ 'bookmark',
+ 'embed',
+ 'redirect_permanent',
+ 'redirect_temporary',
+ 'download',
+ 'framed_link',
+);
+sub visit_type {
+ my ($self,$type_int) = @_;
+
+ if ($type_int > 0 && $type_int < @visit_types) {
+ return $visit_types[$type_int];
+ }
+ return undef;
+}
+}
+
+1;
diff --git a/lib/DeWeave/BO/Password.pm b/lib/DeWeave/BO/Password.pm
new file mode 100644
index 0000000..6839d66
--- /dev/null
+++ b/lib/DeWeave/BO/Password.pm
@@ -0,0 +1,50 @@
+package DeWeave::BO::Password;
+use Moose;
+use namespace::autoclean;
+use MooseX::Types::Moose qw(Str);
+
+extends 'DeWeave::EDO';
+
+has hostname => (
+ isa => Str,
+ required => 1,
+ is => 'ro',
+);
+
+has formSubmitURL => (
+ isa => Str,
+ required => 0,
+ is => 'ro',
+);
+
+has httpRealm => (
+ isa => Str,
+ required => 0,
+ is => 'ro',
+);
+
+has username => (
+ isa => Str,
+ required => 1,
+ is => 'ro',
+);
+
+has password => (
+ isa => Str,
+ required => 1,
+ is => 'ro',
+);
+
+has usernameField => (
+ isa => Str,
+ required => 0,
+ is => 'ro',
+);
+
+has passwordField => (
+ isa => Str,
+ required => 0,
+ is => 'ro',
+);
+
+1;
diff --git a/lib/DeWeave/BO/Pref.pm b/lib/DeWeave/BO/Pref.pm
new file mode 100644
index 0000000..5372da2
--- /dev/null
+++ b/lib/DeWeave/BO/Pref.pm
@@ -0,0 +1,14 @@
+package DeWeave::BO::Pref;
+use Moose;
+use namespace::autoclean;
+use MooseX::Types::Moose qw(HashRef);
+
+extends 'DeWeave::EDO';
+
+has value => (
+ isa => HashRef,
+ required => 1,
+ is => 'ro',
+);
+
+1;
diff --git a/lib/DeWeave/BO/Tab.pm b/lib/DeWeave/BO/Tab.pm
new file mode 100644
index 0000000..94f46b0
--- /dev/null
+++ b/lib/DeWeave/BO/Tab.pm
@@ -0,0 +1,26 @@
+package DeWeave::BO::Tab;
+use Moose;
+use namespace::autoclean;
+use MooseX::Types::Moose qw(ArrayRef Str Int Undef);
+use MooseX::Types::Structured qw(Dict Optional);
+
+extends 'DeWeave::EDO';
+
+has clientName => (
+ isa => Str,
+ required => 1,
+ is => 'ro',
+);
+
+has tabs => (
+ isa => ArrayRef[Dict[
+ title => Undef|Str,
+ urlHistory => ArrayRef[Str],
+ icon => Undef|Str,
+ lastUsed => Int,
+ ]],
+ required => 1,
+ is => 'ro',
+);
+
+1;