# chuikoff/mobiledevices architecture

> Architecture diagram of the GitHub repository chuikoff/mobiledevices, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chuikoff/mobiledevices
- Repository: https://github.com/chuikoff/mobiledevices

## Overview

Mobile Devices is a Total Commander filesystem plugin for browsing and managing Android devices over Windows Portable Devices (WPD) and iPhones over Apple’s device services. The user workflow starts in Total Commander’s plugin root, selects a phone, browses its files, then copies or manages them; iPhone browsing also includes Photos, File Sharing documents, and Panic Logs. Device details and thumbnails are additional capabilities. The README documents these features, but the excerpts do not expose all dispatch paths, so some subsystem links are omitted or marked unverified.

Main entry points: [`wpdplug.cpp`](https://github.com/chuikoff/mobiledevices/blob/main/wpdplug.cpp) (WFX entry points), [`apple_md.cpp`](https://github.com/chuikoff/mobiledevices/blob/main/apple_md.cpp) (Apple device access), [`wpd20.cpp`](https://github.com/chuikoff/mobiledevices/blob/main/wpd20.cpp) (Device discovery), [`extra.cpp`](https://github.com/chuikoff/mobiledevices/blob/main/extra.cpp) (File properties)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_plugin["Plugin and WPD"]
  node_wfx["WFX entry points<br/>[wpdplug.cpp]"]
  node_wpd_devices["Device discovery<br/>[wpd20.cpp]"]
  node_wpd_files["WPD file operations<br/>[wpdplug.cpp]"]
  node_wpd_info["Device information<br/>[wpd20.cpp]"]
  node_content_fields["File properties<br/>[extra.cpp]"]
  node_thumbnails["Thumbnails<br/>[extra.cpp]"]
end

subgraph group_apple["Apple devices"]
  node_apple_backend["Apple device access<br/>[apple_md.cpp]"]
  node_apple_photos["Photo catalog<br/>[apple_photos.cpp]"]
  node_apple_apps["Apps and documents<br/>[apple_md.cpp]"]
  node_panic_logs["Panic Logs<br/>[apple_md.cpp]"]
  node_apple_info["Apple device details<br/>[apple_md.cpp]"]
end

subgraph group_shared["Shared services"]
  node_settings["Connection settings"]
  node_plugin_contract["Plugin interface<br/>[fsplugin.h]"]
  node_plugin_state["Shared plugin state<br/>[wpdplug_int.h]"]
  node_unicode["Unicode helpers<br/>[cunicode.cpp]"]
end

node_tc(("Total Commander"))
node_windows_wpd["Windows WPD"]
node_apple_services["Apple device services"]

node_tc -->|"calls plugin"| node_wfx
node_wfx -.->|"discovers devices"| node_wpd_devices
node_wpd_devices -->|"queries devices"| node_windows_wpd
node_wfx -.->|"routes operations"| node_wpd_files
node_wpd_files -->|"reads and writes"| node_windows_wpd
node_wpd_files -.->|"provides details"| node_wpd_info
node_wfx -.->|"routes Apple access"| node_apple_backend
node_apple_backend -->|"uses device services"| node_apple_services
node_apple_backend -.->|"delegates photo access"| node_apple_photos
node_apple_backend -->|"manages app files"| node_apple_apps
node_apple_backend -->|"lists crash logs"| node_panic_logs
node_apple_backend -->|"provides device details"| node_apple_info
node_wfx -.->|"serves properties"| node_content_fields
node_wfx -.->|"requests previews"| node_thumbnails
node_wfx -.->|"opens settings"| node_settings
node_wfx -->|"implements callbacks"| node_plugin_contract
node_wpd_files -.->|"uses shared state"| node_plugin_state
node_wpd_files -->|"uses text helpers"| node_unicode

click node_wfx "https://github.com/chuikoff/mobiledevices/blob/main/wpdplug.cpp"
click node_wpd_devices "https://github.com/chuikoff/mobiledevices/blob/main/wpd20.cpp"
click node_wpd_files "https://github.com/chuikoff/mobiledevices/blob/main/wpdplug.cpp"
click node_wpd_info "https://github.com/chuikoff/mobiledevices/blob/main/wpd20.cpp"
click node_content_fields "https://github.com/chuikoff/mobiledevices/blob/main/extra.cpp"
click node_apple_backend "https://github.com/chuikoff/mobiledevices/blob/main/apple_md.cpp"
click node_apple_photos "https://github.com/chuikoff/mobiledevices/blob/main/apple_photos.cpp"
click node_apple_apps "https://github.com/chuikoff/mobiledevices/blob/main/apple_md.cpp"
click node_panic_logs "https://github.com/chuikoff/mobiledevices/blob/main/apple_md.cpp"
click node_apple_info "https://github.com/chuikoff/mobiledevices/blob/main/apple_md.cpp"
click node_thumbnails "https://github.com/chuikoff/mobiledevices/blob/main/extra.cpp"
click node_settings "https://github.com/chuikoff/mobiledevices/blob/main/connectionsettings.cpp"
click node_plugin_contract "https://github.com/chuikoff/mobiledevices/blob/main/fsplugin.h"
click node_plugin_state "https://github.com/chuikoff/mobiledevices/blob/main/wpdplug_int.h"
click node_unicode "https://github.com/chuikoff/mobiledevices/blob/main/cunicode.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_wfx,node_wpd_devices,node_wpd_files,node_wpd_info,node_content_fields,node_thumbnails toneBlue
class node_apple_backend,node_apple_photos,node_apple_apps,node_panic_logs,node_apple_info toneAmber
class node_settings,node_plugin_contract,node_plugin_state,node_unicode toneMint
class node_tc,node_windows_wpd,node_apple_services toneIndigo
```

## Components

### Plugin and WPD

- [WFX entry points](https://github.com/chuikoff/mobiledevices/blob/main/wpdplug.cpp): `wpdplug.cpp`
- [Device discovery](https://github.com/chuikoff/mobiledevices/blob/main/wpd20.cpp): `wpd20.cpp`
- [WPD file operations](https://github.com/chuikoff/mobiledevices/blob/main/wpdplug.cpp): `wpdplug.cpp`
- [Device information](https://github.com/chuikoff/mobiledevices/blob/main/wpd20.cpp): `wpd20.cpp`
- [File properties](https://github.com/chuikoff/mobiledevices/blob/main/extra.cpp): `extra.cpp`
- [Thumbnails](https://github.com/chuikoff/mobiledevices/blob/main/extra.cpp): `extra.cpp`

### Apple devices

- [Apple device access](https://github.com/chuikoff/mobiledevices/blob/main/apple_md.cpp): `apple_md.cpp`
- [Photo catalog](https://github.com/chuikoff/mobiledevices/blob/main/apple_photos.cpp): `apple_photos.cpp`
- [Apps and documents](https://github.com/chuikoff/mobiledevices/blob/main/apple_md.cpp): `apple_md.cpp`
- [Panic Logs](https://github.com/chuikoff/mobiledevices/blob/main/apple_md.cpp): `apple_md.cpp`
- [Apple device details](https://github.com/chuikoff/mobiledevices/blob/main/apple_md.cpp): `apple_md.cpp`

### Shared services

- [Connection settings](https://github.com/chuikoff/mobiledevices/blob/main/connectionsettings.cpp): `connectionsettings.cpp`
- [Plugin interface](https://github.com/chuikoff/mobiledevices/blob/main/fsplugin.h): `fsplugin.h`
- [Shared plugin state](https://github.com/chuikoff/mobiledevices/blob/main/wpdplug_int.h): `wpdplug_int.h`
- [Unicode helpers](https://github.com/chuikoff/mobiledevices/blob/main/cunicode.cpp): `cunicode.cpp`

### Other components

- **Total Commander**
- **Windows WPD**
- **Apple device services**

## Connections

- Total Commander → WFX entry points: calls plugin (evidence: `README.md`)
- WFX entry points → Device discovery: discovers devices
- Device discovery → Windows WPD: queries devices (evidence: `wpd20.cpp`)
- WFX entry points → WPD file operations: routes operations (evidence: `wpdplug.cpp`)
- WPD file operations → Windows WPD: reads and writes (evidence: `wpdplug.cpp`)
- WPD file operations → Device information: provides details
- WFX entry points → Apple device access: routes Apple access
- Apple device access → Apple device services: uses device services (evidence: `README.md`)
- Apple device access → Photo catalog: delegates photo access
- Apple device access → Apps and documents: manages app files (evidence: `README.md`)
- Apple device access → Panic Logs: lists crash logs (evidence: `README.md`)
- Apple device access → Apple device details: provides device details (evidence: `README.md`)
- WFX entry points → File properties: serves properties
- WFX entry points → Thumbnails: requests previews
- WFX entry points → Connection settings: opens settings
- WFX entry points → Plugin interface: implements callbacks (evidence: `wpdplug.cpp`)
- WPD file operations → Shared plugin state: uses shared state (evidence: `wpdplug.cpp`)
- WPD file operations → Unicode helpers: uses text helpers (evidence: `wpdplug.cpp`)
