[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[coldsync-hackers] 20020421: CVS news




 Hello hackers,

   it's SPC.pm this time!

 I've added a few new VFS/Expansion related functions.
 Attached you will find a little test script.

 Please send me your feedback.

-- 

  - alex.

#!/usr/bin/perl -w

use strict;

use ColdSync;
use ColdSync::SPC;

use Data::Dumper;


my $err;
my $dbh;		# Database handle
my $force = 0;


MyStartConduit('sync');


	my $ek = dlp_ExpSlotEnumerate();

	print Data::Dumper->Dump( [ $ek ] );

	foreach my $slot ( @{$ek->{'slots'}} )
	{
		my $exp = dlp_ExpSlotMediaType($slot);

		print Data::Dumper->Dump( [ $exp ] );

		$exp = dlp_ExpCardInfo($slot);
		print Data::Dumper->Dump( [ $exp ] );
	}

	my $en = dlp_VFSVolumeEnumerate();

	print Data::Dumper->Dump( [ $en ] );
	



MyEndConduit();


sub MyStartConduit
{
	my( $flavor ) = @_;

        &ColdSync::ParseArgs($flavor);

        if ($ColdSync::FLAVOR ne $flavor)
        {
                die "403 Unsupported flavor\n";
        }

	ColdSync::ReadHeaders;
        if (exists $ColdSync::SPC::{"VERSION"} and
            defined $HEADERS{"SPCPipe"})
        {
                ColdSync::SPC::spc_init;
        }
}

sub MyEndConduit
{
        print STDOUT "202 Success!\n";
        exit 0;
}