title: Vala error "unknown type name" using enum from camel
body: <p>I am writing this code in Vala, using Camel</p>
  
  <pre><code>using Camel;
  [...]
  MimeParser par = new MimeParser();
  [...]
  par.push_state( MimeParserState.MULTIPART, boundary );
  </code></pre>
  
  <p>I downloaded the <strong>camel-1.2.vapi</strong> from github vala-girs <a href="https://github.com/nemequ/vala-girs/tree/master/vala/vapi" rel="nofollow noreferrer">(this link)</a>, put it in a <strong>vapi</strong> subdirectory and compiled with</p>
  
  <pre><code>valac --vapidir=vapi --includedir=/usr/include/evolution-data-server/camel --pkg camel-1.2 --pkg posix --target-glib=2.32 -o prog prog.vala -X -lcamel-1.2
  </code></pre>
  
  <p>Compiling I get this error:</p>
  
  <pre><code>error: unknown type name "CamelMimeParserState"
   const gchar* camel_mime_parser_state_to_string (CamelMimeParserState self);
  </code></pre>
  
  <p>Looking the C output code I see that the CamelMimeParserState type is used several times <strong>but it is never defined</strong>. It should be a simple <strong>enum</strong> because the <strong>camel-1.2.vapi</strong> file says:</p>
  
  <pre><code>[CCode (cheader_filename = "camel/camel.h", cprefix = "CAMEL_MIME_PARSER_STATE_", has_type_id = false)]
  public enum MimeParserState {
              INITIAL,
              PRE_FROM,
              FROM,
              HEADER,
              BODY,
              MULTIPART,
              MESSAGE,
              PART,
              END,
              EOF,
              PRE_FROM_END,
              FROM_END,
              HEADER_END,
              BODY_END,
              MULTIPART_END,
              MESSAGE_END
      }
  </code></pre>
  
  <p>So why doesn't the C output code simply use an enum as the vapi file says (described by <strong>cprefix CAMEL_MIME_PARSER_STATE_</strong>)?</p>
  
  <p>Is there an error in the .vapi file?</p>