Changeset 890

Show
Ignore:
Timestamp:
05/06/03 18:11:03
Author:
miyagawa
Message:

version 0.10

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • HTTP-MobileAgent/trunk/Changes

    r875 r890  
    11Revision history for Perl extension HTTP::MobileAgent 
     2 
     30.10  Tue May  6 18:10:43 JST 2003 
     4        * Added DoCoMo 505i & i-mode HTML 5.0 support 
     5        - Added F661i (HTML 4.0) 
    26 
    370.09  Wed Apr  2 19:16:20 JST 2003 
  • HTTP-MobileAgent/trunk/bin/makedocomomap

    r792 r890  
    1 #!/usr/bin/perl 
     1#!/usr/bin/perl -w 
    22use strict; 
     3use FindBin; 
    34use Jcode; 
    45use LWP::Simple; 
     
    2425        }; 
    2526    } 
    26     output_code(\%map); 
     27    my $overwrite = $ARGV[0] && $ARGV[0] eq '-o'; 
     28    output_code(\%map, $overwrite); 
    2729} 
    2830 
    2931sub output_code { 
    30     my $map = shift; 
     32    my($map, $overwrite) = @_; 
     33    if ($overwrite) { 
     34        open MAP, "> $FindBin::Bin/../lib/HTTP/MobileAgent/DoCoMoDisplayMap.pm" or die $!; 
     35        select MAP; 
     36    } 
    3137    $Data::Dumper::Indent = 1; 
    3238    printf <<'TEMPLATE', Data::Dumper->Dump([ $map ], [ qw(DisplayMap) ]); 
     
    4753TEMPLATE 
    4854    ; 
     55    if ($overwrite) { 
     56        close MAP; 
     57    } 
    4958} 
    5059 
  • HTTP-MobileAgent/trunk/lib/HTTP/MobileAgent.pm

    r875 r890  
    33use strict; 
    44use vars qw($VERSION); 
    5 $VERSION = 0.09
     5$VERSION = q(0.10)
    66 
    77use HTTP::MobileAgent::Request; 
  • HTTP-MobileAgent/trunk/lib/HTTP/MobileAgent/AirHPhone.pm

    r875 r890  
    33use strict; 
    44use vars qw($VERSION); 
    5 $VERSION = 0.09
     5$VERSION = q(0.10)
    66 
    77use base qw(HTTP::MobileAgent); 
     
    2222    $self->{cache_size} =~ s/^c//; 
    2323} 
     24 
     25sub _make_display { 
     26    # XXX 
     27} 
     28 
    2429 
    25301; 
  • HTTP-MobileAgent/trunk/lib/HTTP/MobileAgent/Display.pm

    r875 r890  
    22use strict; 
    33__PACKAGE__->HTTP::MobileAgent::make_accessors( 
    4     qw(width height color depth
     4    qw(width height color depth width_bytes height_bytes
    55); 
    66 
    77use vars qw($VERSION); 
    8 $VERSION = 0.09
     8$VERSION = q(0.10)
    99 
    1010sub new { 
     
    3939      my $depth = $display->depth; 
    4040  } 
     41 
     42  # only available in DoCoMo 505i 
     43  my $width_bytes  = $display->width_bytes; 
     44  my $height_bytes = $display->height_bytes; 
    4145 
    4246=head1 DESCRIPTION 
  • HTTP-MobileAgent/trunk/lib/HTTP/MobileAgent/DoCoMo.pm

    r875 r890  
    33use strict; 
    44use vars qw($VERSION); 
    5 $VERSION = 0.09
     5$VERSION = q(0.10)
    66 
    77use base qw(HTTP::MobileAgent); 
     
    2424    qr/502i|821i|209i|691i|(F|N|P|KO)210i|^F671i$/ => '2.0', 
    2525    qr/(D210i|SO210i)|503i|211i|SH251i|692i|200[12]|2101V/ => '3.0', 
    26     qr/504i|251i|^F671iS$|212i|2051|2102V/ => '4.0', 
     26    qr/504i|251i|^F671iS$|^F661i$|212i|2051|2102V/ => '4.0', 
    2727    qr/eggy|P751v/ => '3.2', 
     28    qr/505i/ => '5.0', 
    2829]; 
    2930 
     
    6263 
    6364    for (@rest) { 
    64         /^ser(\w{11})$/ and do { $self->{serial_number} = $1; next }; 
    65         /^(T[DBJ])$/   and do { $self->{status} = $1; next }; 
    66         /^s(\d+)$/     and do { $self->{bandwidth} = $1; next }; 
     65        /^ser(\w{11})$/  and do { $self->{serial_number} = $1; next }; 
     66        /^(T[CDBJ])$/    and do { $self->{status} = $1; next }; 
     67        /^s(\d+)$/       and do { $self->{bandwidth} = $1; next }; 
     68        /^W(\d+)H(\d+)$/ and do { $self->{display_bytes} = "$1*$2"; next; }; 
    6769    } 
    6870} 
     
    120122    my $self = shift; 
    121123    my $display = $DisplayMap->{$self->model}; 
     124    if ($self->{display_bytes}) { 
     125        my($w, $h) = split /\*/, $self->{display_bytes}; 
     126        $display->{width_bytes}  = $w; 
     127        $display->{height_bytes} = $h; 
     128    } 
    122129    return HTTP::MobileAgent::Display->new(%$display); 
    123130} 
     
    154161  printf "Card ID: %s\n", $agent->card_id;              # "01234567890123456789" 
    155162 
    156   # e.g.) "DoCoMo/1.0/P502i (Google CHTML Proxy/1.0) 
    157   pritnf "Comment: %s\n", $agent->comment;              # "Google CHTML Proxy/1.0 
     163  # e.g.) "DoCoMo/1.0/P502i (Google CHTML Proxy/1.0)" 
     164  printf "Comment: %s\n", $agent->comment;              # "Google CHTML Proxy/1.0 
     165 
     166  # e.g.) "DoCoMo/1.0/D505i/c20/TB/W20H10" 
     167  printf " 
    158168 
    159169  # only available in eggy/M-stage 
  • HTTP-MobileAgent/trunk/lib/HTTP/MobileAgent/DoCoMoDisplayMap.pm

    r875 r890  
    107107    'color' => 1 
    108108  }, 
     109  'N251iS' => { 
     110    'width' => 132, 
     111    'height' => 140, 
     112    'depth' => 65536, 
     113    'color' => 1 
     114  }, 
    109115  'SO502i' => { 
    110116    'width' => 120, 
     
    147153    'height' => 91, 
    148154    'depth' => 256, 
     155    'color' => 1 
     156  }, 
     157  'F661i' => { 
     158    'width' => 132, 
     159    'height' => 136, 
     160    'depth' => 65536, 
    149161    'color' => 1 
    150162  }, 
  • HTTP-MobileAgent/trunk/lib/HTTP/MobileAgent/EZweb.pm

    r875 r890  
    33use strict; 
    44use vars qw($VERSION); 
    5 $VERSION = 0.09
     5$VERSION = q(0.10)
    66 
    77use base qw(HTTP::MobileAgent); 
  • HTTP-MobileAgent/trunk/lib/HTTP/MobileAgent/JPhone.pm

    r875 r890  
    33use strict; 
    44use vars qw($VERSION); 
    5 $VERSION = 0.09
     5$VERSION = q(0.10)
    66 
    77use base qw(HTTP::MobileAgent); 
  • HTTP-MobileAgent/trunk/t/02_docomo.t

    r875 r890  
    11use strict; 
    2 use Test::More tests => 774
     2use Test::More tests => 787
    33 
    44BEGIN { use_ok 'HTTP::MobileAgent' } 
     
    3636    [ "DoCoMo/1.0/F212i/c10/TB", '1.0', '4.0', 'F212i', 10, undef, 'F', '212i' ], 
    3737    [ "DoCoMo/2.0 N2051(c100;TB)", '2.0', '4.0', 'N2051', 100, 1, 'N', 'FOMA' ], 
     38    [ "DoCoMo/1.0/D505i/c20/TC/W20H10", '1.0', '5.0', 'D505i', 20, undef, 'D', '505i', { status => 'TC' } ], 
    3839); 
    3940 
  • HTTP-MobileAgent/trunk/t/05_display.t

    r792 r890  
    11use strict; 
    2 use Test::More tests => 30
     2use Test::More tests => 33
    33 
    44use HTTP::MobileAgent; 
     
    2424    [ { HTTP_USER_AGENT => 'DoCoMo/1.0/N502i' }, 
    2525      { width => 118, height => 128, color => '', depth => 4 } ], 
     26    [ { HTTP_USER_AGENT => "DoCoMo/1.0/D505i/c20/TC/W20H10" }, 
     27      { width_bytes => 20, height_bytes => 10 } ], 
    2628); 
    2729