Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Makes pfc namespace usage more explicit.

  • Loading branch information...
commit 70aecb99a140184bc2dc3da62cef5603d2f01616 1 parent 5652480
Skyler Kehren authored

Showing 1 changed file with 13 additions and 17 deletions. Show diff stats Hide diff stats

  1. +13 17 foo_snarl/foo_snarl.cpp
30 foo_snarl/foo_snarl.cpp
@@ -32,22 +32,20 @@ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF S
32 32
33 33 #pragma comment(lib, "../../foobar2000/shared/shared.lib")
34 34
35   -using namespace pfc;
36   -
37 35 DECLARE_COMPONENT_VERSION(
38 36 "foo_snarl",
39 37 "2.0.0",
40 38 "Snarl notification interface for Foobar2000\n"
41 39 "Developed by: Skyler Kehren (Pyrodogg)\n"
42   - "Contributions by:Max Battcher\n"
43 40 "foosnarl at pyrodogg.com\n"
44 41 "Copyright (C) 2008-2012 Skyler Kehren\n"
45   - "Released under BSD License");
  42 + "Released under BSD License\n"
  43 + "Contributions by:Max Battcher");
46 44
47   -string8 foobarIcon;
  45 +pfc::string8 foobarIcon;
48 46
49 47 Snarl::V42::SnarlInterface sn42;
50   -string8 snarl_password;
  48 +pfc::string8 snarl_password;
51 49 HWND hwndFooSnarlMsg;
52 50 std::map<int,char *> FSMsgClassDecode;
53 51 LONG32 lastClassMsg[4] = {0,0,0,0};
@@ -90,8 +88,6 @@ LPSTR FSClass(int intclass){
90 88 }
91 89
92 90 void FSRegisterClass(int intClass){
93   - bool error;
94   -
95 91 LONG32 ret = sn42.AddClass(FSMsgClassDecode[intClass], FSMsgClassDecode[intClass], snarl_password.get_ptr());
96 92 if ( ret < 0 && ret != -Snarl::V42::SnarlEnums::ErrorAlreadyRegistered )
97 93 {
@@ -178,13 +174,13 @@ class play_callback_foosnarl : public play_callback {
178 174 void on_playback_event(int alertClass){
179 175 static_api_ptr_t<playback_control> pc;
180 176 metadb_handle_ptr handle;
181   - string8 format;
  177 + pfc::string8 format;
182 178 service_ptr_t<titleformat_object> script;
183   - string_formatter text;
184   - string snarl_title;
185   - string snarl_msg;
186   - string snarl_icon;
187   - string8 snarl_icon_data;
  179 + pfc::string_formatter text;
  180 + pfc::string snarl_title;
  181 + pfc::string snarl_msg;
  182 + pfc::string snarl_icon;
  183 + pfc::string8 snarl_icon_data;
188 184 long snarl_time;
189 185
190 186 if(pc->get_now_playing(handle)){
@@ -208,7 +204,7 @@ class play_callback_foosnarl : public play_callback {
208 204 snarl_title = text.toString();
209 205
210 206 metadb_handle_list handle_list;
211   - list_t<GUID> guid_list;
  207 + pfc::list_t<GUID> guid_list;
212 208 handle_list.add_item(handle);
213 209 guid_list.add_item( album_art_ids::cover_front );
214 210 try
@@ -313,7 +309,7 @@ class initquit_foosnarl : public initquit {
313 309 public:
314 310 void on_init()
315 311 {
316   - string8 image;
  312 + pfc::string8 image;
317 313
318 314 static_api_ptr_t<ui_control> uiMain;
319 315 WNDCLASSEX wcex = {0};
@@ -419,7 +415,7 @@ static void try_register()
419 415 //Register Foobar2000 with Snarl
420 416 service_ptr_t<genrand_service> g_rand = genrand_service::g_create();
421 417 g_rand->seed( time( NULL ) );
422   - array_t<unsigned> junk;
  418 + pfc::array_t<unsigned> junk;
423 419 junk.set_count( 4 );
424 420 for ( unsigned i = 0; i < 4; i++ ) junk[ i ] = g_rand->genrand( ~0 );
425 421 base64_encode( snarl_password, junk.get_ptr(), 16 );

0 comments on commit 70aecb9

Please sign in to comment.
Something went wrong with that request. Please try again.