[pedevel] Re: BEOS:FILE_TYPES

  • From: Rainer Riedl <mlist@xxxxxxxxx>
  • To: pedevel@xxxxxxxxxxxxx
  • Date: Sun, 15 May 2005 18:01:57 +0200

> Do you really have to know? Can't you just add a type for messages and
> just call BMessage.Flatten() on them yourself?

Hmm, no, I then had to create a new type 'message' (like integer, cstring, 
...) in rez.

The type definition of "Application Version Info" looks like this in rez:

        type 'APPV' {
                unsigned longint;                       // App: major
                unsigned longint;                       // App: middle
                unsigned longint;                       // App: minor
                unsigned longint
                        Development             = 0,
                        Alpha                   = 1,
                        Beta                    = 2,
                        Gamma                   = 3,
                        GoldenMaster    = 4,
                        Final                   = 5;    // App: variety
                unsigned longint;                       // App: internal
                cstring[64];                            // App: short_info
                cstring[256];                           // App: long_info
                cstring[340];                           // Suite...
        };

The flattened message looks something like that this (pseudo code):

        type 'MSGG' {
                "1B0F"
                ...
                "types"
                ...
                array(
                        pstring \\ first the length, then the string, somehow 
padded
                )
        }

In rc it looks like this:

        resource file_types message 
        { 
            "types" = "text/plain", 
            "types" = "text" 
        };


Perhaps I have a look at the rez code, perhaps it is easier an useful in 
the future

Other related posts: