[asterisk-commits] dvossel: branch group/aoc r251942 - in /team/group/aoc: include/asterisk/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Mar 12 11:10:00 CST 2010


Author: dvossel
Date: Fri Mar 12 11:09:56 2010
New Revision: 251942

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=251942
Log:
minor documenation tweaks

Modified:
    team/group/aoc/include/asterisk/aoc.h
    team/group/aoc/main/aoc.c

Modified: team/group/aoc/include/asterisk/aoc.h
URL: http://svnview.digium.com/svn/asterisk/team/group/aoc/include/asterisk/aoc.h?view=diff&rev=251942&r1=251941&r2=251942
==============================================================================
--- team/group/aoc/include/asterisk/aoc.h (original)
+++ team/group/aoc/include/asterisk/aoc.h Fri Mar 12 11:09:56 2010
@@ -26,7 +26,7 @@
 #ifndef _AST_AOC_H_
 #define _AST_AOC_H_
 
-/* AOC enums */
+/*! \brief Defines the currency multiplier for an aoc message. */
 enum ast_aoc_currency_multiplier {
 	AOC_MULT_ONETHOUSANDTH = 1,
 	AOC_MULT_ONEHUNDREDTH,
@@ -34,9 +34,12 @@
 	AOC_MULT_ONE,
 	AOC_MULT_TEN,
 	AOC_MULT_HUNDRED,
-	AOC_MULT_THOUSAND,
-};
-
+	AOC_MULT_THOUSAND, /* must remain the last item in enum */
+};
+
+/*! \brief Defines the billing id options for an aoc message.
+ *  \note  AOC-D is limited to NORMAL, REFERSE_CHARGE, and CREDIT_CARD.
+ */
 enum ast_aoc_billing_id {
 	AOC_BILLING_NA = 0,
 	AOC_BILLING_NORMAL,
@@ -46,7 +49,7 @@
 	AOC_BILLING_CALL_FWD_BUSY,
 	AOC_BILLING_CALL_FWD_NO_REPLY,
 	AOC_BILLING_CALL_DEFLECTION,
-	AOC_BILLING_CALL_TRANSFER, /* must remain last enum */
+	AOC_BILLING_CALL_TRANSFER, /* must remain last item in enum */
 };
 
 enum ast_aoc_type {
@@ -60,7 +63,7 @@
 	AOC_CHARGE_NA = 0,
 	AOC_CHARGE_FREE,
 	AOC_CHARGE_CURRENCY,
-	AOC_CHARGE_UNIT, /* make sure unit is always the last enum here */
+	AOC_CHARGE_UNIT, /* unit must remain the last item in enum */
 };
 
 enum ast_aoc_request {
@@ -76,15 +79,14 @@
 
 struct ast_aoc_unit_entry {
 	unsigned int amount;
-	unsigned int type; /* 1 - 16 */
-};
-
-/* AOC Payload Header. Holds all the encoded AOC data to pass on the wire */
+	unsigned int type; /* 1 - 16 by ETSI standard */
+};
+
+/* \brief AOC Payload Header. Holds all the encoded AOC data to pass on the wire */
 struct ast_aoc_encoded;
 
-/* Decoded AOC data */
+/* \brief Decoded AOC data. This value is used to set all the values in an AOC message before encoding.*/
 struct ast_aoc_decoded;
-
 
 /* \brief creates a ast_aoc_decode object of a specific message type
  *

Modified: team/group/aoc/main/aoc.c
URL: http://svnview.digium.com/svn/asterisk/team/group/aoc/main/aoc.c?view=diff&rev=251942&r1=251941&r2=251942
==============================================================================
--- team/group/aoc/main/aoc.c (original)
+++ team/group/aoc/main/aoc.c Fri Mar 12 11:09:56 2010
@@ -32,7 +32,7 @@
 #include "asterisk/_private.h"
 
 /* Encoded Payload Flags */
-#define AOC_ENCODED_TYPE_REQUEST    ((0 << 0) | (0 << 1))
+#define AOC_ENCODED_TYPE_REQUEST    (0 << 0)
 #define AOC_ENCODED_TYPE_D          (1 << 0)
 #define AOC_ENCODED_TYPE_E          (2 << 0)
 /* #define AOC_PAYLOAD_TYPE_S (3 << 0)  This is not yet supported, but reserve this for future use */
@@ -41,9 +41,9 @@
 #define AOC_ENCODED_REQUEST_D       (1 << 3)
 #define AOC_ENCODED_REQUEST_E       (1 << 4)
 
-#define AOC_ENCODED_CHARGE_NA       ((0 << 5) | (0 << 6))
-#define AOC_ENCODED_CHARGE_FREE     ((1 << 5) | (0 << 6))
-#define AOC_ENCODED_CHARGE_CURRENCY ((2 << 5) | (0 << 5))
+#define AOC_ENCODED_CHARGE_NA       (0 << 5)
+#define AOC_ENCODED_CHARGE_FREE     (1 << 5)
+#define AOC_ENCODED_CHARGE_CURRENCY (2 << 5)
 #define AOC_ENCODED_CHARGE_UNIT     (3 << 5)
 
 #define AOC_ENCODED_CHARGE_SUBTOTAL (1 << 7)
@@ -383,7 +383,7 @@
 		encoded->flags = AOC_ENCODED_TYPE_E;
 		break;
 	case AOC_REQUEST:
-		encoded->flags = AOC_ENCODED_TYPE_REQUEST; /* request turns off this bit */
+		encoded->flags = AOC_ENCODED_TYPE_REQUEST;
 	default:
 		break;
 	}




More information about the asterisk-commits mailing list