diff --git a/OpenMetaverse.StructuredData/StructuredData.cs b/OpenMetaverse.StructuredData/StructuredData.cs index 8a894dda..2f58ce71 100644 --- a/OpenMetaverse.StructuredData/StructuredData.cs +++ b/OpenMetaverse.StructuredData/StructuredData.cs @@ -1114,8 +1114,9 @@ namespace OpenMetaverse.StructuredData public partial class OSDParser { const string LLSD_BINARY_HEADER = ""; - const string LLSD_XML_HEADER = ""; - const string LLSD_XML_ALT_HEADER = ""; + const string LLSD_XML_HEADER = ""; + const string LLSD_XML_ALT_HEADER = ""; public static OSD Deserialize(byte[] data) { @@ -1123,9 +1124,7 @@ namespace OpenMetaverse.StructuredData if (header.StartsWith(LLSD_BINARY_HEADER)) return DeserializeLLSDBinary(data); - else if (header.StartsWith(LLSD_XML_HEADER)) - return DeserializeLLSDXml(data); - else if (header.StartsWith(LLSD_XML_ALT_HEADER)) + else if (header.StartsWith(LLSD_XML_HEADER) || header.StartsWith(LLSD_XML_ALT_HEADER) || header.StartsWith(LLSD_XML_ALT2_HEADER)) return DeserializeLLSDXml(data); else return DeserializeJson(Encoding.UTF8.GetString(data)); @@ -1142,9 +1141,7 @@ namespace OpenMetaverse.StructuredData if (header.StartsWith(LLSD_BINARY_HEADER)) return DeserializeLLSDBinary(stream); - else if (header.StartsWith(LLSD_XML_HEADER)) - return DeserializeLLSDXml(stream); - else if (header.StartsWith(LLSD_XML_ALT_HEADER)) + else if (header.StartsWith(LLSD_XML_HEADER) || header.StartsWith(LLSD_XML_ALT_HEADER) || header.StartsWith(LLSD_XML_ALT2_HEADER)) return DeserializeLLSDXml(stream); else return DeserializeJson(stream); diff --git a/OpenMetaverse/Messages/CableBeachHelpers.cs b/OpenMetaverse/Messages/CableBeachHelpers.cs index c8d1f00f..d22b66ca 100644 --- a/OpenMetaverse/Messages/CableBeachHelpers.cs +++ b/OpenMetaverse/Messages/CableBeachHelpers.cs @@ -5,6 +5,8 @@ namespace OpenMetaverse.Messages.CableBeach { public static class CableBeachUtils { + // The following section is based on the table at https://wiki.secondlife.com/wiki/Asset_System + #region SL / file extension / content-type conversions public static string SLAssetTypeToContentType(int assetType) @@ -12,39 +14,29 @@ namespace OpenMetaverse.Messages.CableBeach switch (assetType) { case 0: - return "image/jp2"; + return "image/x-j2c"; case 1: return "application/ogg"; case 2: - return "application/x-metaverse-callingcard"; + return "application/vnd.ll.callingcard"; case 3: - return "application/x-metaverse-landmark"; + return "application/vnd.ll.landmark"; case 5: - return "application/x-metaverse-clothing"; + return "application/vnd.ll.clothing"; case 6: - return "application/x-metaverse-primitive"; + return "application/vnd.ll.primitive"; case 7: - return "application/x-metaverse-notecard"; - case 8: - return "application/x-metaverse-folder"; + return "application/vnd.ll.notecard"; case 10: - return "application/x-metaverse-lsl"; + return "application/vnd.ll.lsltext"; case 11: - return "application/x-metaverse-lso"; - case 12: - return "image/tga"; + return "application/vnd.ll.lslbyte"; case 13: - return "application/x-metaverse-bodypart"; - case 17: - return "audio/x-wav"; - case 19: - return "image/jpeg"; + return "application/vnd.ll.bodypart"; case 20: - return "application/x-metaverse-animation"; + return "application/vnd.ll.animation"; case 21: - return "application/x-metaverse-gesture"; - case 22: - return "application/x-metaverse-simstate"; + return "application/vnd.ll.gesture"; default: return "application/octet-stream"; } @@ -54,38 +46,30 @@ namespace OpenMetaverse.Messages.CableBeach { switch (contentType) { - case "image/jp2": + case "image/x-j2c": return 0; case "application/ogg": return 1; - case "application/x-metaverse-callingcard": + case "application/vnd.ll.callingcard": return 2; - case "application/x-metaverse-landmark": + case "application/vnd.ll.landmark": return 3; - case "application/x-metaverse-clothing": + case "application/vnd.ll.clothing": return 5; - case "application/x-metaverse-primitive": + case "application/vnd.ll.primitive": return 6; - case "application/x-metaverse-notecard": + case "application/vnd.ll.notecard": return 7; - case "application/x-metaverse-lsl": + case "application/vnd.ll.lsltext": return 10; - case "application/x-metaverse-lso": + case "application/vnd.ll.lslbyte": return 11; - case "image/tga": - return 12; - case "application/x-metaverse-bodypart": + case "application/vnd.ll.bodypart": return 13; - case "audio/x-wav": - return 17; - case "image/jpeg": - return 19; - case "application/x-metaverse-animation": + case "application/vnd.ll.animation": return 20; - case "application/x-metaverse-gesture": + case "application/vnd.ll.gesture": return 21; - case "application/x-metaverse-simstate": - return 22; default: return -1; } @@ -95,32 +79,28 @@ namespace OpenMetaverse.Messages.CableBeach { switch (contentType) { - case "image/jp2": - case "image/tga": - case "image/jpeg": + case "image/x-j2c": return (int)InventoryType.Texture; case "application/ogg": - case "audio/x-wav": return (int)InventoryType.Sound; - case "application/x-metaverse-callingcard": + case "application/vnd.ll.callingcard": return (int)InventoryType.CallingCard; - case "application/x-metaverse-landmark": + case "application/vnd.ll.landmark": return (int)InventoryType.Landmark; - case "application/x-metaverse-clothing": - case "application/x-metaverse-bodypart": + case "application/vnd.ll.clothing": + case "application/vnd.ll.bodypart": return (int)InventoryType.Wearable; - case "application/x-metaverse-primitive": + case "application/vnd.ll.primitive": return (int)InventoryType.Object; - case "application/x-metaverse-notecard": + case "application/vnd.ll.notecard": return (int)InventoryType.Notecard; - case "application/x-metaverse-lsl": - case "application/x-metaverse-lso": + case "application/vnd.ll.lsltext": + case "application/vnd.ll.lslbyte": return (int)InventoryType.LSL; - case "application/x-metaverse-animation": + case "application/vnd.ll.animation": return (int)InventoryType.Animation; - case "application/x-metaverse-gesture": + case "application/vnd.ll.gesture": return (int)InventoryType.Gesture; - case "application/x-metaverse-simstate": default: return (int)InventoryType.Unknown; } @@ -130,40 +110,32 @@ namespace OpenMetaverse.Messages.CableBeach { switch (contentType) { - case "image/jp2": + case "image/x-j2c": return "texture"; case "application/ogg": return "ogg"; - case "application/x-metaverse-callingcard": + case "application/vnd.ll.callingcard": return "callingcard"; - case "application/x-metaverse-landmark": + case "application/vnd.ll.landmark": return "landmark"; - case "application/x-metaverse-clothing": + case "application/vnd.ll.clothing": return "clothing"; - case "application/x-metaverse-primitive": + case "application/vnd.ll.primitive": return "primitive"; - case "application/x-metaverse-notecard": + case "application/vnd.ll.notecard": return "notecard"; - case "application/x-metaverse-lsl": - return "lsl"; - case "application/x-metaverse-lso": - return "lso"; - case "image/tga": - return "tga"; - case "application/x-metaverse-bodypart": + case "application/vnd.ll.lsltext": + return "lsltext"; + case "application/vnd.ll.lslbyte": + return "lslbyte"; + case "application/vnd.ll.bodypart": return "bodypart"; - case "audio/x-wav": - return "wav"; - case "image/jpeg": - return "jpg"; - case "application/x-metaverse-animation": - return "animation"; - case "application/x-metaverse-gesture": + case "application/vnd.ll.animation": + return "animatn"; + case "application/vnd.ll.gesture": return "gesture"; - case "application/x-metaverse-simstate": - return "simstate"; default: - return "bin"; + return "binary"; } } @@ -174,43 +146,30 @@ namespace OpenMetaverse.Messages.CableBeach case "texture": case "jp2": case "j2c": - return "image/jp2"; + return "image/x-j2c"; case "sound": case "ogg": return "application/ogg"; case "callingcard": - return "application/x-metaverse-callingcard"; + return "application/vnd.ll.callingcard"; case "landmark": - return "application/x-metaverse-landmark"; + return "application/vnd.ll.landmark"; case "clothing": - return "application/x-metaverse-clothing"; + return "application/vnd.ll.clothing"; case "primitive": - return "application/x-metaverse-primitive"; + return "application/vnd.ll.primitive"; case "notecard": - return "application/x-metaverse-notecard"; + return "application/vnd.ll.notecard"; case "lsl": - return "application/x-metaverse-lsl"; + return "application/vnd.ll.lsltext"; case "lso": - return "application/x-metaverse-lso"; - case "tga": - return "image/tga"; + return "application/vnd.ll.lslbyte"; case "bodypart": - return "application/x-metaverse-bodypart"; - case "wav": - return "audio/x-wav"; - case "jpg": - case "jpeg": - return "image/jpeg"; - case "animation": - return "application/x-metaverse-animation"; + return "application/vnd.ll.bodypart"; + case "animatn": + return "application/vnd.ll.animation"; case "gesture": - return "application/x-metaverse-gesture"; - case "simstate": - return "application/x-metaverse-simstate"; - case "txt": - return "text/plain"; - case "xml": - return "application/xml"; + return "application/vnd.ll.gesture"; default: return "application/octet-stream"; } diff --git a/OpenMetaverse/Messages/CableBeachMessages.cs b/OpenMetaverse/Messages/CableBeachMessages.cs index cd540f42..1f3c6253 100644 --- a/OpenMetaverse/Messages/CableBeachMessages.cs +++ b/OpenMetaverse/Messages/CableBeachMessages.cs @@ -495,269 +495,13 @@ namespace OpenMetaverse.Messages.CableBeach #region Inventory Messages - public class CreateInventoryMessage : IMessage - { - public Uri Identity; - public string Name; - - public OSDMap Serialize() - { - OSDMap map = new OSDMap(); - map["identity"] = OSD.FromUri(Identity); - map["name"] = OSD.FromString(Name); - return map; - } - - public void Deserialize(OSDMap map) - { - Identity = map["identity"].AsUri(); - Name = map["name"].AsString(); - } - } - - public class CreateInventoryReplyMessage : IMessage - { - public UUID RootFolderID; - - public OSDMap Serialize() - { - OSDMap map = new OSDMap(1); - map["root_folder_id"] = OSD.FromUUID(RootFolderID); - return map; - } - - public void Deserialize(OSDMap map) - { - RootFolderID = map["root_folder_id"].AsUUID(); - } - } - - public class CreateFolderMessage : IMessage - { - public Uri Identity; - public UUID FolderID; - public UUID ParentID; - public string Name; - public string PreferredContentType; - - public OSDMap Serialize() - { - OSDMap map = new OSDMap(); - map["identity"] = OSD.FromUri(Identity); - map["folder_id"] = OSD.FromUUID(FolderID); - map["parent_id"] = OSD.FromUUID(ParentID); - map["name"] = OSD.FromString(Name); - map["preferred_content_type"] = OSD.FromString(PreferredContentType); - return map; - } - - public void Deserialize(OSDMap map) - { - Identity = map["identity"].AsUri(); - FolderID = map["folder_id"].AsUUID(); - ParentID = map["parent_id"].AsUUID(); - Name = map["name"].AsString(); - PreferredContentType = map["preferred_content_type"].AsString(); - } - } - - public class CreateFolderReplyMessage : IMessage - { - public UUID FolderID; - - public OSDMap Serialize() - { - OSDMap map = new OSDMap(); - map["folder_id"] = OSD.FromUUID(FolderID); - return map; - } - - public void Deserialize(OSDMap map) - { - FolderID = map["folder_id"].AsUUID(); - } - } - - public class CreateItemMessage : IMessage - { - public Uri Identity; - public UUID ItemID; - public string Name; - public string Description; - public string ContentType; - public UUID AssetID; - public UUID ParentID; - - public OSDMap Serialize() - { - OSDMap map = new OSDMap(); - map["identity"] = OSD.FromUri(Identity); - map["item_id"] = OSD.FromUUID(ItemID); - map["name"] = OSD.FromString(Name); - map["description"] = OSD.FromString(Description); - map["content_type"] = OSD.FromString(ContentType); - map["asset_id"] = OSD.FromUUID(AssetID); - map["parent_id"] = OSD.FromUUID(ParentID); - return map; - } - - public void Deserialize(OSDMap map) - { - Identity = map["identity"].AsUri(); - ItemID = map["item_id"].AsUUID(); - Name = map["name"].AsString(); - Description = map["description"].AsString(); - ContentType = map["content_type"].AsString(); - AssetID = map["asset_id"].AsUUID(); - ParentID = map["parent_id"].AsUUID(); - } - } - - public class CreateItemReplyMessage : IMessage - { - public UUID ItemID; - - public OSDMap Serialize() - { - OSDMap map = new OSDMap(); - map["item_id"] = OSD.FromUUID(ItemID); - return map; - } - - public void Deserialize(OSDMap map) - { - ItemID = map["item_id"].AsUUID(); - } - } - - public class MoveItemMessage : IMessage - { - public Uri Identity; - public UUID ItemID; - public string Name; - public string Description; - public string ContentType; - public UUID AssetID; - public UUID ParentID; - - public OSDMap Serialize() - { - OSDMap map = new OSDMap(); - map["identity"] = OSD.FromUri(Identity); - map["item_id"] = OSD.FromUUID(ItemID); - map["name"] = OSD.FromString(Name); - map["description"] = OSD.FromString(Description); - map["content_type"] = OSD.FromString(ContentType); - map["asset_id"] = OSD.FromUUID(AssetID); - map["parent_id"] = OSD.FromUUID(ParentID); - return map; - } - - public void Deserialize(OSDMap map) - { - Identity = map["identity"].AsUri(); - ItemID = map["item_id"].AsUUID(); - Name = map["name"].AsString(); - Description = map["description"].AsString(); - ContentType = map["content_type"].AsString(); - AssetID = map["asset_id"].AsUUID(); - ParentID = map["parent_id"].AsUUID(); - } - } - - public class MoveItemReplyMessage : IMessage - { - public UUID ItemID; - - public OSDMap Serialize() - { - OSDMap map = new OSDMap(); - map["item_id"] = OSD.FromUUID(ItemID); - return map; - } - - public void Deserialize(OSDMap map) - { - ItemID = map["item_id"].AsUUID(); - } - } - - public class UpdateItemMessage : IMessage - { - public Uri Identity; - public string Name; - public string Description; - public string ContentType; - public UUID AssetID; - - public OSDMap Serialize() - { - OSDMap map = new OSDMap(); - map["identity"] = OSD.FromUri(Identity); - map["name"] = OSD.FromString(Name); - map["description"] = OSD.FromString(Description); - map["content_type"] = OSD.FromString(ContentType); - map["asset_id"] = OSD.FromUUID(AssetID); - return map; - } - - public void Deserialize(OSDMap map) - { - Identity = map["identity"].AsUri(); - Name = map["name"].AsString(); - Description = map["description"].AsString(); - ContentType = map["content_type"].AsString(); - AssetID = map["asset_id"].AsUUID(); - } - } - - public class UpdateItemReplyMessage : IMessage - { - public bool Success; - public string Message; - - public OSDMap Serialize() - { - OSDMap map = new OSDMap(); - map["success"] = OSD.FromBoolean(Success); - map["message"] = OSD.FromString(Message); - return map; - } - - public void Deserialize(OSDMap map) - { - Success = map["success"].AsBoolean(); - Message = map["message"].AsString(); - } - } - - public class FetchObjectMessage : IMessage - { - public Uri Identity; - public UUID ObjectID; - - public OSDMap Serialize() - { - OSDMap map = new OSDMap(); - map["identity"] = OSD.FromUri(Identity); - map["object_id"] = OSD.FromUUID(ObjectID); - return map; - } - - public void Deserialize(OSDMap map) - { - Identity = map["identity"].AsUri(); - ObjectID = map["object_id"].AsUUID(); - } - } - - public interface InventoryObject + public interface InventoryBlock { OSDMap Serialize(); void Deserialize(OSDMap map); } - public class InventoryObjectItem : InventoryObject + public class InventoryBlockItem : InventoryBlock { public UUID ID; public UUID ParentID; @@ -824,7 +568,7 @@ namespace OpenMetaverse.Messages.CableBeach } } - public class InventoryObjectFolder : InventoryObject + public class InventoryBlockFolder : InventoryBlock { public UUID ID; public UUID ParentID; @@ -832,7 +576,7 @@ namespace OpenMetaverse.Messages.CableBeach public UUID OwnerID; public string PreferredContentType; public int Version; - public InventoryObject[] Children; + public InventoryBlock[] Children; public OSDMap Serialize() { @@ -843,10 +587,17 @@ namespace OpenMetaverse.Messages.CableBeach map["owner_id"] = OSD.FromUUID(OwnerID); map["preferred_content_type"] = OSD.FromString(PreferredContentType); map["version"] = OSD.FromInteger(Version); - OSDArray array = new OSDArray(Children.Length); - for (int i = 0; i < Children.Length; i++) - array.Add(Children[i].Serialize()); - map["children"] = array; + if (Children != null) + { + OSDArray array = new OSDArray(Children.Length); + for (int i = 0; i < Children.Length; i++) + array.Add(Children[i].Serialize()); + map["children"] = array; + } + else + { + map["children"] = new OSDArray(0); + } return map; } @@ -859,26 +610,128 @@ namespace OpenMetaverse.Messages.CableBeach PreferredContentType = map["preferred_content_type"].AsString(); Version = map["version"].AsInteger(); OSDArray array = (OSDArray)map["children"]; - Children = new InventoryObject[array.Count]; + Children = new InventoryBlock[array.Count]; for (int i = 0; i < array.Count; i++) { OSDMap childMap = (OSDMap)array[i]; - InventoryObject obj; + InventoryBlock obj; if (childMap.ContainsKey("asset_id")) - obj = new InventoryObjectItem(); + obj = new InventoryBlockItem(); else - obj = new InventoryObjectFolder(); + obj = new InventoryBlockFolder(); obj.Deserialize(childMap); Children[i] = obj; } } } + public class CreateInventoryMessage : IMessage + { + public Uri Identity; + public string Name; + + public OSDMap Serialize() + { + OSDMap map = new OSDMap(); + map["identity"] = OSD.FromUri(Identity); + map["name"] = OSD.FromString(Name); + return map; + } + + public void Deserialize(OSDMap map) + { + Identity = map["identity"].AsUri(); + Name = map["name"].AsString(); + } + } + + public class CreateInventoryReplyMessage : IMessage + { + public UUID RootFolderID; + + public OSDMap Serialize() + { + OSDMap map = new OSDMap(1); + map["root_folder_id"] = OSD.FromUUID(RootFolderID); + return map; + } + + public void Deserialize(OSDMap map) + { + RootFolderID = map["root_folder_id"].AsUUID(); + } + } + + public class CreateObjectMessage : IMessage + { + public Uri Identity; + public InventoryBlock Object; + + public OSDMap Serialize() + { + OSDMap map = new OSDMap(); + map["identity"] = OSD.FromUri(Identity); + map["object"] = Object.Serialize(); + return map; + } + + public void Deserialize(OSDMap map) + { + Identity = map["identity"].AsUri(); + OSDMap objMap = (OSDMap)map["object"]; + if (objMap.ContainsKey("asset_id")) + Object = new InventoryBlockItem(); + else + Object = new InventoryBlockFolder(); + Object.Deserialize(objMap); + } + } + + public class CreateObjectReplyMessage : IMessage + { + public bool Success; + public string Message; + + public OSDMap Serialize() + { + OSDMap map = new OSDMap(); + map["success"] = OSD.FromBoolean(Success); + map["message"] = OSD.FromString(Message); + return map; + } + + public void Deserialize(OSDMap map) + { + Success = map["success"].AsBoolean(); + Message = map["message"].AsString(); + } + } + + public class FetchObjectMessage : IMessage + { + public Uri Identity; + public UUID ObjectID; + + public OSDMap Serialize() + { + OSDMap map = new OSDMap(); + map["identity"] = OSD.FromUri(Identity); + map["object_id"] = OSD.FromUUID(ObjectID); + return map; + } + + public void Deserialize(OSDMap map) + { + Identity = map["identity"].AsUri(); + ObjectID = map["object_id"].AsUUID(); + } + } + public class FetchObjectReplyMessage : IMessage { public bool Success; public string Message; - public InventoryObject Object; + public InventoryBlock Object; public OSDMap Serialize() { @@ -898,9 +751,9 @@ namespace OpenMetaverse.Messages.CableBeach if (objMap != null) { if (objMap.ContainsKey("asset_id")) - Object = new InventoryObjectItem(); + Object = new InventoryBlockItem(); else - Object = new InventoryObjectFolder(); + Object = new InventoryBlockFolder(); Object.Deserialize(objMap); } @@ -911,6 +764,46 @@ namespace OpenMetaverse.Messages.CableBeach } } + public class PurgeFolderMessage : IMessage + { + public Uri Identity; + public UUID FolderID; + + public OSDMap Serialize() + { + OSDMap map = new OSDMap(); + map["identity"] = OSD.FromUri(Identity); + map["folder_id"] = OSD.FromUUID(FolderID); + return map; + } + + public void Deserialize(OSDMap map) + { + Identity = map["identity"].AsUri(); + FolderID = map["folder_id"].AsUUID(); + } + } + + public class PurgeFolderReplyMessage : IMessage + { + public bool Success; + public string Message; + + public OSDMap Serialize() + { + OSDMap map = new OSDMap(); + map["success"] = OSD.FromBoolean(Success); + map["message"] = OSD.FromString(Message); + return map; + } + + public void Deserialize(OSDMap map) + { + Success = map["success"].AsBoolean(); + Message = map["message"].AsString(); + } + } + public class GetInventorySkeletonMessage : IMessage { public Uri Identity; diff --git a/data/cablebeach_message_template.msg b/data/cablebeach_message_template.msg index 952067dd..6e25c7d4 100644 --- a/data/cablebeach_message_template.msg +++ b/data/cablebeach_message_template.msg @@ -117,6 +117,124 @@ // Assets //////////////////////////////////////////////////////////////////////////////// +&primitive = +{ + attachment_position: [ real, real, real ], + attachment_rotation: [ real, real, real, real ], + before_attachment_rotation: [ real, real, real, real ], + name: string, + perms_base: integer, + perms_owner: integer, + perms_group: integer, + perms_everyone: integer, + perms_next_owner: integer, + creator_id: uuid, + owner_id: uuid, + last_attachment_point: integer, + last_owner_id: uuid, + link_number: integer, + group_id: uuid, + local_id: integer, + position: [ real, real, real ], + rotation: [ real, real, real, real ], + velocity: [ real, real, real ], + angular_velocity: [ real, real, real ], + scale: [ real, real, real ], + sit_offset: [ real, real, real ], + sit_rotation: [ real, real, real, real ], + camera_eye_offset: [ real, real, real ], + camera_at_offset: [ real, real, real ], + state: integer, + material: integer, + sound_id: uuid, + sound_gain: real, + sound_radius: real, + sound_flags: integer, + text_color: [ real, real, real, real ], + selected: boolean, + selector_id: uuid, + use_physics: boolean, + phantom: boolean, + remote_script_access_pin: integer, + volume_detect: boolean, + die_at_edge: boolean, + return_at_edge: boolean, + temporary: boolean, + sandbox: boolean, + rez_time: date, + sale_price: integer, + sale_type: integer, + shape: + { + path_curve: integer, + path_begin: real, + path_end: real, + path_scale_x: real, + path_scale_y: real, + path_shear_x: real, + path_shear_y: real, + path_twist: real, + path_twist_begin: real, + path_radius_offset: real, + path_taper_x: real, + path_taper_y: real, + path_revolutions: real, + path_skew: real, + profile_curve: integer, + profile_begin: real, + profile_end: real, + profile_hollow: real + } + faces: + [ + { + face_index: integer, + image_id: uuid, + color: [ real, real, real, real ], + scale_s: real, + scale_t: real, + offset_s: real, + offset_t: real, + imagerot: real, + bump: integer, + fullbright: boolean, + media_flags: integer + }, + ... + ], + inventory: + { + serial: integer, + items: + [ + { + id: uuid, + parent_id: uuid, + name: string, + owner_id: uuid, + asset_id: uuid, + content_type: string, + creator_id: uuid, + group_id: uuid, + description: string, + group_owned: boolean, + perms_base: binary, + perms_everyone: binary, + perms_group: binary, + perms_next: binary, + perms_owner: binary, + sale_price: integer, + sale_type: integer, + flags: integer, + creation_date: integer, + permission_granter: uuid, + granted_permissions: integer + }, + ... + ] + } +} + %%get_asset_metadata &metadata = @@ -175,93 +293,6 @@ // Inventory //////////////////////////////////////////////////////////////////////////////// -%%create_inventory - --> -{ - identity: uri, - name: string -} - -<- -{ - root_folder_id: uuid -} - -%%create_folder - --> -{ - identity: uri, - folder_id: uuid, - parent_id: uuid, - name: string, - preferred_content_type: string -} - -<- -{ - folder_id: uuid -} - -%%create_item - --> -{ - identity: uri, - item_id: uuid, - name: string, - description: string, - content_type: string, - asset_id: uuid, - parent_id: uuid -} - -<- -{ - item_id: uuid -} - -%%move_item - --> -{ - identity: uri, - item_id: uuid, - new_parent_id: uuid, - new_name: string -} - -<- -{ - item_id: uuid -} - -%%update_item - --> -{ - identity: uri, - name: string, - description: string, - content_type: string, - asset_id: uuid -} - -<- -{ - success: boolean, - message: string -} - -%%fetch_object - --> -{ - identity: uri, - object_id: uuid -} - &inventory_object = { id: uuid, @@ -296,6 +327,41 @@ children: [ inventory_object, ... ] } +%%create_inventory + +-> +{ + identity: uri, + name: string +} + +<- +{ + root_folder_id: uuid +} + +%%create_object + +-> +{ + identity: uri, + object: inventory_object +} + +<- +{ + success: boolean, + message: string +} + +%%fetch_object + +-> +{ + identity: uri, + object_id: uuid +} + <- { success: boolean,