summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process
diff options
context:
space:
mode:
authorfukachan <fukachan>2008-07-20 00:38:53 +0000
committerfukachan <fukachan>2008-07-20 00:38:53 +0000
commitb3ecd69c6591bd13f9a3f76d4e3f5c5eaec345c5 (patch)
treed55eb9d1a6030af665a833511d67ab55fefb4827 /fml/lib/FML/Process
parent3d55d6c3d981465583e6cc1b1334d01a909a6119 (diff)
downloadfml8-b3ecd69c6591bd13f9a3f76d4e3f5c5eaec345c5.tar.gz
fml8-b3ecd69c6591bd13f9a3f76d4e3f5c5eaec345c5.tar.bz2
fml8-b3ecd69c6591bd13f9a3f76d4e3f5c5eaec345c5.zip
define incoming_message_dup_content() and
incoming_message_isolate_content().
Diffstat (limited to 'fml/lib/FML/Process')
-rw-r--r--fml/lib/FML/Process/Utils.pm64
1 files changed, 61 insertions, 3 deletions
diff --git a/fml/lib/FML/Process/Utils.pm b/fml/lib/FML/Process/Utils.pm
index 69189f54..09f4650c 100644
--- a/fml/lib/FML/Process/Utils.pm
+++ b/fml/lib/FML/Process/Utils.pm
@@ -1,10 +1,10 @@
#-*- perl -*-
#
-# Copyright (C) 2001,2002,2003,2004,2005,2006 Ken'ichi Fukamachi
+# Copyright (C) 2001,2002,2003,2004,2005,2006,2008 Ken'ichi Fukamachi
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Utils.pm,v 1.150 2006/05/13 11:45:40 fukachan Exp $
+# $FML: Utils.pm,v 1.151 2006/07/09 12:11:13 fukachan Exp $
#
package FML::Process::Utils;
@@ -387,6 +387,64 @@ sub incoming_message_print_body_as_file
}
+=head2 incoming_message_dup_content($new_class)
+
+dupliate the incoming queue at $new_class.
+
+=head2 incoming_message_isolate_content()
+
+dupliate the incoming queue at isolated queue.
+
+=cut
+
+
+# Descriptions: dupliate the queue in $new_class.
+# Arguments: OBJ($curproc) STR($new_class)
+# Side Effects: create another queue file.
+# Return Value: STR
+sub incoming_message_dup_content
+{
+ my ($curproc, $new_class) = @_;
+
+ # ASSERT
+ unless ($new_class) {
+ return undef;
+ }
+
+ my $queue = $curproc->incoming_message_get_current_queue();
+ if (defined $queue) {
+ if ($new_class) {
+ my $cur_class = "incoming";
+ my $new_qid = $queue->dup_content($cur_class, $new_class);
+ if ($new_qid) {
+ return $new_qid;
+ }
+ else {
+ return undef;
+ }
+ }
+ }
+ else {
+ $curproc->logerror("no incoming queue");
+ }
+
+ return undef;
+}
+
+
+# Descriptions: isolate the incoming queue to isolated queue.
+# Arguments: OBJ($curproc)
+# Side Effects: create another queue file.
+# Return Value: STR
+sub incoming_message_isolate_content
+{
+ my ($curproc) = @_;
+
+ my $new_class = "isolated";
+ $curproc->incoming_message_dup_content($new_class);
+}
+
+
=head1 access METHODS to handle article
available only in C<libexec/distribute> process.
@@ -2427,7 +2485,7 @@ Ken'ichi Fukamachi
=head1 COPYRIGHT
-Copyright (C) 2001,2002,2003,2004,2005,2006 Ken'ichi Fukamachi
+Copyright (C) 2001,2002,2003,2004,2005,2006,2008 Ken'ichi Fukamachi
All rights reserved. This program is free software; you can
redistribute it and/or modify it under the same terms as Perl itself.