Skip to content

Commit

Permalink
Merge pull request #20 from art-media-platform/2024.0.8.6
Browse files Browse the repository at this point in the history
2024.0.8.6
  • Loading branch information
drew-512 authored Nov 23, 2024
2 parents 36d93a1 + de560df commit 19378ea
Show file tree
Hide file tree
Showing 27 changed files with 692 additions and 336 deletions.
File renamed without changes.
10 changes: 6 additions & 4 deletions Unity/AmpCore.cs → amp.Unity/AmpCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static AmpCoreReflection() {
"ChJFcnJDb2RlX0ludmFsaWRUYWcQj8z+////////ARIhChRFcnJDb2RlX0F0",
"dHJOb3RGb3VuZBCOzP7///////8BEiQKF0VyckNvZGVfTm90aGluZ1RvQ29t",
"bWl0EI3M/v///////wESIQoURXJyQ29kZV9Db21taXRGYWlsZWQQjMz+////",
"////ARIiChVFcnJDb2RlX1NwYWNlTm90Rm91bmQQi8z+////////ARIjChZF",
"////ARIiChVFcnJDb2RlX1N0b3JlTm90Rm91bmQQi8z+////////ARIjChZF",
"cnJDb2RlX1N0b3JhZ2VGYWlsdXJlEIrM/v///////wESIAoTRXJyQ29kZV9B",
"cHBOb3RGb3VuZBCJzP7///////8BEiAKE0VyckNvZGVfTWFsZm9ybWVkVHgQ",
"iMz+////////ARIeChFFcnJDb2RlX0JhZFNjaGVtYRCAzP7///////8BEiAK",
Expand Down Expand Up @@ -191,7 +191,9 @@ public enum TxOpCode {
}

/// <summary>
/// TxBody contains a max number of uint64 fields usable for any purpose.
/// TxField maps a fixed count of int64 payload fields.enum
///
/// Why not as a proto message? Because compression is much better since values mostly repeat.
/// </summary>
public enum TxField {
[pbr::OriginalName("TxField_Nil")] Nil = 0,
Expand Down Expand Up @@ -344,7 +346,7 @@ public enum ErrCode {
[pbr::OriginalName("ErrCode_AttrNotFound")] AttrNotFound = -23026,
[pbr::OriginalName("ErrCode_NothingToCommit")] NothingToCommit = -23027,
[pbr::OriginalName("ErrCode_CommitFailed")] CommitFailed = -23028,
[pbr::OriginalName("ErrCode_SpaceNotFound")] SpaceNotFound = -23029,
[pbr::OriginalName("ErrCode_StoreNotFound")] StoreNotFound = -23029,
[pbr::OriginalName("ErrCode_StorageFailure")] StorageFailure = -23030,
[pbr::OriginalName("ErrCode_AppNotFound")] AppNotFound = -23031,
[pbr::OriginalName("ErrCode_MalformedTx")] MalformedTx = -23032,
Expand Down Expand Up @@ -2834,7 +2836,7 @@ public string UID {
public const int TextFieldNumber = 13;
private string text_ = "";
/// <summary>
/// tag.Spec, custom content, or expression
/// tag.Expr, custom content, or expression
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Expand Down
File renamed without changes.
68 changes: 34 additions & 34 deletions Unity/AmpSki.cs → amp.Unity/AmpSki.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ static AmpSkiReflection() {
"ASgOMhAuc2tpLkNyeXB0b0tpdElEEg0KBUJ1ZkluGAMgASgMEhoKBU9wS2V5",
"GAQgASgLMgsuc2tpLktleVJlZhIPCgdQZWVyS2V5GAUgASgMEhwKBlRvbWVJ",
"bhgGIAEoCzIMLnNraS5LZXlUb21lIi4KCkNyeXB0T3BPdXQSDgoGQnVmT3V0",
"GAEgASgMEhAKCE9wUHViS2V5GAIgASgMInQKB0tleUluZm8SHQoHS2V5VHlw",
"ZRgBIAEoDjIMLnNraS5LZXlUeXBlEiUKC0NyeXB0b0tpdElEGAIgASgOMhAu",
"GAEgASgMEhAKCE9wUHViS2V5GAIgASgMInQKB0tleUluZm8SHQoHS2V5Rm9y",
"bRgBIAEoDjIMLnNraS5LZXlGb3JtEiUKC0NyeXB0b0tpdElEGAIgASgOMhAu",
"c2tpLkNyeXB0b0tpdElEEhMKC1RpbWVDcmVhdGVkGAMgASgDEg4KBlB1Yktl",
"eRgEIAEoDCItCgZLZXlSZWYSEwoLS2V5cmluZ05hbWUYASABKAwSDgoGUHVi",
"S2V5GAIgASgMIjoKCEtleUVudHJ5Eh0KB0tleUluZm8YASABKAsyDC5za2ku",
Expand All @@ -44,9 +44,9 @@ static AmpSkiReflection() {
"RBIQCghIZWFkZXJTehgHIAEoDRITCgtIZWFkZXJDb2RlYxgIIAEoDRIOCgZC",
"b2R5U3oYCSABKAQiWAoMS2V5VG9tZUNyeXB0EgwKBFRvbWUYASABKAwSGwoG",
"S2V5UmVmGAogASgLMgsuc2tpLktleVJlZhIdCgdLZXlJbmZvGAsgASgLMgwu",
"c2tpLktleUluZm8qbwoHS2V5VHlwZRIXChNLZXlUeXBlX1Vuc3BlY2lmaWVk",
"EAASGAoUS2V5VHlwZV9TeW1tZXRyaWNLZXkQARIZChVLZXlUeXBlX0FzeW1t",
"ZXRyaWNLZXkQAhIWChJLZXlUeXBlX1NpZ25pbmdLZXkQAypfCgtDcnlwdG9L",
"c2tpLktleUluZm8qbwoHS2V5Rm9ybRIXChNLZXlGb3JtX1Vuc3BlY2lmaWVk",
"EAASGAoUS2V5Rm9ybV9TeW1tZXRyaWNLZXkQARIZChVLZXlGb3JtX0FzeW1t",
"ZXRyaWNLZXkQAhIWChJLZXlGb3JtX1NpZ25pbmdLZXkQAypfCgtDcnlwdG9L",
"aXRJRBIhCh1DcnlwdG9LaXRJRF9VbnNwZWNpZmllZENyeXB0bxAAEhQKEENy",
"eXB0b0tpdElEX05hQ2wQARIXChNDcnlwdG9LaXRJRF9FRDI1NTE5EAIq0wEK",
"CUhhc2hLaXRJRBIgChxIYXNoS2l0SURfVW5zcGVjaWZpZWRIYXNoS2l0EAAS",
Expand All @@ -62,10 +62,10 @@ static AmpSkiReflection() {
"EAhiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Ski.KeyType), typeof(global::Ski.CryptoKitID), typeof(global::Ski.HashKitID), typeof(global::Ski.CryptOp), }, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Ski.KeyForm), typeof(global::Ski.CryptoKitID), typeof(global::Ski.HashKitID), typeof(global::Ski.CryptOp), }, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Ski.CryptOpArgs), global::Ski.CryptOpArgs.Parser, new[]{ "CryptOp", "DefaultCryptoKit", "BufIn", "OpKey", "PeerKey", "TomeIn" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Ski.CryptOpOut), global::Ski.CryptOpOut.Parser, new[]{ "BufOut", "OpPubKey" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Ski.KeyInfo), global::Ski.KeyInfo.Parser, new[]{ "KeyType", "CryptoKitID", "TimeCreated", "PubKey" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Ski.KeyInfo), global::Ski.KeyInfo.Parser, new[]{ "KeyForm", "CryptoKitID", "TimeCreated", "PubKey" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Ski.KeyRef), global::Ski.KeyRef.Parser, new[]{ "KeyringName", "PubKey" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Ski.KeyEntry), global::Ski.KeyEntry.Parser, new[]{ "KeyInfo", "PrivKey" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Ski.Keyring), global::Ski.Keyring.Parser, new[]{ "Name", "Keys", "SortedByPubKey", "NewestPubKey" }, null, null, null, null),
Expand All @@ -79,13 +79,13 @@ static AmpSkiReflection() {
}
#region Enums
/// <summary>
/// KeyType identifies how a key operates
/// KeyForm identifies how a key operates
/// </summary>
public enum KeyType {
[pbr::OriginalName("KeyType_Unspecified")] Unspecified = 0,
[pbr::OriginalName("KeyType_SymmetricKey")] SymmetricKey = 1,
[pbr::OriginalName("KeyType_AsymmetricKey")] AsymmetricKey = 2,
[pbr::OriginalName("KeyType_SigningKey")] SigningKey = 3,
public enum KeyForm {
[pbr::OriginalName("KeyForm_Unspecified")] Unspecified = 0,
[pbr::OriginalName("KeyForm_SymmetricKey")] SymmetricKey = 1,
[pbr::OriginalName("KeyForm_AsymmetricKey")] AsymmetricKey = 2,
[pbr::OriginalName("KeyForm_SigningKey")] SigningKey = 3,
}

/// <summary>
Expand Down Expand Up @@ -821,7 +821,7 @@ public void MergeFrom(pb::CodedInputStream input) {
/// KeyInfo exists in two modes/uses:
/// 1) Generated/copied from an existing KeyEntry
/// 2) Key gen mode: used as a guide to generate a new key
/// a) Fields used: KeyType and CryptoKitID (other fields ignored)
/// a) Fields used: KeyForm and CryptoKitID (other fields ignored)
/// </summary>
public sealed partial class KeyInfo : pb::IMessage<KeyInfo>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
Expand Down Expand Up @@ -857,7 +857,7 @@ public KeyInfo() {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public KeyInfo(KeyInfo other) : this() {
keyType_ = other.keyType_;
keyForm_ = other.keyForm_;
cryptoKitID_ = other.cryptoKitID_;
timeCreated_ = other.timeCreated_;
pubKey_ = other.pubKey_;
Expand All @@ -870,18 +870,18 @@ public KeyInfo Clone() {
return new KeyInfo(this);
}

/// <summary>Field number for the "KeyType" field.</summary>
public const int KeyTypeFieldNumber = 1;
private global::Ski.KeyType keyType_ = global::Ski.KeyType.Unspecified;
/// <summary>Field number for the "KeyForm" field.</summary>
public const int KeyFormFieldNumber = 1;
private global::Ski.KeyForm keyForm_ = global::Ski.KeyForm.Unspecified;
/// <summary>
/// Specifies the type of key this is (optional)
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public global::Ski.KeyType KeyType {
get { return keyType_; }
public global::Ski.KeyForm KeyForm {
get { return keyForm_; }
set {
keyType_ = value;
keyForm_ = value;
}
}

Expand Down Expand Up @@ -945,7 +945,7 @@ public bool Equals(KeyInfo other) {
if (ReferenceEquals(other, this)) {
return true;
}
if (KeyType != other.KeyType) return false;
if (KeyForm != other.KeyForm) return false;
if (CryptoKitID != other.CryptoKitID) return false;
if (TimeCreated != other.TimeCreated) return false;
if (PubKey != other.PubKey) return false;
Expand All @@ -956,7 +956,7 @@ public bool Equals(KeyInfo other) {
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() {
int hash = 1;
if (KeyType != global::Ski.KeyType.Unspecified) hash ^= KeyType.GetHashCode();
if (KeyForm != global::Ski.KeyForm.Unspecified) hash ^= KeyForm.GetHashCode();
if (CryptoKitID != global::Ski.CryptoKitID.UnspecifiedCrypto) hash ^= CryptoKitID.GetHashCode();
if (TimeCreated != 0L) hash ^= TimeCreated.GetHashCode();
if (PubKey.Length != 0) hash ^= PubKey.GetHashCode();
Expand All @@ -978,9 +978,9 @@ public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (KeyType != global::Ski.KeyType.Unspecified) {
if (KeyForm != global::Ski.KeyForm.Unspecified) {
output.WriteRawTag(8);
output.WriteEnum((int) KeyType);
output.WriteEnum((int) KeyForm);
}
if (CryptoKitID != global::Ski.CryptoKitID.UnspecifiedCrypto) {
output.WriteRawTag(16);
Expand All @@ -1004,9 +1004,9 @@ public void WriteTo(pb::CodedOutputStream output) {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (KeyType != global::Ski.KeyType.Unspecified) {
if (KeyForm != global::Ski.KeyForm.Unspecified) {
output.WriteRawTag(8);
output.WriteEnum((int) KeyType);
output.WriteEnum((int) KeyForm);
}
if (CryptoKitID != global::Ski.CryptoKitID.UnspecifiedCrypto) {
output.WriteRawTag(16);
Expand All @@ -1030,8 +1030,8 @@ public void WriteTo(pb::CodedOutputStream output) {
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int CalculateSize() {
int size = 0;
if (KeyType != global::Ski.KeyType.Unspecified) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) KeyType);
if (KeyForm != global::Ski.KeyForm.Unspecified) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) KeyForm);
}
if (CryptoKitID != global::Ski.CryptoKitID.UnspecifiedCrypto) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) CryptoKitID);
Expand All @@ -1054,8 +1054,8 @@ public void MergeFrom(KeyInfo other) {
if (other == null) {
return;
}
if (other.KeyType != global::Ski.KeyType.Unspecified) {
KeyType = other.KeyType;
if (other.KeyForm != global::Ski.KeyForm.Unspecified) {
KeyForm = other.KeyForm;
}
if (other.CryptoKitID != global::Ski.CryptoKitID.UnspecifiedCrypto) {
CryptoKitID = other.CryptoKitID;
Expand All @@ -1082,7 +1082,7 @@ public void MergeFrom(pb::CodedInputStream input) {
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 8: {
KeyType = (global::Ski.KeyType) input.ReadEnum();
KeyForm = (global::Ski.KeyForm) input.ReadEnum();
break;
}
case 16: {
Expand Down Expand Up @@ -1113,7 +1113,7 @@ public void MergeFrom(pb::CodedInputStream input) {
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 8: {
KeyType = (global::Ski.KeyType) input.ReadEnum();
KeyForm = (global::Ski.KeyForm) input.ReadEnum();
break;
}
case 16: {
Expand Down Expand Up @@ -1376,7 +1376,7 @@ public void MergeFrom(pb::CodedInputStream input) {
/// - KeyEntry.PrivKey == nil
/// - Fields used: KeyInfo.PubKey (other fields ignored)
/// 3) GenerateKeys "guide" mode: KeyInfo used as a guide to generate a new key
/// - Fields used: KeyInfo.KeyType and KeyInfo.CryptoKitID (other fields ignored)
/// - Fields used: KeyInfo.KeyForm and KeyInfo.CryptoKitID (other fields ignored)
/// </summary>
public sealed partial class KeyEntry : pb::IMessage<KeyEntry>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
Expand Down
File renamed without changes.
30 changes: 15 additions & 15 deletions Unity/AmpStdEx.cs → amp.Unity/AmpStdEx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,33 @@ namespace Amp.Std {
public static partial class Spec {
public static readonly TagID MetaNodeID = new(0, 0, 2701);

public static readonly TagSpec TagRoot = new TagSpec().With("amp");
public static readonly TagSpec AttrSpec = TagRoot.With("attr");
public static readonly TagSpec AppSpec = TagRoot.With("app");
public static readonly TagSpec CellChildren = AttrSpec.With("children.TagID");
public static readonly TagSpec CellProperties = AttrSpec.With("cell-properties");
public static readonly TagExpr TagRoot = new TagExpr().With("amp");
public static readonly TagExpr AttrSpec = TagRoot.With("attr");
public static readonly TagExpr AppSpec = TagRoot.With("app");
public static readonly TagExpr CellChildren = AttrSpec.With("children.Tag.ID");
public static readonly TagExpr CellProperties = AttrSpec.With("cell-properties");

public static readonly TagSpec Property = new TagSpec().With("cell-property");
public static readonly TagExpr Property = new TagExpr().With("cell-property");

public static readonly TagSpec Glyphs = Property.With("Tags.glyphs");
public static readonly TagSpec Links = Property.With("Tags.links");
public static readonly TagExpr Glyphs = Property.With("Tags.glyphs");
public static readonly TagExpr Links = Property.With("Tags.links");

public static readonly TagID CellMediaID = Property.With("Tag.content.media").ID;
public static readonly TagID CellCover = Property.With("Tag.content.cover").ID;
public static readonly TagID CellVis = Property.With("Tag.content.vis").ID;

public static readonly TagSpec TextTag = Property.With("Tag.text");
public static readonly TagExpr TextTag = Property.With("Tag.text");
public static readonly TagID CellLabel = TextTag.With("label").ID;
public static readonly TagID CellCaption = TextTag.With("caption").ID;
public static readonly TagID CellCollection = TextTag.With("collection").ID;

// Meta attrs registered (allowed) to be pushed
public static readonly TagSpec Login = Registry.RegisterPrototype<Login>();
public static readonly TagSpec LoginChallenge = Registry.RegisterPrototype<LoginChallenge>();
public static readonly TagSpec LoginResponse = Registry.RegisterPrototype<LoginResponse>();
public static readonly TagSpec LoginCheckpoint = Registry.RegisterPrototype<LoginCheckpoint>();
public static readonly TagSpec PinRequest = Registry.RegisterPrototype<PinRequest>();
public static readonly TagSpec LaunchURL = Registry.RegisterPrototype<LaunchURL>();
public static readonly TagExpr Login = Registry.RegisterPrototype<Login>();
public static readonly TagExpr LoginChallenge = Registry.RegisterPrototype<LoginChallenge>();
public static readonly TagExpr LoginResponse = Registry.RegisterPrototype<LoginResponse>();
public static readonly TagExpr LoginCheckpoint = Registry.RegisterPrototype<LoginCheckpoint>();
public static readonly TagExpr PinRequest = Registry.RegisterPrototype<PinRequest>();
public static readonly TagExpr LaunchURL = Registry.RegisterPrototype<LaunchURL>();
public static readonly TagID Err = Registry.RegisterPrototype<Err>().ID;
public static readonly TagID Tag = Registry.RegisterPrototype<Tag>().ID;

Expand Down
Loading

0 comments on commit 19378ea

Please sign in to comment.