static int mms_plugin_get_optional_data (input_plugin_t *this_gen, void *data, int data_type) { mms_input_plugin_t *this = (mms_input_plugin_t *) this_gen; switch (data_type) { case INPUT_OPTIONAL_DATA_PREVIEW: switch (this->protocol) { case PROTOCOL_MMST: return mms_peek_header (this->mms, data, MAX_PREVIEW_SIZE); break; case PROTOCOL_MMSH: return mmsh_peek_header (this->mmsh, data, MAX_PREVIEW_SIZE); break; } break; default: return INPUT_OPTIONAL_UNSUPPORTED; break; } return INPUT_OPTIONAL_UNSUPPORTED; }
int mmsx_peek_header (mmsx_t *mmsx, char *data, int maxsize) { if(mmsx->connection) return mms_peek_header(mmsx->connection, data, maxsize); else return mmsh_peek_header(mmsx->connection_h, data, maxsize); }