Expand description
Multimedia messages sent from a computer through the phone (docs/texts.md,
“Multimedia messages sent from a computer”): the message Android’s sendMultimediaMessage
sends, an M-Send.req of the MMS 1.2 encapsulation (OMA-TS-MMS_ENC-V1_3,
over WSP’s encoding, WAP-230-WSP), written on the phone from a request’s
words and media (encode); the computer measures a message with the same
code (size), so both count the same bytes against the carrier’s limit;
and the carrier’s answer to it (M-Send.conf, conf), which Android hands
back with its result.
The bytes are those AOSP’s own composer writes for such a message
(PduComposer, android16-release), which Android’s own parser reads back
(android/jvm-checks/MmsCheck.java, on the samples of
android/jvm-checks/mms-samples.jsonl, which this module’s tests write
and check): its headers in its order; From as the insert-address token
(the carrier writes the sender’s number: the phone need not know its
own); each number with /TYPE=PLMN; no subject; class Personal; no
delivery or read report (they would need another restricted permission,
and Android’s carrier default offers none); the body multipart/related,
its SMIL first (AOSP Messaging’s layouts), then each medium, then the
words in UTF-8. Each part is named plainly (image1.jpg, text1.txt),
never by its file’s own name, which can say where or who: a medium here
has no name at all.
Structs§
- Conf
- The carrier’s answer to a message sent (M-Send.conf, ENC 6.1.2), as
Android hands it back with its result (
SmsManager.EXTRA_MMS_DATA). - Count 🔒
- Bytes counted, not kept.
- Medium
- A medium of a message: its content type, as the message names it
(
image/jpeg,video/mp4,text/x-vCard), and its bytes. - Message
- A multimedia message to send (M-Send.req).
- Reader 🔒
- The bytes of an answer, read in turn.
Enums§
- Kind 🔒
- What a medium is, for its name and its place in the SMIL.
- Refused
- Why a message cannot be written.
Constants§
- CONTENT_
TYPE 🔒 - Header fields and values (ENC 7.3; AOSP’s
PduHeaders,PduPart). - DATE 🔒
- DELIVERY_
REPORT 🔒 - FROM 🔒
- INSERT_
ADDRESS 🔒 - LONGEST_
NUMBER - The longest number a message goes to (E.164’s 15 digits after its
+), for a measure that holds whatever number the phone then writes: a computer measures a message with it, never shorter than the phone’s own. - MESSAGE_
CLASS 🔒 - MESSAGE_
ID 🔒 - MESSAGE_
TYPE 🔒 - MMS_
VERSION 🔒 - NO 🔒
- NUMBERED 🔒
- The content types WSP numbers (AOSP’s
PduContentTypes, by number): a part of one of these types names it by its number, any other by its words, as Android’s composer does (an exact match:text/x-vCard). - OK
- The carrier took the message (X-Mms-Response-Status Ok).
- PERSONAL 🔒
- P_
CHARSET 🔒 - A part’s Content-Type parameters and headers (WSP 8.4.2).
- P_
CONTENT_ 🔒ID - P_
CONTENT_ 🔒LOCATION - P_NAME 🔒
- P_START 🔒
- P_TYPE 🔒
- READ_
REPORT 🔒 - RESPONSE_
STATUS 🔒 - RESPONSE_
TEXT 🔒 - SEND_
CONF 🔒 - SEND_
REQ 🔒 - SHOWN_
MS 🔒 - How long a picture, a card or the words show, for a phone that follows the SMIL (AOSP Messaging’s).
- TO 🔒
- TRANSACTION_
ID 🔒 - UTF_8 🔒
- UTF-8’s MIBenum.
- VERSION_
1_ 🔒2 - MMS 1.2 (
PduHeaders.CURRENT_MMS_VERSION), as a short integer. - WORDS_
NAME 🔒 - The words’ part’s name.
Traits§
- Out 🔒
- Where a message’s bytes go: written (
Vec), or counted (Count).
Functions§
- address
- A number as a message’s To header writes it: its digits, with the
+that may begin it (“05 36 49 12 34” is0536491234, “+33 1 99 00 12 34” is+33199001234); none for a name in letters or fewer than three digits (a sender named in letters cannot be answered so). - conf
- The carrier’s answer, read; none for bytes that are no M-Send.conf. A header Sioul does not need is passed over by its WSP form.
- content_
type 🔒 - A content type, by its WSP number when it has one, else by its words.
- encode
- The message’s bytes, as Android sends them (the PDU).
- kind_of 🔒
- long_
integer 🔒 - A Long-integer: its byte count, then its bytes, the most significant first, as few as hold it.
- names 🔒
- A medium’s plain name in the message, by its kind and its rank among
those of its kind (
image1.jpg,video1.mp4,contact1.vcf): never its file’s own. - part 🔒
- One part of the body: its Content-Type (with its name, and its charset
for words), its Content-ID and Content-Location, then its bytes (WSP 8.5,
as
PduComposer.makeMessageBodywrites them). - quoted 🔒
- A Quoted-string: a
", the bytes and a 0. - room
- The bytes left under
limit(the carrier’s, else the one chosen) for the media’s own bytes, all of them together, for a message whose media are given empty (their content types alone): its size so, taken from the limit, less what their lengths may add once they hold their bytes (a medium’s length is a uintvar, one byte when empty, as many as the limit’s own at most: two more each under 2 MB, three from 2 MB on). None when even that is over. A message whose media hold no more between them then fits (size). - size
- How many bytes the message is (
encode’s, counted without being written): what the carrier’s limit is held against, on the computer that reduces its pictures and on the phone that sends it. - size_
with_ lengths - How many bytes the message is once its media hold
lengthsbytes each, given with their content types alone (media’ bytes left empty): what a computer’s page counts as words are typed, never reading the media again. The same numbersizegives the message whole: a part’s headers do not depend on its bytes, only its data’s length does (a uintvar). - smil 🔒
- The message’s SMIL, as AOSP Messaging lays one out: the pictures and
videos above (four fifths of the height when there are words), the words
below, one
<par>each, the words last. A video or a sound plays its own length (no duration said: Sioul does not read it, and a wrong one would cut it short on a phone that follows the SMIL). - text 🔒
- A Text-string: the bytes and a 0, behind a quote when the first is 128 or more (WSP 8.4.2.1).
- uintvar 🔒
- An unsigned integer of 7 bits a byte, the most significant first (WSP 8.1.2).
- value_
length 🔒 - A length: one byte up to 30, else 31 and a uintvar (WSP 8.4.2.2).
- write 🔒
- What
encodeandsizewrite, in AOSP’s order (PduComposer.makeSendRetrievePdu).