return TRUE;
}
-static gboolean encode_scts(const struct sms_scts *in, unsigned char *pdu,
+gboolean sms_encode_scts(const struct sms_scts *in, unsigned char *pdu,
int *offset)
{
guint timezone;
set_octet(pdu, offset, vp->relative);
return TRUE;
case SMS_VALIDITY_PERIOD_FORMAT_ABSOLUTE:
- return encode_scts(&vp->absolute, pdu, offset);
+ return sms_encode_scts(&vp->absolute, pdu, offset);
case SMS_VALIDITY_PERIOD_FORMAT_ENHANCED:
/* TODO: Write out proper enhanced VP structure */
memcpy(pdu + *offset, vp->enhanced, 7);
set_octet(pdu, offset, in->pid);
set_octet(pdu, offset, in->dcs);
- if (encode_scts(&in->scts, pdu, offset) == FALSE)
+ if (sms_encode_scts(&in->scts, pdu, offset) == FALSE)
return FALSE;
set_octet(pdu, offset, in->udl);
set_octet(pdu, offset, in->pi);
- if (!encode_scts(&in->scts, pdu, offset))
+ if (!sms_encode_scts(&in->scts, pdu, offset))
return FALSE;
if (in->pi & 0x1)
set_octet(pdu, offset, in->pi);
- if (!encode_scts(&in->scts, pdu, offset))
+ if (!sms_encode_scts(&in->scts, pdu, offset))
return FALSE;
if (in->pi & 0x1)
if (!sms_encode_address_field(&in->raddr, FALSE, pdu, offset))
return FALSE;
- if (!encode_scts(&in->scts, pdu, offset))
+ if (!sms_encode_scts(&in->scts, pdu, offset))
return FALSE;
- if (!encode_scts(&in->dt, pdu, offset))
+ if (!sms_encode_scts(&in->dt, pdu, offset))
return FALSE;
octet = in->st;
gboolean sms_decode_scts(const unsigned char *pdu, int len,
int *offset, struct sms_scts *out);
+gboolean sms_encode_scts(const struct sms_scts *in, unsigned char *pdu,
+ int *offset);
+
int sms_udl_in_bytes(guint8 ud_len, guint8 dcs);
time_t sms_scts_to_time(const struct sms_scts *scts, struct tm *remote);