-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from artehe/remoted
Remoted
- Loading branch information
Showing
101 changed files
with
4,070 additions
and
497 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,17 @@ | ||
using System.Collections.Generic; | ||
using Netimobiledevice.Extentions; | ||
using System.Text; | ||
|
||
namespace Netimobiledevice.Afc.Packets | ||
{ | ||
internal class AfcFileInfoRequest : AfcPacket | ||
internal class AfcFileInfoRequest(string filename) : AfcPacket | ||
{ | ||
public CString Filename { get; set; } | ||
public string Filename { get; set; } = filename; | ||
|
||
public override int DataSize => Filename.Length; | ||
|
||
public AfcFileInfoRequest(string filename) | ||
{ | ||
Filename = new CString(filename); | ||
} | ||
|
||
public override byte[] GetBytes() | ||
{ | ||
List<byte> bytes = new List<byte>(); | ||
bytes.AddRange(Header.GetBytes()); | ||
bytes.AddRange(Filename.Bytes); | ||
return bytes.ToArray(); | ||
return [.. Header.GetBytes(), .. Filename.AsCString().GetBytes(Encoding.UTF8)]; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,23 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Netimobiledevice.Extentions; | ||
using System; | ||
using System.Text; | ||
|
||
namespace Netimobiledevice.Afc.Packets | ||
{ | ||
internal class AfcFileOpenRequest : AfcPacket | ||
internal class AfcFileOpenRequest(AfcFileOpenMode mode, string filename) : AfcPacket | ||
{ | ||
public AfcFileOpenMode Mode { get; } | ||
public CString Filename { get; } | ||
public AfcFileOpenMode Mode { get; } = mode; | ||
public string Filename { get; } = filename; | ||
|
||
public override int DataSize => sizeof(AfcFileOpenMode) + Filename.Length; | ||
|
||
public AfcFileOpenRequest(AfcFileOpenMode mode, string filename) | ||
{ | ||
Mode = mode; | ||
Filename = new CString(filename); | ||
} | ||
public override int DataSize => sizeof(AfcFileOpenMode) + Filename.AsCString().Length; | ||
|
||
public override byte[] GetBytes() | ||
{ | ||
List<byte> bytes = new List<byte>(); | ||
bytes.AddRange(Header.GetBytes()); | ||
bytes.AddRange(BitConverter.GetBytes((ulong) Mode)); | ||
bytes.AddRange(Filename.Bytes); | ||
return bytes.ToArray(); | ||
return [ | ||
.. Header.GetBytes(), | ||
.. BitConverter.GetBytes((ulong) Mode), | ||
.. Filename.AsCString().GetBytes(Encoding.UTF8), | ||
]; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,17 @@ | ||
using System.Collections.Generic; | ||
using Netimobiledevice.Extentions; | ||
using System.Text; | ||
|
||
namespace Netimobiledevice.Afc.Packets | ||
{ | ||
internal class AfcReadDirectoryRequest : AfcPacket | ||
internal class AfcReadDirectoryRequest(string filename) : AfcPacket | ||
{ | ||
public CString Filename { get; } | ||
public string Filename { get; } = filename; | ||
|
||
public override int DataSize => Filename.Length; | ||
|
||
public AfcReadDirectoryRequest(string filename) | ||
{ | ||
Filename = new CString(filename); | ||
} | ||
public override int DataSize => Filename.AsCString().Length; | ||
|
||
public override byte[] GetBytes() | ||
{ | ||
List<byte> bytes = new List<byte>(); | ||
bytes.AddRange(Header.GetBytes()); | ||
bytes.AddRange(Filename.Bytes); | ||
return bytes.ToArray(); | ||
return [.. Header.GetBytes(), .. Filename.AsCString().GetBytes(Encoding.UTF8)]; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,17 @@ | ||
using System.Collections.Generic; | ||
using Netimobiledevice.Extentions; | ||
using System.Text; | ||
|
||
namespace Netimobiledevice.Afc.Packets | ||
{ | ||
internal class AfcRmRequest : AfcPacket | ||
internal class AfcRmRequest(string filename) : AfcPacket | ||
{ | ||
public CString Filename { get; } | ||
public string Filename { get; } = filename; | ||
|
||
public override int DataSize => Filename.Length; | ||
|
||
public AfcRmRequest(string filename) | ||
{ | ||
Filename = new CString(filename); | ||
} | ||
public override int DataSize => Filename.AsCString().Length; | ||
|
||
public override byte[] GetBytes() | ||
{ | ||
List<byte> bytes = new List<byte>(); | ||
bytes.AddRange(Header.GetBytes()); | ||
bytes.AddRange(Filename.Bytes); | ||
return bytes.ToArray(); | ||
return [.. Header.GetBytes(), .. Filename.AsCString().GetBytes(Encoding.UTF8)]; | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.