idevice 1.1.5.1 → 1.1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/idevice/afc.rb +5 -1
- data/lib/idevice/c.rb +3 -0
- data/lib/idevice/diagnostics_relay.rb +5 -1
- data/lib/idevice/file_relay.rb +5 -1
- data/lib/idevice/heartbeat.rb +5 -1
- data/lib/idevice/house_arrest.rb +5 -1
- data/lib/idevice/idevice.rb +5 -1
- data/lib/idevice/image_mounter.rb +5 -1
- data/lib/idevice/installation_proxy.rb +12 -3
- data/lib/idevice/lockdown.rb +6 -1
- data/lib/idevice/misagent.rb +5 -1
- data/lib/idevice/mobilebackup.rb +5 -1
- data/lib/idevice/mobilebackup2.rb +5 -1
- data/lib/idevice/mobilesync.rb +5 -1
- data/lib/idevice/notification_proxy.rb +5 -1
- data/lib/idevice/plist.rb +5 -1
- data/lib/idevice/restore.rb +5 -1
- data/lib/idevice/sbservices.rb +5 -1
- data/lib/idevice/screenshotr.rb +5 -1
- data/lib/idevice/version.rb +1 -1
- data/lib/idevice/webinspector.rb +5 -1
- metadata +3 -3
data/lib/idevice/afc.rb
CHANGED
data/lib/idevice/c.rb
CHANGED
@@ -21,6 +21,7 @@
|
|
21
21
|
require "rubygems"
|
22
22
|
require 'plist'
|
23
23
|
require "ffi"
|
24
|
+
require "thread"
|
24
25
|
|
25
26
|
module FFI
|
26
27
|
class MemoryPointer < Pointer
|
@@ -102,6 +103,8 @@ module Idevice
|
|
102
103
|
module C
|
103
104
|
extend FFI::Library
|
104
105
|
|
106
|
+
Freelock = Mutex.new
|
107
|
+
|
105
108
|
class ManagedOpaquePointer < FFI::AutoPointer
|
106
109
|
def initialize(pointer)
|
107
110
|
raise NoMethodError, "release() not implemented for class #{self}" unless self.class.respond_to? :release
|
data/lib/idevice/file_relay.rb
CHANGED
@@ -29,7 +29,11 @@ module Idevice
|
|
29
29
|
class FileRelayClient < C::ManagedOpaquePointer
|
30
30
|
include LibHelpers
|
31
31
|
def self.release(ptr)
|
32
|
-
C.
|
32
|
+
C::Freelock.synchronize do
|
33
|
+
unless ptr.null?
|
34
|
+
C.file_relay_client_free(ptr)
|
35
|
+
end
|
36
|
+
end
|
33
37
|
end
|
34
38
|
|
35
39
|
def self.attach(opts={})
|
data/lib/idevice/heartbeat.rb
CHANGED
data/lib/idevice/house_arrest.rb
CHANGED
@@ -31,7 +31,11 @@ module Idevice
|
|
31
31
|
include LibHelpers
|
32
32
|
|
33
33
|
def self.release(ptr)
|
34
|
-
C.
|
34
|
+
C::Freelock.synchronize do
|
35
|
+
unless ptr.null?
|
36
|
+
C.house_arrest_client_free(ptr)
|
37
|
+
end
|
38
|
+
end
|
35
39
|
end
|
36
40
|
|
37
41
|
def self.attach(opts={})
|
data/lib/idevice/idevice.rb
CHANGED
@@ -28,7 +28,11 @@ module Idevice
|
|
28
28
|
|
29
29
|
class Idevice < C::ManagedOpaquePointer
|
30
30
|
def self.release(ptr)
|
31
|
-
C.
|
31
|
+
C::Freelock.synchronize do
|
32
|
+
unless ptr.null?
|
33
|
+
C.idevice_free(ptr)
|
34
|
+
end
|
35
|
+
end
|
32
36
|
end
|
33
37
|
|
34
38
|
# Use this instead of 'new' to attach to an idevice using libimobiledevice
|
@@ -33,7 +33,11 @@ module Idevice
|
|
33
33
|
include LibHelpers
|
34
34
|
|
35
35
|
def self.release(ptr)
|
36
|
-
C.
|
36
|
+
C::Freelock.synchronize do
|
37
|
+
unless ptr.null?
|
38
|
+
C.mobile_image_mounter_free(ptr)
|
39
|
+
end
|
40
|
+
end
|
37
41
|
end
|
38
42
|
|
39
43
|
def self.attach(opts={})
|
@@ -31,7 +31,11 @@ module Idevice
|
|
31
31
|
include LibHelpers
|
32
32
|
|
33
33
|
def self.release(ptr)
|
34
|
-
C.
|
34
|
+
C::Freelock.synchronize do
|
35
|
+
unless ptr.null?
|
36
|
+
C.instproxy_client_free(ptr)
|
37
|
+
end
|
38
|
+
end
|
35
39
|
end
|
36
40
|
|
37
41
|
def self.attach(opts={})
|
@@ -121,8 +125,13 @@ module Idevice
|
|
121
125
|
end
|
122
126
|
|
123
127
|
private
|
124
|
-
def _cb
|
125
|
-
@
|
128
|
+
def _cb(&block)
|
129
|
+
@_cb_blk = block
|
130
|
+
@_cb_procblk = Proc.new do |op, status, junk|
|
131
|
+
unless status.null?
|
132
|
+
@_cb_blk.call(op, status.to_ruby)
|
133
|
+
end
|
134
|
+
end
|
126
135
|
return @_cb_procblk
|
127
136
|
end
|
128
137
|
end
|
data/lib/idevice/lockdown.rb
CHANGED
@@ -28,8 +28,13 @@ module Idevice
|
|
28
28
|
|
29
29
|
# Used to manage device preferences, start services, pairing and activation on the device.
|
30
30
|
class LockdownClient < C::ManagedOpaquePointer
|
31
|
+
|
31
32
|
def self.release(ptr)
|
32
|
-
C.
|
33
|
+
C::Freelock.synchronize do
|
34
|
+
unless ptr.null?
|
35
|
+
C.lockdownd_client_free(ptr)
|
36
|
+
end
|
37
|
+
end
|
33
38
|
end
|
34
39
|
|
35
40
|
def self.attach(opts={})
|
data/lib/idevice/misagent.rb
CHANGED
data/lib/idevice/mobilebackup.rb
CHANGED
@@ -32,7 +32,11 @@ module Idevice
|
|
32
32
|
include LibHelpers
|
33
33
|
|
34
34
|
def self.release(ptr)
|
35
|
-
C.
|
35
|
+
C::Freelock.synchronize do
|
36
|
+
unless ptr.null?
|
37
|
+
C.mobilebackup_client_free(ptr)
|
38
|
+
end
|
39
|
+
end
|
36
40
|
end
|
37
41
|
|
38
42
|
FLAG_RESTORE_NOTIFY_SPRINGBOARD = (1 << 0)
|
@@ -32,7 +32,11 @@ module Idevice
|
|
32
32
|
include LibHelpers
|
33
33
|
|
34
34
|
def self.release(ptr)
|
35
|
-
C.
|
35
|
+
C::Freelock.synchronize do
|
36
|
+
unless ptr.null?
|
37
|
+
C.mobilebackup2_client_free(ptr)
|
38
|
+
end
|
39
|
+
end
|
36
40
|
end
|
37
41
|
|
38
42
|
def self.attach(opts={})
|
data/lib/idevice/mobilesync.rb
CHANGED
data/lib/idevice/plist.rb
CHANGED
data/lib/idevice/restore.rb
CHANGED
@@ -30,7 +30,11 @@ module Idevice
|
|
30
30
|
# Used to initiate the device restore process or reboot a device.
|
31
31
|
class RestoreClient < C::ManagedOpaquePointer
|
32
32
|
def self.release(ptr)
|
33
|
-
C.
|
33
|
+
C::Freelock.synchronize do
|
34
|
+
unless ptr.null?
|
35
|
+
C.restored_client_free(ptr)
|
36
|
+
end
|
37
|
+
end
|
34
38
|
end
|
35
39
|
|
36
40
|
def self.attach(opts={})
|
data/lib/idevice/sbservices.rb
CHANGED
data/lib/idevice/screenshotr.rb
CHANGED
@@ -31,7 +31,11 @@ module Idevice
|
|
31
31
|
include LibHelpers
|
32
32
|
|
33
33
|
def self.release(ptr)
|
34
|
-
C.
|
34
|
+
C::Freelock.synchronize do
|
35
|
+
unless ptr.null?
|
36
|
+
C.screenshotr_client_free(ptr)
|
37
|
+
end
|
38
|
+
end
|
35
39
|
end
|
36
40
|
|
37
41
|
def self.attach(opts={})
|
data/lib/idevice/version.rb
CHANGED
data/lib/idevice/webinspector.rb
CHANGED
@@ -31,7 +31,11 @@ module Idevice
|
|
31
31
|
include LibHelpers
|
32
32
|
|
33
33
|
def self.release(ptr)
|
34
|
-
C.
|
34
|
+
C::Freelock.synchronize do
|
35
|
+
unless ptr.null?
|
36
|
+
C.webinspector_client_free(ptr)
|
37
|
+
end
|
38
|
+
end
|
35
39
|
end
|
36
40
|
|
37
41
|
def self.attach(opts={})
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: idevice
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.5.
|
4
|
+
version: 1.1.5.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -190,7 +190,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
190
190
|
version: '0'
|
191
191
|
segments:
|
192
192
|
- 0
|
193
|
-
hash:
|
193
|
+
hash: 2221588870946456770
|
194
194
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
195
195
|
none: false
|
196
196
|
requirements:
|
@@ -199,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
199
199
|
version: '0'
|
200
200
|
segments:
|
201
201
|
- 0
|
202
|
-
hash:
|
202
|
+
hash: 2221588870946456770
|
203
203
|
requirements: []
|
204
204
|
rubyforge_project:
|
205
205
|
rubygems_version: 1.8.25
|