-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working on protobuf serialization instead of relying on smile
- Loading branch information
Showing
109 changed files
with
1,152 additions
and
582 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
syntax = "proto2"; | ||
syntax = "proto3"; | ||
package unsupported; | ||
|
||
message ADVDeviceIdentity { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,26 @@ | ||
package it.auties.whatsapp.api; | ||
|
||
import it.auties.protobuf.annotation.ProtobufEnumIndex; | ||
import it.auties.protobuf.model.ProtobufEnum; | ||
|
||
/** | ||
* The constants of this enumerated type describe the various types of API that can be used to make | ||
* {@link Whatsapp} work | ||
*/ | ||
public enum ClientType { | ||
public enum ClientType implements ProtobufEnum { | ||
/** | ||
* A standalone client that requires the QR code to be scanned by its companion on log-in Reversed | ||
* from <a href="https://web.whatsapp.com">Whatsapp Web Client</a> | ||
*/ | ||
WEB, | ||
WEB(0), | ||
/** | ||
* A standalone client that requires an SMS code sent to the companion's phone number on log-in | ||
* Reversed from <a href="https://github.com/tgalal/yowsup/issues/2910">KaiOS Mobile App</a> | ||
*/ | ||
MOBILE | ||
MOBILE(1); | ||
|
||
final int index; | ||
ClientType(@ProtobufEnumIndex int index) { | ||
this.index = index; | ||
} | ||
} |
21 changes: 17 additions & 4 deletions
21
src/main/java/it/auties/whatsapp/api/TextPreviewSetting.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,37 @@ | ||
package it.auties.whatsapp.api; | ||
|
||
import it.auties.protobuf.annotation.ProtobufEnumIndex; | ||
import it.auties.protobuf.model.ProtobufEnum; | ||
|
||
/** | ||
* The constants of this enumerated type describe the various types of text preview that can be | ||
* used | ||
*/ | ||
public enum TextPreviewSetting { | ||
public enum TextPreviewSetting implements ProtobufEnum { | ||
/** | ||
* Link previews will be generated. If a message contains an url without a schema(for example | ||
* wikipedia.com), the message will be autocorrected to include it and a preview will be | ||
* generated | ||
*/ | ||
ENABLED_WITH_INFERENCE, | ||
ENABLED_WITH_INFERENCE(0), | ||
|
||
/** | ||
* Link previews will be generated. No inference will be used. | ||
*/ | ||
ENABLED, | ||
ENABLED(1), | ||
|
||
/** | ||
* Link previews will not be generated | ||
*/ | ||
DISABLED | ||
DISABLED(2); | ||
|
||
final int index; | ||
|
||
TextPreviewSetting(@ProtobufEnumIndex int index) { | ||
this.index = index; | ||
} | ||
|
||
public int index() { | ||
return index; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.