Switch to unified view

a/src/main.cxx b/src/main.cxx
...
...
91
    exit(1);
91
    exit(1);
92
}
92
}
93
93
94
94
95
static const string dfltFriendlyName("UpMpd");
95
static const string dfltFriendlyName("UpMpd");
96
97
ohProductDesc_t ohProductDesc = {
98
    // Manufacturer
99
    {
100
        "UpMPDCli heavy industries Co.",            // name
101
        "Such nice guys and gals",                  // info
102
        "http://www.lesbonscomptes.com/upmpdcli",   // url
103
        ""                                          // imageUri
104
    },
105
    // Model
106
    {
107
        "UpMPDCli UPnP-MPD gateway",                // name
108
        "",                                         // info
109
        "http://www.lesbonscomptes.com/upmpdcli",   // url
110
        ""                                          // imageUri
111
    },
112
    // Product
113
    {
114
        "Upmpdcli",                                 // name
115
        PACKAGE_VERSION,                            // info
116
        "",                                         // url
117
        ""                                          // imageUri
118
    }
119
};
96
120
97
// This is global
121
// This is global
98
string g_protocolInfo;
122
string g_protocolInfo;
99
123
100
// Static for cleanup in sig handler.
124
// Static for cleanup in sig handler.
...
...
275
            opts.schttpport = atoi(value.c_str());
299
            opts.schttpport = atoi(value.c_str());
276
        g_config->get("scplaymethod", opts.scplaymethod);
300
        g_config->get("scplaymethod", opts.scplaymethod);
277
        g_config->get("sc2mpd", sc2mpdpath);
301
        g_config->get("sc2mpd", sc2mpdpath);
278
        if (g_config->get("ohmetasleep", value))
302
        if (g_config->get("ohmetasleep", value))
279
            opts.ohmetasleep = atoi(value.c_str());
303
            opts.ohmetasleep = atoi(value.c_str());
304
        g_config->get("ohmanufacturername", ohProductDesc.manufacturer.name);
305
        g_config->get("ohmanufacturerinfo", ohProductDesc.manufacturer.info);
306
        g_config->get("ohmanufacturerurl", ohProductDesc.manufacturer.url);
307
        g_config->get("ohmanufacturerimageuri", ohProductDesc.manufacturer.imageUri);
308
        g_config->get("ohmodelname", ohProductDesc.model.name);
309
        g_config->get("ohmodelinfo", ohProductDesc.model.info);
310
        g_config->get("ohmodelurl", ohProductDesc.model.url);
311
        g_config->get("ohmodelimageUri", ohProductDesc.model.imageUri);
312
        g_config->get("ohproductname", ohProductDesc.product.name);
313
        g_config->get("ohproductinfo", ohProductDesc.product.info);
314
        g_config->get("ohproducturl", ohProductDesc.product.url);
315
        g_config->get("ohproductimageuri", ohProductDesc.product.imageUri);
316
        g_config->get("ohproductroom", ohProductDesc.room);
317
        // ProductName is set to ModelName by default
318
        if (ohProductDesc.product.name.empty()) {
319
          ohProductDesc.product.name = ohProductDesc.model.name;
320
        }
321
        // ProductRoom is set to "Main Room" by default
322
        if (ohProductDesc.room.empty()) {
323
          ohProductDesc.room = "Main Room";
324
        }
280
325
281
        g_config->get("scsenderpath", senderpath);
326
        g_config->get("scsenderpath", senderpath);
282
        if (g_config->get("scsendermpdport", value))
327
        if (g_config->get("scsendermpdport", value))
283
            sendermpdport = atoi(value.c_str());
328
            sendermpdport = atoi(value.c_str());
284
    }
329
    }
...
...
504
    }
549
    }
505
550
506
    if (!enableAV)
551
    if (!enableAV)
507
        opts.options |= UpMpd::upmpdNoAV;
552
        opts.options |= UpMpd::upmpdNoAV;
508
    // Initialize the UPnP device object.
553
    // Initialize the UPnP device object.
509
    UpMpd device(string("uuid:") + UUID, friendlyname, 
554
    UpMpd device(string("uuid:") + UUID, friendlyname, ohProductDesc,
510
                 files, mpdclip, opts);
555
                 files, mpdclip, opts);
511
    dev = &device;
556
    dev = &device;
512
557
513
    // And forever generate state change events.
558
    // And forever generate state change events.
514
    LOGDEB("Entering event loop" << endl);
559
    LOGDEB("Entering event loop" << endl);