|
1 /* |
|
2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Statemachine for configuring multicast address to drivers |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "core_operation_configure_multicast_group.h" |
|
20 #include "core_server.h" |
|
21 #include "am_debug.h" |
|
22 |
|
23 // ======== MEMBER FUNCTIONS ======== |
|
24 |
|
25 // --------------------------------------------------------------------------- |
|
26 // --------------------------------------------------------------------------- |
|
27 // |
|
28 core_operation_configure_multicast_group_c::core_operation_configure_multicast_group_c( |
|
29 u32_t request_id, |
|
30 core_server_c* server, |
|
31 abs_core_driverif_c* drivers, |
|
32 abs_core_server_callback_c* adaptation, |
|
33 bool_t join_group, |
|
34 const core_mac_address_s& multicast_addr ): |
|
35 core_operation_base_c( core_operation_configure_multicast_group, request_id, server, drivers, adaptation, |
|
36 core_base_flag_drivers_needed | core_base_flag_connection_needed ), |
|
37 is_join_m( join_group ), |
|
38 multicast_addr_m( multicast_addr ) |
|
39 { |
|
40 DEBUG( "core_operation_configure_multicast_group_c::core_operation_configure_multicast_group_c()" ); |
|
41 } |
|
42 |
|
43 // --------------------------------------------------------------------------- |
|
44 // --------------------------------------------------------------------------- |
|
45 // |
|
46 core_operation_configure_multicast_group_c::~core_operation_configure_multicast_group_c() |
|
47 { |
|
48 DEBUG( "core_operation_configure_multicast_group_c::~core_operation_configure_multicast_group_c()" ); |
|
49 } |
|
50 |
|
51 // --------------------------------------------------------------------------- |
|
52 // --------------------------------------------------------------------------- |
|
53 // |
|
54 core_error_e core_operation_configure_multicast_group_c::next_state() |
|
55 { |
|
56 DEBUG( "core_operation_configure_multicast_group_c::next_state()" ); |
|
57 |
|
58 switch ( operation_state_m ) |
|
59 { |
|
60 case core_state_init: |
|
61 { |
|
62 operation_state_m = core_state_req_configure_multicast_group; |
|
63 |
|
64 drivers_m->configure_multicast_group( |
|
65 request_id_m, |
|
66 is_join_m, |
|
67 multicast_addr_m ); |
|
68 break; |
|
69 } |
|
70 case core_state_req_configure_multicast_group: |
|
71 { |
|
72 DEBUG( "core_operation_configure_multicast_group_c::next_state() - DONE" ); |
|
73 return core_error_ok; |
|
74 } |
|
75 default: |
|
76 { |
|
77 ASSERT( false_t ); |
|
78 } |
|
79 } |
|
80 |
|
81 return core_error_request_pending; |
|
82 } |