📄 wap.int
字号:
(Id:$09; Text:'x-wap-application:emn.ua'), // This ID is used for Email Notification (EMN) User Agent. Requested by the WAP WAG PUSH DC.
(Id:$0A; Text:'x-wap-application:wv.ua'), // This ID is used for Wireless Village (EMN) User Agent. Requested by Wireless Village.
(Id:$8000; Text:'x-wap-microsoft:localcontent.ua'), // David Hitchman is an application to receive pages to be stored and access locally. These are not wta channels. Usually the pages will be downloaded as multi-part mime.
(Id:$8001; Text:'x-wap-microsoft:IMclient.ua'), // David Hitchman is an application which will act as an instant messaging client on a phone.
(Id:$8002; Text:'x-wap-docomo:imode.mail.ua'), // Hidetoshi Ueno is used to identify the i-mode mail application user agent on a mobile device.
(Id:$8003; Text:'x-wap-docomo:imode.mr.ua'), // Hidetoshi Ueno is used to identify the i-mode message request application user agent on a mobile device.
(Id:$8004; Text:'x-wap-docomo:imode.mf.ua'), // Hidetoshi Ueno is used to identify the i-mode message free application user agent on a mobile device.
(Id:$8005; Text:'x-motorola:location.ua'), // Joby James is an application that receives message notifications from the location server.
(Id:$8006; Text:'x-motorola:now.ua'), // Joby James is an application that presents personalized information to the user.
(Id:$8007; Text:'x-motorola:otaprov.ua'), // Joby James is an application that receives provisioning messages from the server.
(Id:$8008; Text:'x-motorola:browser.ua'), // Joby James is a web browsing application.
(Id:$8009; Text:'x-motorola:splash.ua'), // Randi Faris is an application that receives splash screen content from the server.
(Id:$800B; Text:'x-wap-nai:mvsw.command'), // Martin Fallenstedt is used by administrators to issue commands to individual devices
(Id:$8010; Text:'x-wap-openwave:iota.ua'), // Philip Ryan is used for application dispatching to the IP-based OTA Provisioning Service Agent in the handling of IOTA notfications using WAP Push.
(Id:$9000; Text:'x-wap-docomo:imode.mail2.ua'), // Hidetoshi Ueno is used to identify the secondary i-mode mail application user agent on a mobile device.
(Id:$9001; Text:'x-oma-nec:otaprov.ua'), // Hirofumi Miyake is used for application dispatching to the SMS/IP-based OTA Provisioning Service Agent in the handling of using WAP Push.
(Id:$9002; Text:'x-oma-nokia:call.ua'), // Mikko Sahinoja is an identifier for service that enables direct-call over a mobile network.
(Id:$9003; Text:'x-oma-coremobility:sqa.ua'), // Yishai Lerner is an application for collecting and submitting usage and performance data.
(Id:$9004; Text:'x-oma-docomo:doja.jam.ua'), // Hidetochi Ueno is used to identify the java application user agent on a mobile device.
(Id:$9010; Text:'x-oma-nokia:sip.ua') // Eero Kaappa is an identifier for Sip settings provisionning.
);
OMNACharsets: array[1..2] of TWAPEnumeration = (
(Id:$3; Text:'US-ASCII'),
(Id:$6A; Text:'UTF-8')
);
const
xmlaoDateTime = $01;
type
TXMLAttrib = class;
TStringTable = class(TObjectList)
private
function GetString(Index: Integer): WideString;
procedure SetString(Index: Integer; const Value: WideString);
function GetMandatory(Index: Integer): Boolean;
procedure SetMandatory(Index: Integer; const Value: Boolean);
public
property Strings[Index: Integer]: WideString read GetString write SetString; default;
property Mandatories[Index: Integer]: Boolean read GetMandatory write SetMandatory;
function Add(const S: WideString; aMandatory: Boolean = False): Integer;
function IndexOf(const S: WideString): Integer;
end;
TXMLValue = class(TObjectList)
private
function GetAsString: WideString; virtual;
procedure SetAsString(const Value: WideString);
function GetAsDateTime: TDateTime;
procedure SetAsDateTime(const Value: TDateTime);
public
property asString: WideString read GetAsString write SetAsString;
property asDateTime: TDateTime read GetAsDateTime write SetAsDateTime;
procedure AddString(const S: WideString);
procedure AddFromStream(St: TStream; aLen: Longint);
end;
TXMLElement = class(TXMLValue)
private
fAttribs: TObjectList;
fName: string;
fParent: TXMLElement;
public
constructor Create; virtual;
destructor Destroy; override;
procedure Clear; reintroduce;
property Name: string read fName write fName;
property Attribs: TObjectList read fAttribs;
property Parent: TXMLElement read fParent write fParent;
function ElementCount(const aName: string): Integer;
function ElementFind(const aName: string; aIdx: Integer): TXMLElement;
function ElementGet(const aName: string; aIdx: Integer): TXMLElement;
function ElementAdd(const aName: string): TXMLElement; overload;
function ElementAdd(const aName: string; aValue: WideString): TXMLElement; overload;
function ElementAdd(const aName: string; aValue: TStream): TXMLElement; overload;
function AttribCount(const aName: string): Integer;
function AttribFind(const aName: string; aIdx: Integer): TXMLAttrib;
function AttribGet(const aName: string; aIdx: Integer): TXMLAttrib;
function AttribAdd(const aName: string; aValue: WideString): TXMLAttrib; overload;
function AttribAdd(const aName: string; aValue: TStream): TXMLAttrib; overload;
function AttribAdd(const aName: string; aValue: TDateTime): TXMLAttrib; overload;
end;
TXMLText = class
private
fText: WideString;
public
property Text: WideString read fText write fText;
end;
TXMLText2 = class(TXMLText)
private
Mandatory: Boolean;
end;
TXMLText3 = class(TXMLText)
private
fKind: Byte;
fId: TMultiByte;
end;
TXMLStream = class
private
fStream: TStringStream;
function GetAsDateTime: TDateTime;
procedure SetAsDateTime(const Value: TDateTime);
public
constructor Create;
destructor Destroy; override;
property Stream: TStringStream read fStream;
property asDateTime: TDateTime read GetAsDateTime write SetAsDateTime;
end;
TXMLAttrib = class(TXMLValue)
private
fName: string;
fOptions: Integer;
fOwner: TXMLElement;
function GetAsString: WideString; override;
public
property Name: string read fName write fName;
property Options: Integer read fOptions write fOptions;
property Owner: TXMLElement read fOwner write fOwner;
end;
TXMLPI = class(TXMLAttrib)
end;
TWapDocument = class
private
fVersion: Byte;
fPublicId: string;
fStringTable: TStringTable;
fCharSet: TMultiByte; // MIBEnum, http://www.iana.org/assignments/character-sets
fBody: TXMLElement;
fTagCodeSpace, fAttribCodeSpace: Byte;
procedure SetWBXMLData(const Value: TString);
function GetWBXMLData: TString;
function GetXMLData: TString;
procedure ReadWBXMLElement(St: TStream; aParent: TXMLElement; const aTagSpace: TWBXMLTagSpaceEnumerationOpenArray; const aAttribSpace: TWBXMLAttribSpaceEnumerationOpenArray; const aValueSpace: TWBXMLValueSpaceEnumerationOpenArray);
procedure ReadWBXMLAttrib(St: TStream; aAttr: TXMLAttrib; const aAttribSpace: TWBXMLAttribSpaceEnumerationOpenArray; const aValueSpace: TWBXMLValueSpaceEnumerationOpenArray);
function ReadWBXMLSwitchPage(St: TStream; var aCodeSpace: Byte): Boolean;
function ReadWBXMLPI(St: TStream; aParent: TXMLElement; const aAttribSpace: TWBXMLAttribSpaceEnumerationOpenArray; const aValueSpace: TWBXMLValueSpaceEnumerationOpenArray): Boolean;
function ReadWBXMLStringTableIndex(St: TStream): WideString;
function ReadWBXMLContent(St: TStream; aCont: TXMLValue): Boolean;
procedure WriteWBXMLElement(St: TStream; aElem: TXMLElement; const aTagSpace: TWBXMLTagSpaceEnumerationOpenArray; const aAttribSpace: TWBXMLAttribSpaceEnumerationOpenArray; const aValueSpace: TWBXMLValueSpaceEnumerationOpenArray);
procedure WriteWBXMLAttrib(St: TStream; aAttr: TXMLAttrib; const aAttribSpace: TWBXMLAttribSpaceEnumerationOpenArray; const aValueSpace: TWBXMLValueSpaceEnumerationOpenArray);
procedure WriteWBXMLSwitchPage(St: TStream; aCodeSpace: Byte; var aCurCodeSpace: Byte);
procedure WriteWBXMLStringTableIndex(St: TStream; const S: WideString);
procedure WriteWBXMLText(St: TStream; const S: WideString);
procedure FindValueSpaces(St: TStringTable; const S: WideString; const aValueSpace: TWBXMLValueSpaceEnumerationOpenArray);
procedure PrepareStringTable(const aTagSpace: TWBXMLTagSpaceEnumerationOpenArray; const aAttribSpace: TWBXMLAttribSpaceEnumerationOpenArray; const aValueSpace: TWBXMLValueSpaceEnumerationOpenArray);
function MB2WideString(MB: TMultiByte): WideString;
function ReadWBXMLString(St: TStream): WideString;
procedure WriteWBXMLString(St: TStream; const S: WideString);
protected
public
constructor Create; virtual;
destructor Destroy; override;
procedure Clear;
property Version: Byte read fVersion write fVersion;
property PublicId: string read fPublicId write fPublicId;
property CharSet: TMultiByte read fCharSet write fCharSet;
property Body: TXMLElement read fBody;
property WBXMLData: TString read GetWBXMLData write SetWBXMLData;
property XMLData: TString read GetXMLData;
procedure ReadWBXMLFromStream(St: TStream);
procedure WriteWBXMLToStream(St: TStream);
procedure WriteXMLToStream(St: TStream);
class function TestByte(St: TStream; B: Byte): Boolean;
class function ReadByte(S: TStream): Byte;
class function ReadMultiByte(S: TStream): LongWord;
class procedure WriteByte(S: TStream; B: Byte);
class procedure WriteMultiByte(S: TStream; B: LongWord);
class function Id2Str(aId: TMultiByte; const aTbl: array of TWAPEnumeration; var aStr: string): Boolean;
class function Str2Id(const aStr: string; const aTbl: array of TWAPEnumeration; var aId: TMultiByte): Boolean;
class function FormatDateTime(aDT: TDateTime): string;
end;
TWapServiceClass = class of TWapService;
TWapService = class
protected
procedure ReadFromWapDocument(aDoc: TWapDocument); virtual; abstract;
procedure WriteToWapDocument(aDoc: TWapDocument); virtual; abstract;
public
constructor Create; virtual;
class function CreateFrom(aDoc: TWapDocument): TWapService; overload;
procedure AssignToWapDocument(aDoc: TWapDocument);
end;
TWapCacheOperation = class(TWapService)
private
fObjectURLs: TStrings;
fServiceURLs: TStrings;
protected
procedure ReadFromWapDocument(aDoc: TWapDocument); override;
procedure WriteToWapDocument(aDoc: TWapDocument); override;
public
constructor Create; override;
destructor Destroy; override;
property ServiceURLs: TStrings read fServiceURLs write fServiceURLs;
property ObjectURLs: TStrings read fObjectURLs write fObjectURLs;
end;
const
wapsiaSignalNone = 0;
wapsiaSignalLow = 1;
wapsiaSignalMedium{default} = 2;
wapsiaSignalHigh = 3;
wapsiaDelete = 4;
type
TWapServiceIndication = class(TWapService)
private
fCaption: WideString;
fHref: string;
fSIId: string;
fCreated: TDateTime;
fSIExpires: TDateTime;
fAction: Byte;
//fInfoItems: TStrings;
protected
procedure ReadFromWapDocument(aDoc: TWapDocument); override;
procedure WriteToWapDocument(aDoc: TWapDocument); override;
public
constructor Create; override;
destructor Destroy; override;
property Caption: WideString read fCaption write fCaption;
property Href: string read fHref write fHref;
property SIId: string read fSIId write fSIId;
property Created: TDateTime read fCreated write fCreated;
property SIExpires: TDateTime read fSIExpires write fSIExpires;
//property InfoItems: TStrings read fInfoItems write fInfoItems;
property Action: Byte read fAction write fAction;
end;
const
wapslaExecuteLow{default} = 0;
wapslaExecuteHigh = 1;
wapslaCache = 2;
type
TWapServiceLoad = class(TWapService)
private
fHref: string;
fAction: Byte;
protected
procedure ReadFromWapDocument(aDoc: TWapDocument); override;
procedure WriteToWapDocument(aDoc: TWapDocument); override;
public
property Href: string read fHref write fHref;
property Action: Byte read fAction write fAction;
end;
implementation
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -