Metadata-Version: 2.1
Name: tmkproto
Version: 1.0.0
Summary: Protocol Buffer package for TMK protocol messages
Author: TMK Developer
Author-email: 
License: MIT
Keywords: protobuf,tmk,protocol
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE

# tmkproto

مكتبة Protocol Buffer لرسائل بروتوكول TMK

A Protocol Buffer package for TMK protocol messages.

## التثبيت / Installation

```bash
pip install tmkproto
```

أو التثبيت من المصدر / Or install from source:

```bash
pip install .
```

## الاستخدام / Usage

### باللغة العربية

```python
import tmkproto

# إنشاء كائن تسجيل دخول رئيسي
login = tmkproto.MajorLogin()
login.game_name = "MyGame"
login.platform_id = 1
login.client_version = "1.0.0"

# إنشاء رد تسجيل الدخول
login_response = tmkproto.MajorLoginRes()
login_response.account_uid = 123456
login_response.region = "US"
login_response.token = "your_token_here"

# الحصول على بيانات تسجيل الدخول
login_data = tmkproto.GetLoginData()
login_data.AccountUID = 123456
login_data.Region = "US"
login_data.AccountName = "Player1"

# فك تشفير الهمس
whisper = tmkproto.DecodeWhisper()
nested = whisper.Data
nested.uid = 123456
nested.Chat_ID = 789
nested.msg = "Hello!"

# الدردشة المستلمة
chat = tmkproto.recieved_chat()
chat.packet_type = 1

# أمان اللعبة
security = tmkproto.GameSecurity()
security.version = 1
security.hidden_value = 12345
```

### In English

```python
import tmkproto

# Create a major login object
login = tmkproto.MajorLogin()
login.game_name = "MyGame"
login.platform_id = 1
login.client_version = "1.0.0"

# Create login response
login_response = tmkproto.MajorLoginRes()
login_response.account_uid = 123456
login_response.region = "US"
login_response.token = "your_token_here"

# Get login data
login_data = tmkproto.GetLoginData()
login_data.AccountUID = 123456
login_data.Region = "US"
login_data.AccountName = "Player1"

# Decode whisper
whisper = tmkproto.DecodeWhisper()
nested = whisper.Data
nested.uid = 123456
nested.Chat_ID = 789
nested.msg = "Hello!"

# Received chat
chat = tmkproto.recieved_chat()
chat.packet_type = 1

# Game security
security = tmkproto.GameSecurity()
security.version = 1
security.hidden_value = 12345
```

## الفئات المتاحة / Available Classes

- `MajorLogin` - رسالة تسجيل الدخول الرئيسية / Main login message
- `MajorLoginRes` - رد تسجيل الدخول / Login response
- `GetLoginData` - الحصول على بيانات تسجيل الدخول / Get login data
- `DecodeWhisper` - فك تشفير الهمس / Decode whisper message
- `recieved_chat` - الدردشة المستلمة / Received chat message
- `GameSecurity` - أمان اللعبة / Game security

## التسلسل وإلغاء التسلسل / Serialization and Deserialization

```python
import tmkproto

# إنشاء وتسلسل / Create and serialize
login = tmkproto.MajorLogin()
login.game_name = "MyGame"
serialized_data = login.SerializeToString()

# إلغاء التسلسل / Deserialize
new_login = tmkproto.MajorLogin()
new_login.ParseFromString(serialized_data)
print(new_login.game_name)  # Output: MyGame
```

## المتطلبات / Requirements

- Python >= 3.7
- protobuf >= 3.20.0

## الترخيص / License

MIT License
