HTTP-MobileAgent

 view release on metacpan or  search on metacpan

lib/HTTP/MobileAgent/DoCoMo.pm  view on Meta::CPAN

  printf "Comment: %s\n", $agent->comment;		# "Google CHTML Proxy/1.0

  # e.g.) "DoCoMo/1.0/D505i/c20/TB/W20H10"
  printf "Status: %s\n", $agent->status;                # "TB"

  # only available in eggy/M-stage
  # e.g.) "DoCoMo/1.0/eggy/c300/s32/kPHS-K"
  printf "Bandwidth: %dkbps\n", $agent->bandwidth;	# 32

  # e.g.) "DoCoMo/2.0 SO902i(c100;TB;W30H16)"
  print "XHTML compiant!\n" if $agent->xhtml_compliant;	# true

  # e.g.) "DoCoMo/2.0 P07A(c500;TB;W24H15)"
  printf "Browser ver: %s\n", $agent->browser_version   # 2.0

=head1 DESCRIPTION

HTTP::MobileAgent::DoCoMo is a subclass of HTTP::MobileAgent, which
implements NTT docomo i-mode user agents.

=head1 METHODS

lib/HTTP/MobileAgent/DoCoMo.pm  view on Meta::CPAN


  TB | Browsers
  TC | Browsers with image off (only Available in HTML 5.0)
  TD | Fetching JAR
  TJ | i-Appli

=item xhtml_compliant

  if ($agent->xhtml_compliant) { }

returns if the agent is XHTML compliant.

=item browser_version

  if ($agent->browser_version > 2.0) { }

returns browser version(1.0 or 2.0).

=back

=head1 AUTHOR

lib/HTTP/MobileAgent/EZweb.pm  view on Meta::CPAN


  printf "Name: %s\n", $agent->name;		# "UP.Browser"
  printf "Version: %s\n", $agent->version;	# 3.01
  printf "DevieID: %s\n", $agent->device_id;	# HI02
  printf "Server: %s\n", $agent->server;	# "UP.Link/3.2.1.2"

  # e.g.) UP.Browser/3.01-HI02 UP.Link/3.2.1.2 (Google WAP Proxy/1.0)
  printf "Comment: %s\n", $agent->comment;	# "Google WAP Proxy/1.0"

  # e.g.) KDDI-TS21 UP.Browser/6.0.2.276 (GUI) MMP/1.1
  print "XHTML compiant!\n" if $agent->xhtml_compliant;	# true

=head1 DESCRIPTION

HTTP::MobileAgent::EZweb is a subclass of HTTP::MobileAgent, which
implements EZweb (WAP1.0/2.0) user agents.

=head1 METHODS

See L<HTTP::MobileAgent/"METHODS"> for common methods. Here are
HTTP::MobileAgent::EZweb specific methods.

lib/HTTP/MobileAgent/EZweb.pm  view on Meta::CPAN

=item comment

  $comment = $agent->comment;

returns comment like "Google WAP Proxy/1.0". returns undef if nothinng.

=item xhtml_compliant

  if ($agent->xhtml_compliant) { }

returns if the agent is XHTML compliant.

=item is_tuka

  if ($agent->is_tuka) { }

returns if the agent is TU-KA model.

=item is_win

  if ($agent->is_win) { }

lib/HTTP/MobileAgent/Vodafone.pm  view on Meta::CPAN

  'Profile'       => 'MIDP-1.0',
  'Configuration' => 'CLDC-1.0',
  'Ext-Profile'   => 'JSCL-1.1.0',

returns undef if unknown.

=item xhtml_compliant

  if ($agent->xhtml_compliant) { }

returns if the agent is XHTML compliant.

=back

=head1 TODO

=over 4

=item *

Area information support on http://www.dp.j-phone.com/jsky/position.html

t/02_docomo.t  view on Meta::CPAN

    is $agent->xhtml_compliant, $data[8], "xhtml compliant $ua";
    if ($data[7]) {
	is $agent->$_(), $data[7]->{$_},"testing $_" for keys %{$data[7]};
    }
    is $agent->carrier, 'I' , "carrier is I";
    is $agent->carrier_longname, 'DoCoMo' ,  "carrier longname is DoCoMo";

}

{
    # SH905i is XHTML Compliant.
    local $ENV{HTTP_USER_AGENT} = 'DoCoMo/2.0 SH905i(c100;TB;W24H12)';
    my $agent = HTTP::MobileAgent->new;
    is $agent->xhtml_compliant, 1;
}


while (<DATA>) {
    next if /^#/;
    chomp;
    local $ENV{HTTP_USER_AGENT} = $_;



( run in 1.377 second using v1.01-cache-2.11-cpan-49f99fa48dc )