UAProf
User Agent Profile (UAprof) – definicja opisu możliwości telefonu komórkowego, utworzona przez organizację WAP Forum w ramach specyfikacji WAP 2.0, obecnie rozszerzana przez Open Mobile Alliance.
Powodem powstania definicji UAprof była ciągle wzrastająca ilość wspomaganych formatów i serwisów, przez co pole „Accept” w nagłówku HTTP było coraz dłuższe. Dzięki UAProf nagłówek ten musi zawierać tylko jeden URL, a każdy zainteresowany serwer może ściągnąć plik XML z opisem wszystkich możliwości telefonu i zainstalowanych na nim programów. Pole „Accept” może być dzięki temu ograniczone do najważniejszych formatów.
Przykład
[edytuj | edytuj kod](Nokia N73)
HTTP-Header (wycinek):
Accept: text/javascript, text/ecmascript, application/x-javascript, text/html, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/css, multipart/mixed, text/vnd.wap.wml, application/vnd.wap.wmlc, application/vnd.wap.wmlscriptc, application/java-archive, application/java, application/x-java-archive, text/vnd.sun.j2me.app-descriptor, application/vnd.oma.drm.message, application/vnd.oma.drm.content, application/vnd.wap.mms-message, application/vnd.wap.sic, text/x-co-desc, application/vnd.oma.dd+xml, */*,text/x-hdml,image/mng,image/x-mng,video/mng,video/x-mng,image/bmp,text/html,text/vnd.wap.wmlscript,text/vnd.wap.wml Accept-Charset: iso-8859-1, utf-8, iso-10646-ucs-2; q=0.6,* Accept-Encoding: deflate, gzip Accept-Language: de;q=1.0, en;q=0.5, fr;q=0.5, tr;q=0.5, it;q=0.5, nl;q=0.5 Host: de.wikipedia.org/wiki/UAprof User-Agent: NokiaN73-1/2.0626.0.0.2 S60/3.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Link/6.3.0.0.0 X-Wap-Profile: "https://nds.nokia.com/uaprof/NN73-1r100.xml"
Na marginesie: niektórzy mylą UAProf z ciągiem User-Agent (przedostatnia linijka). Ten ostatni zdradza jednak tylko nazwę telefonu, a nie jego możliwości.
W ostatniej linijce widoczny jest URL, pod którym znajduje się plik definicji UAProf. W aktualnych telefonach plik UAprof wygląda mniej więcej tak, jak poniżej:
<?xml version="1.0"?> <!-- przykład dla wikipedii --> <!-- ten telefon w rzeczywistości nie istnieje --> <rdf:RDF xmlns:rdf="https://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:prf="https://www.openmobilealliance.org/tech/profiles/UAPROF/ccppschema-20021212#" xmlns:mms="https://www.openmobilealliance.org/tech/profiles/MMS/ccppschema-20050301-MMS1.2#"> <rdf:Description rdf:ID="Profile"> <prf:component> <rdf:Description rdf:ID="HardwarePlatform"> <rdf:type rdf:resource="https://www.openmobilealliance.org/tech/profiles/UAPROF/ccppschema-20021212#HardwarePlatform"/> <prf:BluetoothProfile> <rdf:Bag> <rdf:li>Headset Profile</rdf:li> <rdf:li>Handsfree Profile</rdf:li> <rdf:li>Object Push Profile</rdf:li> </rdf:Bag> </prf:BluetoothProfile> <prf:BitsPerPixel>16</prf:BitsPerPixel> <prf:ColorCapable>Yes</prf:ColorCapable> <prf:CPU>Wacek</prf:CPU> <prf:ImageCapable>Yes</prf:ImageCapable> <prf:InputCharSet> <rdf:Bag> <rdf:li>ISO-8859-1</rdf:li> <rdf:li>UTF-8</rdf:li> </rdf:Bag> </prf:InputCharSet> <prf:Keyboard>PhoneKeyPad</prf:Keyboard> <prf:Model>WikiPhone-1</prf:Model> <prf:NumberOfSoftKeys>2</prf:NumberOfSoftKeys> <prf:OutputCharSet> <rdf:Bag> <rdf:li>ISO-8859-1</rdf:li> <rdf:li>UTF-8</rdf:li> </rdf:Bag> </prf:OutputCharSet> <prf:PixelAspectRatio>1x1</prf:PixelAspectRatio> <prf:PointingResolution>Pixel</prf:PointingResolution> <prf:ScreenSize>640x480</prf:ScreenSize> <prf:ScreenSizeChar>80x24</prf:ScreenSizeChar> <prf:StandardFontProportional>Yes</prf:StandardFontProportional> <prf:SoundOutputCapable>Yes</prf:SoundOutputCapable> <prf:TextInputCapable>Yes</prf:TextInputCapable> <prf:Vendor>Fantasy</prf:Vendor> <prf:VoiceInputCapable>Yes</prf:VoiceInputCapable> </rdf:Description> </prf:component> <prf:component> <rdf:Description rdf:ID="SoftwarePlatform"> <rdf:type rdf:resource="https://www.openmobilealliance.org/tech/profiles/UAPROF/ccppschema-20021212#SoftwarePlatform"/> <prf:AcceptDownloadableSoftware>Yes</prf:AcceptDownloadableSoftware> <prf:CcppAccept> <rdf:Bag> <rdf:li>application/java</rdf:li> <rdf:li>application/vnd.wap.mms-message</rdf:li> <rdf:li>application/vnd.wap.wbxml</rdf:li> <rdf:li>application/vnd.wap.wmlc</rdf:li> <rdf:li>application/vnd.wap.wmlscriptc</rdf:li> <rdf:li>application/vnd.wap.xhtml+xml</rdf:li> <rdf:li>application/xhtml+xml</rdf:li> <rdf:li>audio/midi</rdf:li> <rdf:li>image/gif</rdf:li> <rdf:li>image/jpeg</rdf:li> <rdf:li>image/jpg</rdf:li> <rdf:li>image/vnd.wap.wbmp</rdf:li> <rdf:li>multipart/mixed</rdf:li> </rdf:Bag> </prf:CcppAccept> <prf:CcppAccept-Charset> <rdf:Bag> <rdf:li>ISO-8859-1</rdf:li> <rdf:li>UTF-8</rdf:li> </rdf:Bag> </prf:CcppAccept-Charset> <prf:CcppAccept-Encoding> <rdf:Bag> <rdf:li>base64</rdf:li> <rdf:li>quoted-printable</rdf:li> </rdf:Bag> </prf:CcppAccept-Encoding> </rdf:Description> </prf:component> <prf:component> <rdf:Description rdf:ID="NetworkCharacteristics"> <rdf:type rdf:resource="https://www.openmobilealliance.org/tech/profiles/UAPROF/ccppschema-20021212#NetworkCharacteristics"/> <prf:SupportedBluetoothVersion>1.2</prf:SupportedBluetoothVersion> <prf:CurrentBearerService>TwoWayPacket</prf:CurrentBearerService> <prf:SecuritySupport> <rdf:Bag> <rdf:li>SSL</rdf:li> <rdf:li>TLS</rdf:li> </rdf:Bag> </prf:SecuritySupport> <prf:SupportedBearers> <rdf:Bag> <rdf:li>GPRS</rdf:li> </rdf:Bag> </prf:SupportedBearers> </rdf:Description> </prf:component> <prf:component> <rdf:Description rdf:ID="BrowserUA"> <rdf:type rdf:resource="https://www.openmobilealliance.org/tech/profiles/UAPROF/ccppschema-20021212#BrowserUA"/> <prf:BrowserName>WikiBrowser</prf:BrowserName> <prf:BrowserVersion>1.0</prf:BrowserVersion> <prf:FramesCapable>Yes</prf:FramesCapable> <prf:HtmlVersion>4.1</prf:HtmlVersion> <prf:TablesCapable>Yes</prf:TablesCapable> <prf:XhtmlVersion>2.0</prf:XhtmlVersion> <prf:XhtmlModules> <rdf:Bag> <rdf:li>XHTML1-struct</rdf:li> <rdf:li>xhtml-basic10</rdf:li> </rdf:Bag> </prf:XhtmlModules> </rdf:Description> </prf:component> <prf:component> <rdf:Description rdf:ID="WapCharacteristics"> <rdf:type rdf:resource="https://www.openmobilealliance.org/tech/profiles/UAPROF/ccppschema-20021212#WapCharacteristics"/> <prf:WapDeviceClass>C</prf:WapDeviceClass> <prf:WapVersion>2.0</prf:WapVersion> <prf:WmlDeckSize>65535</prf:WmlDeckSize> <prf:WmlScriptLibraries> <rdf:Bag> <rdf:li>Lang</rdf:li> <rdf:li>Float</rdf:li> <rdf:li>String</rdf:li> <rdf:li>URL</rdf:li> <rdf:li>WMLBrowser</rdf:li> <rdf:li>Dialogs</rdf:li> </rdf:Bag> </prf:WmlScriptLibraries> <prf:WmlScriptVersion> <rdf:Bag> <rdf:li>1.2</rdf:li> </rdf:Bag> </prf:WmlScriptVersion> <prf:WmlVersion> <rdf:Bag> <rdf:li>1.3</rdf:li> </rdf:Bag> </prf:WmlVersion> <prf:WtaiLibraries> <rdf:Bag> <rdf:li>WTA.Public.makeCall</rdf:li> <rdf:li>WTA.Public.sendDTMF</rdf:li> <rdf:li>WTA.Public.addPBEntry</rdf:li> </rdf:Bag> </prf:WtaiLibraries> <prf:WtaVersion>1.1</prf:WtaVersion> <prf:DrmClass> <rdf:Bag> <rdf:li>ForwardLock</rdf:li> </rdf:Bag> </prf:DrmClass> <prf:OmaDownload>Yes</prf:OmaDownload> </rdf:Description> </prf:component> <prf:component> <rdf:Description rdf:ID="PushCharacteristics"> <rdf:type rdf:resource="https://www.openmobilealliance.org/tech/profiles/UAPROF/ccppschema-20021212#PushCharacteristics"/> <prf:Push-Accept> <rdf:Bag> <rdf:li>application/vnd.wap.wmlc</rdf:li> <rdf:li>application/vnd.wap.xhtml+xml</rdf:li> <rdf:li>multipart/mixed</rdf:li> <rdf:li>text/html</rdf:li> <rdf:li>text/plain</rdf:li> <rdf:li>text/vnd.wap.si</rdf:li> <rdf:li>text/vnd.wap.sl</rdf:li> <rdf:li>text/vnd.wap.wml</rdf:li> </rdf:Bag> </prf:Push-Accept> <prf:Push-Accept-Charset> <rdf:Bag> <rdf:li>ISO-8859-1</rdf:li> <rdf:li>UTF-8</rdf:li> </rdf:Bag> </prf:Push-Accept-Charset> <prf:Push-Accept-Encoding> <rdf:Bag> <rdf:li>base64</rdf:li> <rdf:li>quoted-printable</rdf:li> </rdf:Bag> </prf:Push-Accept-Encoding> <prf:Push-Accept-Language> <rdf:Seq> <rdf:li>de-DE</rdf:li> </rdf:Seq> </prf:Push-Accept-Language> <prf:Push-Accept-AppID> <rdf:Bag> <rdf:li>x-wap-application:wml.ua</rdf:li> <rdf:li>*</rdf:li> </rdf:Bag> </prf:Push-Accept-AppID> <prf:Push-MsgSize>30000</prf:Push-MsgSize> <prf:Push-MaxPushReq>5</prf:Push-MaxPushReq> </rdf:Description> </prf:component> <prf:component> <rdf:Description rdf:ID="MmsCharacteristics"> <rdf:type rdf:resource="https://www.openmobilealliance.org/tech/profiles/MMS/ccppschema-20050301-MMS1.2#MmsCharacteristics"/> <mms:MmsMaxMessageSize>102400</mms:MmsMaxMessageSize> <mms:MmsMaxImageResolution>640x480</mms:MmsMaxImageResolution> <mms:MmsCcppAccept> <rdf:Bag> <rdf:li>application/java-archive</rdf:li> <rdf:li>application/sdp</rdf:li> <rdf:li>application/smil</rdf:li> <rdf:li>audio/mid</rdf:li> <rdf:li>audio/midi</rdf:li> <rdf:li>image/gif</rdf:li> <rdf:li>image/jpeg</rdf:li> <rdf:li>image/jpg</rdf:li> <rdf:li>image/vnd.wap.wbmp</rdf:li> <rdf:li>text/plain</rdf:li> <rdf:li>text/vnd.sun.j2me.app-descriptor</rdf:li> <rdf:li>text/vnd.wap.wml</rdf:li> </rdf:Bag> </mms:MmsCcppAccept> <mms:MmsCcppAcceptCharSet> <rdf:Bag> <rdf:li>ISO-8859-1</rdf:li> <rdf:li>UTF-8</rdf:li> </rdf:Bag> </mms:MmsCcppAcceptCharSet> <mms:MmsCcppAcceptLanguage> <rdf:Bag> <rdf:li>de-DE</rdf:li> </rdf:Bag> </mms:MmsCcppAcceptLanguage> <mms:MmsCcppAcceptEncoding> <rdf:Bag> <rdf:li>base64</rdf:li> <rdf:li>quoted-printable</rdf:li> </rdf:Bag> </mms:MmsCcppAcceptEncoding> <mms:MmsVersion> <rdf:Bag> <rdf:li>1.0</rdf:li> </rdf:Bag> </mms:MmsVersion> </rdf:Description> </prf:component> </rdf:Description> </rdf:RDF>
Sekcja „HardwarePlatform” opisuje m.in. rozdzielczość wyświetlacza, profile Bluetooth, itd.
W zakresie „SoftwarePlatform” są m.in. wymienione są wszystkie typy MIME-Type akceptowane przez dany telefon.
Dla pojedynczych programów (np. Browser, MMS, Streaming) i serwisów (np. WAP-Push czy DRM) istnieją specjalne zakresy.