diff options
author | Björn Persson <bjorn@rombobjörn.se> | 2010-01-04 23:58:32 +0000 |
---|---|---|
committer | Björn Persson <bjorn@rombobjörn.se> | 2010-01-04 23:58:32 +0000 |
commit | cc0fd29fa3881823c6ce1c0f98e02919d22feb75 (patch) | |
tree | 0823a0aba2ce9ded23a67f6a75179644c10a5773 | |
parent | c362ad36de4002064ffbf0bd3c187c6857cc6795 (diff) |
Changed some identifiers to be consistent and spelt correctly.
-rw-r--r-- | milter_api.adb | 62 | ||||
-rw-r--r-- | milter_api.ads | 16 |
2 files changed, 39 insertions, 39 deletions
diff --git a/milter_api.adb b/milter_api.adb index f99235d..68f9bcb 100644 --- a/milter_api.adb +++ b/milter_api.adb @@ -19,7 +19,7 @@ package body Milter_API is use type String_Arrays.Pointer; - Version : constant Binding_Version_Type := (1, 1, 1); + Version : constant Binding_Version_Type := (1, 2, 1); function Binding_Version return Binding_Version_Type is begin @@ -41,8 +41,8 @@ package body Milter_API is Real_Connect_Handler : Connect_Handler; Real_Helo_Handler : Helo_Handler; - Real_Envelope_Sender_Handler : Envelope_Sender_Handler; - Real_Envelope_Recipient_Handler : Envelope_Recipient_Handler; + Real_Sender_Handler : Sender_Handler; + Real_Recipient_Handler : Recipient_Handler; Real_Header_Handler : Header_Handler; Real_End_Of_Headers_Handler : End_Of_Headers_Handler; Real_Body_Handler : Body_Handler; @@ -121,55 +121,55 @@ package body Milter_API is return Oops(E); end Helo_Relay; - type C_Envelope_Sender_Handler is access function + type C_Sender_Handler is access function (ctx : SMFICTX_Pointer; argv : String_Arrays.Pointer) return sfsistat; - pragma convention(C, C_Envelope_Sender_Handler); + pragma convention(C, C_Sender_Handler); - function Envelope_Sender_Relay + function Sender_Relay (ctx : SMFICTX_Pointer; argv : String_Arrays.Pointer) return sfsistat; - pragma convention(C, Envelope_Sender_Relay); + pragma convention(C, Sender_Relay); - function Envelope_Sender_Relay + function Sender_Relay (ctx : SMFICTX_Pointer; argv : String_Arrays.Pointer) return sfsistat is begin - return sfsistat(Real_Envelope_Sender_Handler + return sfsistat(Real_Sender_Handler (ctx, Value(argv.all), (Pointer => argv + 1))); exception when E : others => return Oops(E); - end Envelope_Sender_Relay; + end Sender_Relay; - type C_Envelope_Recipient_Handler is access function + type C_Recipient_Handler is access function (ctx : SMFICTX_Pointer; argv : String_Arrays.Pointer) return sfsistat; - pragma convention(C, C_Envelope_Recipient_Handler); + pragma convention(C, C_Recipient_Handler); - function Envelope_Recipient_Relay + function Recipient_Relay (ctx : SMFICTX_Pointer; argv : String_Arrays.Pointer) return sfsistat; - pragma convention(C, Envelope_Recipient_Relay); + pragma convention(C, Recipient_Relay); - function Envelope_Recipient_Relay + function Recipient_Relay (ctx : SMFICTX_Pointer; argv : String_Arrays.Pointer) return sfsistat is begin - return sfsistat(Real_Envelope_Recipient_Handler + return sfsistat(Real_Recipient_Handler (ctx, Value(argv.all), (Pointer => argv + 1))); exception when E : others => return Oops(E); - end Envelope_Recipient_Relay; + end Recipient_Relay; type C_Data_Handler is access function (ctx : SMFICTX_Pointer) @@ -378,8 +378,8 @@ package body Milter_API is (Name : String; Connected : Connect_Handler := null; Helo : Helo_Handler := null; - Envelope_Sender : Envelope_Sender_Handler := null; - Envelope_Recipient : Envelope_Recipient_Handler := null; + Sender : Sender_Handler := null; + Recipient : Recipient_Handler := null; Data : Data_Handler := null; Unknown_Command : Unknown_Command_Handler := null; Header : Header_Handler := null; @@ -391,8 +391,8 @@ package body Milter_API is May_Add_Headers : Boolean := False; May_Change_Or_Delete_Headers : Boolean := False; May_Replace_Body : Boolean := False; - May_Add_Recepients : Boolean := False; - May_Remove_Recepients : Boolean := False; + May_Add_Recipients : Boolean := False; + May_Remove_Recipients : Boolean := False; May_Quarantine : Boolean := False) is @@ -419,13 +419,13 @@ package body Milter_API is SMFIF_ADDHDRS * BI(May_Add_Headers) + SMFIF_CHGHDRS * BI(May_Change_Or_Delete_Headers) + SMFIF_CHGBODY * BI(May_Replace_Body) + - SMFIF_ADDRCPT * BI(May_Add_Recepients) + - SMFIF_DELRCPT * BI(May_Remove_Recepients) + + SMFIF_ADDRCPT * BI(May_Add_Recipients) + + SMFIF_DELRCPT * BI(May_Remove_Recipients) + SMFIF_QUARANTINE * BI(May_Quarantine); xxfi_connect : C_Connect_Handler := null; xxfi_helo : C_Helo_Handler := null; - xxfi_envfrom : C_Envelope_Sender_Handler := null; - xxfi_envrcpt : C_Envelope_Recipient_Handler := null; + xxfi_envfrom : C_Sender_Handler := null; + xxfi_envrcpt : C_Recipient_Handler := null; xxfi_header : C_Header_Handler := null; xxfi_eoh : C_End_Of_Headers_Handler := null; xxfi_body : C_Body_Handler := null; @@ -451,13 +451,13 @@ package body Milter_API is Real_Helo_Handler := Helo; Definition.xxfi_helo := Helo_Relay'Access; end if; - if Envelope_Sender /= null then - Real_Envelope_Sender_Handler := Envelope_Sender; - Definition.xxfi_envfrom := Envelope_Sender_Relay'Access; + if Sender /= null then + Real_Sender_Handler := Sender; + Definition.xxfi_envfrom := Sender_Relay'Access; end if; - if Envelope_Recipient /= null then - Real_Envelope_Recipient_Handler := Envelope_Recipient; - Definition.xxfi_envrcpt := Envelope_Recipient_Relay'Access; + if Recipient /= null then + Real_Recipient_Handler := Recipient; + Definition.xxfi_envrcpt := Recipient_Relay'Access; end if; if Header /= null then Real_Header_Handler := Header; diff --git a/milter_api.ads b/milter_api.ads index 3e37163..8a4facf 100644 --- a/milter_api.ads +++ b/milter_api.ads @@ -127,7 +127,7 @@ package Milter_API is -- called when the client sends a HELO or EHLO command -- corresponds to xxfi_helo - type Envelope_Sender_Handler is access function + type Sender_Handler is access function (Context : SMFICTX_Pointer; -- the opaque context handle Sender : String; -- the envelope sender address Arguments : Arguments_Handle) -- ESMTP arguments to the MAIL command @@ -135,7 +135,7 @@ package Milter_API is -- called once at the beginning of each message -- corresponds to xxfi_envfrom - type Envelope_Recipient_Handler is access function + type Recipient_Handler is access function (Context : SMFICTX_Pointer; -- the opaque context handle Recipient : String; -- an envelope recipient address Arguments : Arguments_Handle) -- ESMTP arguments to the RCPT command @@ -217,8 +217,8 @@ package Milter_API is (Name : String; Connected : Connect_Handler := null; Helo : Helo_Handler := null; - Envelope_Sender : Envelope_Sender_Handler := null; - Envelope_Recipient : Envelope_Recipient_Handler := null; + Sender : Sender_Handler := null; + Recipient : Recipient_Handler := null; Data : Data_Handler := null; Unknown_Command : Unknown_Command_Handler := null; Header : Header_Handler := null; @@ -230,8 +230,8 @@ package Milter_API is May_Add_Headers : Boolean := False; May_Change_Or_Delete_Headers : Boolean := False; May_Replace_Body : Boolean := False; - May_Add_Recepients : Boolean := False; - May_Remove_Recepients : Boolean := False; + May_Add_Recipients : Boolean := False; + May_Remove_Recipients : Boolean := False; May_Quarantine : Boolean := False); -- Register must be called exactly once before Main. It registers the -- callbacks and properties of the milter (calls smfi_register). @@ -354,13 +354,13 @@ package Milter_API is procedure Add_Recipient (Context : SMFICTX_Pointer; -- the opaque context handle Address : String); -- the new recipient's address - -- Adds a recepient address to the envelope of the current message (calls + -- Adds a recipient address to the envelope of the current message (calls -- smfi_addrcpt). procedure Delete_Recipient (Context : SMFICTX_Pointer; -- the opaque context handle Address : String); -- the recipient address to be removed - -- Removes the specified recepient address from the envelope of the current + -- Removes the specified recipient address from the envelope of the current -- message (calls smfi_delrcpt). procedure Replace_Body |