| 1 | package Udev::FFI::Device; | ||||||||||
| 2 | |||||||||||
| 3 | 3 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 3 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 3 | ▶ | use Udev::FFI::Functions qw(:all); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | |||||||||||
| 9 | |||||||||||
| 10 | sub new { | ||||||||||
| 11 | 0 | ▶ | my $class = shift; | ||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 12 | |||||||||||
| 13 | 0 | my $self = { | |||||||||
| 14 | _device => shift, | ||||||||||
| 15 | _udev => shift | ||||||||||
| 16 | }; | ||||||||||
| 17 | |||||||||||
| 18 | 0 | bless $self, $class; | |||||||||
| 19 | |||||||||||
| 20 | 0 | return $self; | |||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | |||||||||||
| 24 | |||||||||||
| 25 | sub get_udev { | ||||||||||
| 26 | 0 | ▶ | return $_[0]->{_udev}; | ||||||||
|
Subroutine
get_udev: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | |||||||||||
| 30 | sub get_devpath { | ||||||||||
| 31 | 0 | ▶ | return udev_device_get_devpath($_[0]->{_device}); | ||||||||
|
Subroutine
get_devpath: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | sub get_subsystem { | ||||||||||
| 35 | 0 | ▶ | return udev_device_get_subsystem($_[0]->{_device}); | ||||||||
|
Subroutine
get_subsystem: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 36 | } | ||||||||||
| 37 | |||||||||||
| 38 | sub get_devtype { | ||||||||||
| 39 | 0 | ▶ | return udev_device_get_devtype($_[0]->{_device}); | ||||||||
|
Subroutine
get_devtype: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 40 | } | ||||||||||
| 41 | |||||||||||
| 42 | sub get_syspath { | ||||||||||
| 43 | 0 | ▶ | return udev_device_get_syspath($_[0]->{_device}); | ||||||||
|
Subroutine
get_syspath: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 44 | } | ||||||||||
| 45 | |||||||||||
| 46 | sub get_sysname { | ||||||||||
| 47 | 0 | ▶ | return udev_device_get_sysname($_[0]->{_device}); | ||||||||
|
Subroutine
get_sysname: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 48 | } | ||||||||||
| 49 | |||||||||||
| 50 | sub get_sysnum { | ||||||||||
| 51 | 0 | ▶ | return udev_device_get_sysnum($_[0]->{_device}); | ||||||||
|
Subroutine
get_sysnum: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 52 | } | ||||||||||
| 53 | |||||||||||
| 54 | sub get_devnode { | ||||||||||
| 55 | 0 | ▶ | return udev_device_get_devnode($_[0]->{_device}); | ||||||||
|
Subroutine
get_devnode: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 56 | } | ||||||||||
| 57 | |||||||||||
| 58 | sub get_is_initialized { | ||||||||||
| 59 | 0 | ▶ | return udev_device_get_is_initialized($_[0]->{_device}); | ||||||||
|
Subroutine
get_is_initialized: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 60 | } | ||||||||||
| 61 | |||||||||||
| 62 | sub get_property_value { | ||||||||||
| 63 | # self, key | ||||||||||
| 64 | 0 | ▶ | return udev_device_get_property_value($_[0]->{_device}, $_[1]); | ||||||||
|
Subroutine
get_property_value: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 65 | } | ||||||||||
| 66 | |||||||||||
| 67 | sub get_driver { | ||||||||||
| 68 | 0 | ▶ | return udev_device_get_driver($_[0]->{_device}); | ||||||||
|
Subroutine
get_driver: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 69 | } | ||||||||||
| 70 | |||||||||||
| 71 | sub get_devnum { | ||||||||||
| 72 | 0 | ▶ | return udev_device_get_devnum($_[0]->{_device}); | ||||||||
|
Subroutine
get_devnum: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 73 | } | ||||||||||
| 74 | |||||||||||
| 75 | sub get_action { | ||||||||||
| 76 | 0 | ▶ | return udev_device_get_action($_[0]->{_device}); | ||||||||
|
Subroutine
get_action: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 77 | } | ||||||||||
| 78 | |||||||||||
| 79 | sub get_seqnum { | ||||||||||
| 80 | 0 | ▶ | return udev_device_get_seqnum($_[0]->{_device}); | ||||||||
|
Subroutine
get_seqnum: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 81 | } | ||||||||||
| 82 | |||||||||||
| 83 | sub get_usec_since_initialized { | ||||||||||
| 84 | 0 | ▶ | return udev_device_get_usec_since_initialized($_[0]->{_device}); | ||||||||
|
Subroutine
get_usec_since_initialized: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 85 | } | ||||||||||
| 86 | |||||||||||
| 87 | sub get_sysattr_value { | ||||||||||
| 88 | # self, sysattr | ||||||||||
| 89 | 0 | ▶ | return udev_device_get_sysattr_value($_[0]->{_device}, $_[1]); | ||||||||
|
Subroutine
get_sysattr_value: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 90 | } | ||||||||||
| 91 | |||||||||||
| 92 | sub set_sysattr_value { | ||||||||||
| 93 | # self, sysattr, value | ||||||||||
| 94 | 0 | ▶ | return udev_device_set_sysattr_value($_[0]->{_device}, $_[1], $_[2]); | ||||||||
|
Subroutine
set_sysattr_value: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 95 | } | ||||||||||
| 96 | |||||||||||
| 97 | sub has_tag { | ||||||||||
| 98 | # self, tag | ||||||||||
| 99 | 0 | ▶ | return udev_device_has_tag($_[0]->{_device}, $_[1]); | ||||||||
|
Subroutine
has_tag: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 100 | } | ||||||||||
| 101 | |||||||||||
| 102 | |||||||||||
| 103 | sub get_parent { | ||||||||||
| 104 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
get_parent: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 105 | |||||||||||
| 106 | 0 | my $device = udev_device_get_parent( $self->{_device} ); | |||||||||
| 107 | 0 | ▶ | if(defined($device)) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 108 | 0 | udev_device_ref($device); | |||||||||
| 109 | |||||||||||
| 110 | 0 | return Udev::FFI::Device->new($device, $self->{_udev}); | |||||||||
| 111 | } | ||||||||||
| 112 | |||||||||||
| 113 | 0 | return undef; | |||||||||
| 114 | } | ||||||||||
| 115 | |||||||||||
| 116 | |||||||||||
| 117 | sub get_parent_with_subsystem_devtype { | ||||||||||
| 118 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
get_parent_with_subsystem_devtype: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 119 | 0 | my $subsystem = shift; | |||||||||
| 120 | 0 | my $devtype = shift; | |||||||||
| 121 | |||||||||||
| 122 | 0 | my $device = udev_device_get_parent_with_subsystem_devtype( $self->{_device}, $subsystem, $devtype ); | |||||||||
| 123 | 0 | ▶ | if(defined($device)) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 124 | 0 | udev_device_ref($device); | |||||||||
| 125 | |||||||||||
| 126 | 0 | return Udev::FFI::Device->new($device, $self->{_udev}); | |||||||||
| 127 | } | ||||||||||
| 128 | |||||||||||
| 129 | 0 | return undef; | |||||||||
| 130 | } | ||||||||||
| 131 | |||||||||||
| 132 | |||||||||||
| 133 | sub get_devlinks_list_entries { | ||||||||||
| 134 | 0 | ▶ | return get_entries( udev_device_get_devlinks_list_entry( $_[0]->{_device} ) ); | ||||||||
|
Subroutine
get_devlinks_list_entries: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 135 | } | ||||||||||
| 136 | |||||||||||
| 137 | sub get_properties_list_entries { | ||||||||||
| 138 | 0 | ▶ | return get_entries( udev_device_get_properties_list_entry( $_[0]->{_device} ) ); | ||||||||
|
Subroutine
get_properties_list_entries: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 139 | } | ||||||||||
| 140 | |||||||||||
| 141 | sub get_tags_list_entries { | ||||||||||
| 142 | 0 | ▶ | return get_entries( udev_device_get_tags_list_entry( $_[0]->{_device} ) ); | ||||||||
|
Subroutine
get_tags_list_entries: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 143 | } | ||||||||||
| 144 | |||||||||||
| 145 | sub get_sysattr_list_entries { | ||||||||||
| 146 | 0 | ▶ | return get_entries( udev_device_get_sysattr_list_entry( $_[0]->{_device} ) ); | ||||||||
|
Subroutine
get_sysattr_list_entries: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 147 | } | ||||||||||
| 148 | |||||||||||
| 149 | |||||||||||
| 150 | |||||||||||
| 151 | sub DESTROY { | ||||||||||
| 152 | 0 | ▶ | udev_device_unref( $_[0]->{_device} ); | ||||||||
|
Subroutine
DESTROY: not called CC=1 SCAR=6.9
| |||||||||||
| 153 | } | ||||||||||
| 154 | |||||||||||
| 155 | |||||||||||
| 156 | |||||||||||
| 157 | 3 | 1; | |||||||||
| 158 | |||||||||||
| 159 | |||||||||||
| 160 | |||||||||||
| 161 | __END__ | ||||||||||