MobileCross
A common mobile cross-platform library, including http, files, json, threads, asynchronous, etc.
Basic
JSON
json parsing library based on cJSON, including JSONObject and JSONArray
JSONObject
jsonn object
JSONArray
json array
McDevice
Device information acquisition library
- device_id: device unique ID
- bundle_id: ios package name
- package_name: Android package name
- device_version: device information
- system_version: system information
McFile
File Management
###Folder folder
- type: Find the file path of a suffix
- name: Find the file path of a file name
File
- open : Open a file
- read: read file content
- exist: Does the file exist?
- size : file size
FileManager
- shareInstance: Single case
- isFile: Is it a file or not
- isDir: Is it a folder
- exist: Whether it exists, does not distinguish between files or folders
- mkdir: Create folder
- move : Move files or folders
- remove: Delete files or folders
- write: Write to a file
- rootPath: with directory, ios in Cache, Android in Data
- resourcePath: ios in mainBundle.resourcePath, Android in data/__resouce
- tempPath: Temporary storage path
Resource
Android for managing assets files
McHttp
Asynchronous http
HttpCallback http callback
- done: the completed callback function
HttpSession
- get(url, callback): callback is an asynchronous callback after completion
- post(url, callback): callback is an asynchronous callback after completion
- put(url, callback): callback is an asynchronous callback after completion
- delete(url, callback): callback is an asynchronous callback after completion
- addHttpHeader: Add http header
McTask
Asynchronous threads based on pipelines and selects have poor performance. ThreadPool is recommended
McZip
Zip compression, has been deleted, used libzippp instead
SharedPreferences
A lightweight object storage, similar to Android's SharedPreferences, based on json
###SharedPreferences
- commit: commit: commit changes, save to local
Thread
Thread management
Thread
- run: thread execution function
LoopThread Loop Thread
- loop: loop function, need to be customized
ThreadPool
Asynchronous thread pool, based on pthread_cond_t
ThreadWork worker thread
ThreadPool thread pool
- add(void* (*run)(void*),void* arg): Submit a thread function run to the thread pool with the parameter arg
async_run
Execute a function asynchronously
3rdparty
Third-party dependency
libzippp
Zip compression and decompression, refer to github: ctabin/libzippp
libzip
Zip decompression and compression, refer to github: julienr/libzip-android
cJSON
json analysis
model
Some framework libraries
- async: asynchronous socket framework
- UTP: Reliable transmission based on UDP
- p2p: UTP-based p2p transmission
- push: push
async
AsyncSocket
Asynchronous Socket
AsyncFrame
Pipeline-based asynchronous framework
SocketFrame
Asynchronous socket framework based on AsyncFrame
ListenSocket
SocketFrame's TCP implementation and UDP implementation