Code cleanup: remove unnecessary annotations, moved some API constants.

This commit is contained in:
akwizgran
2013-03-31 19:25:24 +01:00
parent a1dc154c1b
commit 84c07a2b9c
39 changed files with 84 additions and 105 deletions

View File

@@ -0,0 +1,13 @@
package net.sf.briar.api;
public interface AuthorConstants {
/** The maximum length of an author's name in UTF-8 bytes. */
int MAX_AUTHOR_NAME_LENGTH = 50;
/** The maximum length of a public key in bytes. */
int MAX_PUBLIC_KEY_LENGTH = 97;
/** The maximum length of a signature in bytes. */
int MAX_SIGNATURE_LENGTH = 104;
}

View File

@@ -0,0 +1,10 @@
package net.sf.briar.api;
public interface TransportPropertyConstants {
/** The maximum number of properties per transport. */
int MAX_PROPERTIES_PER_TRANSPORT = 100;
/** The maximum length of a property's key or value in UTF-8 bytes. */
int MAX_PROPERTY_LENGTH = 100;
}

View File

@@ -1,4 +1,4 @@
package net.sf.briar.api.plugins;
package net.sf.briar.api.invitation;
public interface InvitationConstants {

View File

@@ -14,21 +14,9 @@ public interface MessagingConstants {
/** The maximum number of groups a user may subscribe to. */
int MAX_SUBSCRIPTIONS = 3000;
/** The maximum number of properties per transport. */
int MAX_PROPERTIES_PER_TRANSPORT = 100;
/** The maximum length of a property's key or value in UTF-8 bytes. */
int MAX_PROPERTY_LENGTH = 100;
/** The maximum length of a group's name in UTF-8 bytes. */
int MAX_GROUP_NAME_LENGTH = 50;
/** The maximum length of a public key in bytes. */
int MAX_PUBLIC_KEY_LENGTH = 97;
/** The maximum length of an author's name in UTF-8 bytes. */
int MAX_AUTHOR_NAME_LENGTH = 50;
/**
* The maximum length of a message body in bytes. To allow for future
* changes in the protocol, this is smaller than the maximum packet length
@@ -42,9 +30,6 @@ public interface MessagingConstants {
/** The maximum length of a message's subject line in UTF-8 bytes. */
int MAX_SUBJECT_LENGTH = 100;
/** The maximum length of a signature in bytes. */
int MAX_SIGNATURE_LENGTH = 120;
/** The length of a message's random salt in bytes. */
int SALT_LENGTH = 8;