+int funambol_isAllowedByPrefs(long configMsgNum) {
+ // Do a simple string search to see if 'funambol' is selected as the
+ // type. This string would be at the very top of the message contents.
+ if (configMsgNum == -1) {
+ return -1;
+ }
+ struct CtdlMessage *prefMsg;
+ prefMsg = CtdlFetchMessage(configMsgNum, 1);
+ char *msgContents = prefMsg->cm_fields['M'];
+ return strncasecmp(msgContents, FUNAMBOL_CONFIG_TEXT, strlen(FUNAMBOL_CONFIG_TEXT));
+}