twitter-archive / cloudhopper-smpp

Efficient, scalable, and flexible Java implementation of the Short Messaging Peer to Peer Protocol (SMPP)
Other
382 stars 356 forks source link

Add alias to REGISTERED_DELIVERY_SMSC_RECEIPT_* #108

Closed pgoergler closed 9 years ago

pgoergler commented 9 years ago

For esm_class the bits 1 & 0 are for the Message Mode (Datagram, Transaction or Store and forward) So in order to follow the protocol documentation name for em_class bits 1 & 0 why not add those constants ?

ESM_CLASS_MM_MASK = REGISTERED_DELIVERY_SMSC_RECEIPT_MASK; ESM_CLASS_MM_DEFAULT = REGISTERED_DELIVERY_SMSC_RECEIPT_NOT_REQUESTED; ESM_CLASS_MM_DATAGRAM = REGISTERED_DELIVERY_SMSC_RECEIPT_REQUESTED; ESM_CLASS_MM_TRANSACTION = REGISTERED_DELIVERY_SMSC_RECEIPT_ON_FAILURE; ESM_CLASS_MM_STORE_FORWARD = REGISTERED_DELIVERY_SMSC_RECEIPT_ON_SUCCESS;

jjlauer commented 9 years ago

The registered_delivery flag is its own field per the specs. Why would you set these constants as aliases? I could see the ESM constants standing by themselves, but I'm not sure why you set them as equivalent.

pgoergler commented 9 years ago

In SMPP3.4 documentation (Section 2.10 or 5.2.12), it's about the esm_class field value. And the 2 first bits of esm_class are about messaging mode, i thought REGISTERED_DELIVERYSMSC* was for that purpose, my bad.

I'll fix it to set real values