Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- The vapi file is found in util/uuid.vapi
- The library is compiles with :
- libw3cwidgets_la_VALAFLAGS = -v -g --library w3c-widgets -H w3c-widgets.h --pkg gio-2.0 --pkg libxml-2.0 --pkg gee-1.0 --pkg libsoup-2.4 --pkg uuid --vapidir ./util
- With *NO* error
- The program linking to the library is compile with:
- w3c_widgets_test_VALAFLAGS = -g --pkg gio-2.0 --pkg libxml-2.0 --pkg gee-1.0 --pkg libsoup-2.4 --vapidir $(top_builddir)/src/util --vapidir $(top_builddir)/src/ --pkg w3c-widgets --pkg libuuid
- Outputting this error because uuid.uuid.h is not included in my lib's public header, even if the symbols are attributed with [CCode(cheader_filename = "uuid/uuid.h", lower_case_cprefix = "uuid_", cprefix = "UUID_")]
- In file included from w3c_widgets_test.c:10:0:
- ../src/w3c-widgets.h:639:34: erreur: ‘UUID_VARIANT_NCS’ undeclared here (not in a function)
- ../src/w3c-widgets.h:640:34: erreur: ‘UUID_VARIANT_DCE’ undeclared here (not in a function)
- ../src/w3c-widgets.h:641:40: erreur: ‘UUID_VARIANT_MICROSOFT’ undeclared here (not in a function)
- ../src/w3c-widgets.h:642:36: erreur: ‘UUID_VARIANT_OTHER’ undeclared here (not in a function)
- ../src/w3c-widgets.h:646:32: erreur: ‘UUID_TYPE_DCE_TIME’ undeclared here (not in a function)
- ../src/w3c-widgets.h:647:34: erreur: ‘UUID_TYPE_DCE_RANDOM’ undeclared here (not in a function)
- */
- [CCode(cheader_filename = "uuid/uuid.h", lower_case_cprefix = "uuid_", cprefix = "UUID_")]
- namespace Native.LibUUID {
- // Constants
- [CCode(cheader_filename = "uuid/uuid.h", cprefix="UUID_VARIANT_")]
- public enum Variant {
- [CCode(cheader_filename = "uuid/uuid.h", cprefix="UUID_VARIANT_")]
- NCS,
- [CCode(cheader_filename = "uuid/uuid.h", cprefix="UUID_VARIANT_")]
- DCE,
- [CCode(cheader_filename = "uuid/uuid.h", cprefix="UUID_VARIANT_")]
- MICROSOFT,
- [CCode(cheader_filename = "uuid/uuid.h", cprefix="UUID_VARIANT_")]
- OTHER
- }
- [CCode(cheader_filename = "uuid/uuid.h", cprefix="UUID_TYPE_DCE_")]
- public enum Type {
- [CCode(cheader_filename = "uuid/uuid.h", cprefix="UUID_TYPE_DCE_")]
- TIME,
- [CCode(cheader_filename = "uuid/uuid.h", cprefix="UUID_TYPE_DCE_")]
- RANDOM
- }
- [CCode(cname = "time_t")]
- public struct time_t : int{}
- [CCode(cname = "struct timeval")]
- public struct timeval {
- public int tv_sec;
- public int tv_usec;
- }
- [CCode(cname = "uuid_t", cheader_filename = "uuid/uuid.h")]
- public struct UUID : char {}
- [CCode(cheader_filename = "uuid/uuid.h")]
- public void clear(UUID uu);
- [CCode(cheader_filename = "uuid/uuid.h")]
- public void copy(UUID dest, UUID src);
- [CCode(cheader_filename = "uuid/uuid.h")]
- public void generate(UUID outp);
- [CCode(cheader_filename = "uuid/uuid.h")]
- public void generate_random(UUID outp);
- [CCode(cheader_filename = "uuid/uuid.h")]
- public void generate_time(UUID outp);
- [CCode(cheader_filename = "uuid/uuid.h")]
- public void unparse(UUID uu,
- [CCode(array_length = false, array_null_terminated = false)]
- char[] outp);
- [CCode(cheader_filename = "uuid/uuid.h")]
- public void unparse_upper(UUID uu,
- [CCode(array_length = false, array_null_terminated = false)]
- char[] outp);
- [CCode(cheader_filename = "uuid/uuid.h")]
- public void unparse_lower(UUID uu,
- [CCode(array_length = false, array_null_terminated = false)]
- char[] outp);
- [CCode(cheader_filename = "uuid/uuid.h")]
- public int compare(UUID uu1, UUID uu2);
- [CCode(cheader_filename = "uuid/uuid.h")]
- public int is_null(UUID uu);
- [CCode(cheader_filename = "uuid/uuid.h")]
- public int parse(string uu_in, UUID outp);
- [CCode(cheader_filename = "uuid/uuid.h")]
- public int type(UUID uu);
- [CCode(cheader_filename = "uuid/uuid.h")]
- public int variant(UUID uu);
- [CCode(cheader_filename = "uuid/uuid.h")]
- public time_t time(UUID uu, out timeval TimeInfo);
- [CCode(cname = "ctime_r", cheader_filename = "time.h")]
- public unowned string unixtime_to_string(ref time_t secs, [CCode(array_length = false,array_null_terminated = false)]
- char[] ret);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement