ejabberd - Comments for "ejabberd module developers and public APIs" https://www.ejabberd.im/node/4390 en Thanks https://www.ejabberd.im/node/4390#comment-56799 <p>Thanks very much!!</p> Tue, 09 Nov 2010 10:26:24 +0000 emofine comment 56799 at https://www.ejabberd.im emofine https://www.ejabberd.im/node/4390#comment-56797 <div class="quote-msg"> <div class="quote-author"><em>emofine</em> wrote:</div> <h2>ejabberd_local:route_iq/4</h2> <p>Some XEP-type modules, like mod_ping, use this function, suggesting that it is a public API, </p></div> <p>Technically speaking, all exported functions can be used by other erlang modules. Even if a function isn't used in ejabberd itself, it may be used in other modules of ejabberd-modules SVN, other public modules, or private modules. So, all exported functions are modified with care to maintain backwards API compatibility.</p> <div class="quote-msg"> <div class="quote-author"><em>emofine</em> wrote:</div> <p>but it is not documented (I am sure this is true of some other APIs). </p></div> <p>In fact, there are still more functions exported and undocumented, that exported and documented.</p> <div class="quote-msg"> <div class="quote-author"><em>emofine</em> wrote:</div> <p>May we module developers use this undocumented-but-may-be-documented-in-the-future-API,<br /> or do we have to duplicate the functionality? </p></div> <p>Use this and any other exported function, even if it isn't documented yet.</p> <p>The only problem would be if the function API changes in the future in an incompatible way, and you miss the comment in the git log or in the release notes. But at least in the case of ejabberd_local, which is an old and stable part of ejabberd, API changes are very improbable to happen.</p> Mon, 08 Nov 2010 16:09:46 +0000 mfoss comment 56797 at https://www.ejabberd.im