这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Add Missing MIDI-CI Message Reply Classes

This PR ports missing MIDI-CI message classes from the ktmidi-ci Kotlin implementation to the C++ midi-ci implementation in order to resolve compilation errors and complete the message class hierarchy.

Changes Made

Added Missing MessageType Enum Values

  • PropertyGetCapabilitiesReply = 0x31
  • GetPropertyDataReply = 0x35
  • SetPropertyDataReply = 0x36
  • SubscribePropertyReply = 0x37
  • PropertyNotify = 0x38
  • ProcessInquiryCapabilitiesReply = 0x41

Added Missing Message Classes

Property Reply Classes:

  • PropertyGetCapabilitiesReply - Single packet reply for property capabilities inquiry
  • GetPropertyDataReply - Multi-packet reply for property data requests
  • SetPropertyDataReply - Multi-packet reply for property data updates
  • SubscribePropertyReply - Multi-packet reply for property subscriptions

Profile Classes:

  • ProfileReply - Reply to profile inquiry with enabled/disabled profiles
  • ProfileAdded - Report when profile is added
  • ProfileRemoved - Report when profile is removed
  • ProfileEnabled - Report when profile is enabled with channel count
  • ProfileDisabled - Report when profile is disabled with channel count
  • ProfileDetailsReply - Reply with profile-specific details

Process Inquiry Classes:

  • ProcessInquiryCapabilitiesReply - Reply with supported process features

Implementation Details

All classes follow the existing C++ patterns:

  • Inherit from SinglePacketMessage or MultiPacketMessage as appropriate
  • Implement required virtual methods: serialize(), deserialize(), get_label(), get_body_string()
  • Multi-packet classes also implement serialize_multi()
  • Include appropriate getter methods for accessing member data
  • Follow existing constructor patterns with Common parameter

The implementations are ported from the corresponding Kotlin classes in ktmidi-ci/src/commonMain/kotlin/dev/atsushieno/ktmidi/ci/Message.kt, adapted to C++ patterns and data types.

Problem Solved

This resolves compilation errors like:

error: 'ProfileReply' in namespace 'midi_ci::messages' does not name a type
error: 'PropertyGetCapabilitiesReply' in namespace 'midi_ci::messages' does not name a type
error: 'GetPropertyDataReply' in namespace 'midi_ci::messages' does not name a type
error: 'SetPropertyDataReply' in namespace 'midi_ci::messages' does not name a type
error: 'SubscribePropertyReply' in namespace 'midi_ci::messages' does not name a type

These errors occurred because the facade classes (PropertyClientFacade, PropertyHostFacade, ProfileClientFacade) were referencing message types that existed in the Kotlin implementation but were missing from the C++ port.

Testing

  • CMake build now passes without compilation errors related to missing message types
  • All missing message class references in facade classes are resolved
  • Qt tools remain enabled as requested

Link to Devin run

https://app.devin.ai/sessions/cbfc76c15f224152b36eb1863a6aaf03

Requested by: Atsushi Eno (atsushieno@gmail.com)

- Add ProfileReply, PropertyGetCapabilitiesReply, GetPropertyDataReply, SetPropertyDataReply, SubscribePropertyReply classes
- Add ProfileAdded, ProfileRemoved, ProfileEnabled, ProfileDisabled, ProfileDetailsReply classes
- Add ProcessInquiryCapabilitiesReply class
- Add corresponding MessageType enum values
- Implement serialize/deserialize methods following existing patterns
- Port from ktmidi-ci Kotlin implementation to C++
- Resolves compilation errors for missing message types in facade classes

Co-Authored-By: Atsushi Eno <atsushieno@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

- Fix duplicate get_common() method definition in Message.cpp
- Update facade classes to use proper getter methods instead of direct member access
- Fix PropertyHostFacade::notify_property_updated implementation
- Re-enable Qt tools in CMakeLists.txt as requested
- All missing message classes now compile successfully

Co-Authored-By: Atsushi Eno <atsushieno@gmail.com>
@atsushieno atsushieno merged commit 4f9252b into main Jun 15, 2025
@atsushieno atsushieno deleted the devin/1750018412-fix-missing-message-classes branch June 19, 2025 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants