title: Mixing C functions in an Objective-C class
body: <p>I am writing an Objective-C class but it uses an API written in C. This is mostly fine as mixing C calls with Objective-C calls causes few problems.</p>
  
  <p>However one of the API call requires a call back method (example):</p>
  
  <pre><code>success = CFHostSetClient(host, MyCFHostClientCallBack, &amp;context);
  </code></pre>
  
  <p>Where <code>MyCFHostClientCallBack</code> is a C function defined like this:</p>
  
  <pre><code>static void MyCFHostClientCallBack(CFHostRef host, CFHostInfoType typeInfo, const CFStreamError *error, void *info);
  </code></pre>
  
  <ol>
  <li>Can/How do I call an Objective-C method in place of this?</li>
  <li>Can/Should I mix C functions with my Objective-C calls?</li>
  <li>How do I mix C functions with Objective-C methods?</li>
  </ol>