From 62dc5423417b01da522a56afc965eb9cf9f7deac Mon Sep 17 00:00:00 2001 From: Nestal Wan Date: Mon, 29 Apr 2013 13:23:34 +0800 Subject: [PATCH] refactored old GDoc API into v1 namespace. using v2 namespace for new Google Drive API --- bgrive/src/main.cc | 20 ++++++-- grive/src/main.cc | 1 + libgrive/CMakeLists.txt | 3 +- libgrive/src/drive/CommonUri.cc | 4 +- libgrive/src/drive/CommonUri.hh | 4 +- libgrive/src/drive/Drive.cc | 8 +-- libgrive/src/drive/Drive.hh | 6 ++- libgrive/src/drive/Entry.cc | 4 +- libgrive/src/drive/Entry.hh | 4 +- libgrive/src/drive/Feed.cc | 4 +- libgrive/src/drive/Feed.hh | 4 +- libgrive/src/drive/Resource.cc | 6 +-- libgrive/src/drive/Resource.hh | 9 ++-- libgrive/src/drive/ResourceTree.cc | 4 +- libgrive/src/drive/ResourceTree.hh | 4 +- libgrive/src/drive/State.cc | 6 +-- libgrive/src/drive/State.hh | 5 +- libgrive/src/drive2/Drive.cc | 35 +++++++++++++ libgrive/src/drive2/Drive.hh | 45 +++++++++++++++++ libgrive/src/drive2/Feed.cc | 66 +++++++++++++++++++++++++ libgrive/src/drive2/Feed.hh | 55 +++++++++++++++++++++ libgrive/src/drive2/Resource.cc | 57 +++++++++++++++++++++ libgrive/src/drive2/Resource.hh | 49 ++++++++++++++++++ libgrive/src/protocol/Json.cc | 4 +- libgrive/test/drive/EntryTest.cc | 1 + libgrive/test/drive/ResourceTest.cc | 1 + libgrive/test/drive/ResourceTreeTest.cc | 1 + libgrive/test/drive/StateTest.cc | 1 + 28 files changed, 375 insertions(+), 36 deletions(-) create mode 100644 libgrive/src/drive2/Drive.cc create mode 100644 libgrive/src/drive2/Drive.hh create mode 100644 libgrive/src/drive2/Feed.cc create mode 100644 libgrive/src/drive2/Feed.hh create mode 100644 libgrive/src/drive2/Resource.cc create mode 100644 libgrive/src/drive2/Resource.hh diff --git a/bgrive/src/main.cc b/bgrive/src/main.cc index 0c945f3..a45d055 100644 --- a/bgrive/src/main.cc +++ b/bgrive/src/main.cc @@ -23,13 +23,11 @@ #include #include -#include "drive/CommonUri.hh" -#include "drive/Entry.hh" -#include "drive/Feed.hh" +#include "drive2/Feed.hh" #include "http/CurlAgent.hh" #include "http/Header.hh" -//#include "http/XmlResponse.hh" +#include "protocol/JsonResponse.hh" #include "protocol/Json.hh" #include "protocol/OAuth2.hh" @@ -38,11 +36,13 @@ #include "util/File.hh" #include +#include const std::string client_id = "22314510474.apps.googleusercontent.com" ; const std::string client_secret = "bl4ufi89h-9MkFlypcI7R785" ; using namespace gr ; +using namespace gr::v2 ; int main( int argc, char **argv ) { @@ -55,7 +55,7 @@ int main( int argc, char **argv ) OAuth2 token( refresh_token, client_id, client_secret ) ; AuthAgent agent( token, std::auto_ptr( new http::CurlAgent ) ) ; - Feed feed ; +/* Feed feed ; feed.Start( &agent, feed_base + "/-/folder?max-results=50&showroot=true" ) ; do @@ -67,6 +67,16 @@ int main( int argc, char **argv ) qDebug() << e.Name().c_str() ; } } while ( feed.GetNext( &agent ) ) ; +*/ +/* http::JsonResponse jsp ; + agent.Get( "https://www.googleapis.com/drive/v2/files", &jsp, http::Header() ) ; + std::cout << jsp.Response() << std::endl ; +*/ + Feed feed( "https://www.googleapis.com/drive/v2/files" ) ; + while ( feed.Next(&agent) ) + { + std::cout << feed.Content() << std::endl ; + } QApplication app( argc, argv ) ; MainWnd wnd ; diff --git a/grive/src/main.cc b/grive/src/main.cc index b2c4319..5209c94 100644 --- a/grive/src/main.cc +++ b/grive/src/main.cc @@ -48,6 +48,7 @@ const std::string client_id = "22314510474.apps.googleusercontent.com" ; const std::string client_secret = "bl4ufi89h-9MkFlypcI7R785" ; using namespace gr ; +using namespace gr::v1 ; namespace po = boost::program_options; // libgcrypt insist this to be done in application, not library diff --git a/libgrive/CMakeLists.txt b/libgrive/CMakeLists.txt index a9d6018..08dc066 100644 --- a/libgrive/CMakeLists.txt +++ b/libgrive/CMakeLists.txt @@ -45,7 +45,7 @@ include_directories( ) file(GLOB DRIVE_HEADERS - ${libgrive_SOURCE_DIR}/src/drive/*.hh + ${libgrive_SOURCE_DIR}/src/drive/*.hh ) file (GLOB PROTOCOL_HEADERS @@ -62,6 +62,7 @@ file (GLOB XML_HEADERS file (GLOB LIBGRIVE_SRC src/drive/*.cc + src/drive2/*.cc src/http/*.cc src/protocol/*.cc src/util/*.cc diff --git a/libgrive/src/drive/CommonUri.cc b/libgrive/src/drive/CommonUri.cc index dc3e055..a69b02b 100644 --- a/libgrive/src/drive/CommonUri.cc +++ b/libgrive/src/drive/CommonUri.cc @@ -20,7 +20,7 @@ #include "CommonUri.hh" #include -namespace gr { +namespace gr { namespace v1 { std::string ChangesFeed( int changestamp ) { @@ -28,4 +28,4 @@ std::string ChangesFeed( int changestamp ) return changestamp > 0 ? (feed%changestamp).str() : feed_changes ; } -} \ No newline at end of file +} } diff --git a/libgrive/src/drive/CommonUri.hh b/libgrive/src/drive/CommonUri.hh index 7be31b2..b0e06f7 100644 --- a/libgrive/src/drive/CommonUri.hh +++ b/libgrive/src/drive/CommonUri.hh @@ -21,7 +21,7 @@ #include -namespace gr +namespace gr { namespace v1 { const std::string feed_base = "https://docs.google.com/feeds/default/private/full" ; const std::string feed_changes = "https://docs.google.com/feeds/default/private/changes" ; @@ -33,4 +33,4 @@ namespace gr "https://docs.google.com/feeds/upload/create-session/default/private/full" ; std::string ChangesFeed( int changestamp ) ; -} +} } diff --git a/libgrive/src/drive/Drive.cc b/libgrive/src/drive/Drive.cc index 4fa2cbf..3935448 100644 --- a/libgrive/src/drive/Drive.cc +++ b/libgrive/src/drive/Drive.cc @@ -44,15 +44,15 @@ // for debugging only #include -namespace gr { +namespace gr { namespace v1 { namespace { const std::string state_file = ".grive_state" ; } -Drive::Drive( http::Agent *http, const Json& options ) : - m_http ( http ), +Drive::Drive( http::Agent *agent, const Json& options ) : + m_http ( agent ), m_root ( options["path"].Str() ), m_state ( m_root / state_file, options ), m_options ( options ) @@ -197,4 +197,4 @@ void Drive::UpdateChangeStamp( ) std::atoi(xrsp.Response()["docs:largestChangestamp"]["@value"].front().Value().c_str()) ) ; } -} // end of namespace +} } // end of namespace gr::v1 diff --git a/libgrive/src/drive/Drive.hh b/libgrive/src/drive/Drive.hh index 5424f44..0490d5c 100644 --- a/libgrive/src/drive/Drive.hh +++ b/libgrive/src/drive/Drive.hh @@ -35,12 +35,14 @@ namespace http class Agent ; } +namespace v1 { + class Entry ; class Drive { public : - Drive( http::Agent *http, const Json& options ) ; + Drive( http::Agent *agent, const Json& options ) ; void DetectChanges() ; void Update() ; @@ -64,4 +66,4 @@ private : Json m_options ; } ; -} // end of namespace +} } // end of namespace diff --git a/libgrive/src/drive/Entry.cc b/libgrive/src/drive/Entry.cc index d60d337..23165d8 100644 --- a/libgrive/src/drive/Entry.cc +++ b/libgrive/src/drive/Entry.cc @@ -29,7 +29,7 @@ #include #include -namespace gr { +namespace gr { namespace v1 { /// construct an entry for the root folder Entry::Entry( ) : @@ -195,4 +195,4 @@ std::string Entry::Name() const return (m_kind == "file" || m_kind == "pdf") ? m_filename : m_title ; } -} // end of namespace +} } // end of namespace gr::v1 diff --git a/libgrive/src/drive/Entry.hh b/libgrive/src/drive/Entry.hh index 8a9b8cc..b7e9293 100644 --- a/libgrive/src/drive/Entry.hh +++ b/libgrive/src/drive/Entry.hh @@ -33,6 +33,8 @@ namespace xml class Node ; } +namespace v1 { + /*! \brief corresponds to an "entry" in the resource feed This class is decodes an entry in the resource feed. It will stored the properties like @@ -95,4 +97,4 @@ private : bool m_is_removed ; } ; -} // end of namespace +} } // end of namespace gr::v1 diff --git a/libgrive/src/drive/Feed.cc b/libgrive/src/drive/Feed.cc index 9c74bac..b227e52 100644 --- a/libgrive/src/drive/Feed.cc +++ b/libgrive/src/drive/Feed.cc @@ -29,7 +29,7 @@ #include -namespace gr { +namespace gr { namespace v1 { Feed::Feed( ) { @@ -123,4 +123,4 @@ const xml::Node& Feed::Root() const return m_root ; } -} // end of namespace +} } // end of namespace gr::v1 diff --git a/libgrive/src/drive/Feed.hh b/libgrive/src/drive/Feed.hh index ba98a37..92e6234 100644 --- a/libgrive/src/drive/Feed.hh +++ b/libgrive/src/drive/Feed.hh @@ -36,6 +36,8 @@ namespace http class Header ; } +namespace v1 { + class Feed { public : @@ -88,4 +90,4 @@ private : reference dereference() const ; } ; -} // end of namespace +} } // end of namespace diff --git a/libgrive/src/drive/Resource.cc b/libgrive/src/drive/Resource.cc index b422059..4010cab 100644 --- a/libgrive/src/drive/Resource.cc +++ b/libgrive/src/drive/Resource.cc @@ -45,7 +45,7 @@ // for debugging #include -namespace gr { +namespace gr { namespace v1 { // hard coded XML file const std::string xml_meta = @@ -668,11 +668,11 @@ bool Resource::HasID() const return !m_href.empty() && !m_id.empty() ; } -} // end of namespace +} } // end of namespace namespace std { - void swap( gr::Resource& c1, gr::Resource& c2 ) + void swap( gr::v1::Resource& c1, gr::v1::Resource& c2 ) { c1.Swap( c2 ) ; } diff --git a/libgrive/src/drive/Resource.hh b/libgrive/src/drive/Resource.hh index 5d4f034..4609680 100644 --- a/libgrive/src/drive/Resource.hh +++ b/libgrive/src/drive/Resource.hh @@ -34,9 +34,12 @@ namespace http class Agent ; } -class Entry ; class Json ; +namespace v1 { + +class Entry ; + /*! \brief A resource can be a file or a folder in the google drive The google drive contains a number of resources, which is represented by this class. @@ -158,9 +161,9 @@ private : State m_state ; } ; -} // end of namespace +} } // end of namespace gr::v1 namespace std { - void swap( gr::Resource& c1, gr::Resource& c2 ) ; + void swap( gr::v1::Resource& c1, gr::v1::Resource& c2 ) ; } diff --git a/libgrive/src/drive/ResourceTree.cc b/libgrive/src/drive/ResourceTree.cc index 5761579..4a8a6da 100644 --- a/libgrive/src/drive/ResourceTree.cc +++ b/libgrive/src/drive/ResourceTree.cc @@ -27,7 +27,7 @@ #include #include -namespace gr { +namespace gr { namespace v1 { using namespace details ; @@ -155,4 +155,4 @@ ResourceTree::iterator ResourceTree::end() return m_set.get().end() ; } -} // end of namespace +} } // end of namespace gr::v1 diff --git a/libgrive/src/drive/ResourceTree.hh b/libgrive/src/drive/ResourceTree.hh index 1edbc8c..212141a 100644 --- a/libgrive/src/drive/ResourceTree.hh +++ b/libgrive/src/drive/ResourceTree.hh @@ -32,6 +32,8 @@ namespace gr { class Json ; +namespace v1 { + namespace details { using namespace boost::multi_index ; @@ -96,4 +98,4 @@ private : Resource* m_root ; } ; -} // end of namespace +} } // end of namespace gr::v1 diff --git a/libgrive/src/drive/State.cc b/libgrive/src/drive/State.cc index 195e696..2d1dc94 100644 --- a/libgrive/src/drive/State.cc +++ b/libgrive/src/drive/State.cc @@ -31,7 +31,7 @@ #include -namespace gr { +namespace gr { namespace v1 { State::State( const fs::path& filename, const Json& options ) : m_res ( options["path"].Str() ), @@ -63,7 +63,7 @@ bool State::IsIgnore( const std::string& filename ) return filename[0] == '.' ; } -void State::FromLocal( const fs::path& p, gr::Resource* folder ) +void State::FromLocal( const fs::path& p, Resource* folder ) { assert( folder != 0 ) ; assert( folder->IsFolder() ) ; @@ -294,4 +294,4 @@ void State::ChangeStamp( long cstamp ) m_cstamp = cstamp ; } -} // end of namespace +} } // end of namespace gr::v1 diff --git a/libgrive/src/drive/State.hh b/libgrive/src/drive/State.hh index a0e1213..8c64189 100644 --- a/libgrive/src/drive/State.hh +++ b/libgrive/src/drive/State.hh @@ -34,6 +34,9 @@ namespace http } class Json ; + +namespace v1 { + class Resource ; class Entry ; @@ -80,4 +83,4 @@ private : std::vector m_unresolved ; } ; -} // end of namespace +} } // end of namespace gr::v1 diff --git a/libgrive/src/drive2/Drive.cc b/libgrive/src/drive2/Drive.cc new file mode 100644 index 0000000..36f28d9 --- /dev/null +++ b/libgrive/src/drive2/Drive.cc @@ -0,0 +1,35 @@ +/* + grive: an GPL program to sync a local directory with Google Drive + Copyright (C) 2013 Wan Wai Ho + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation version 2 + of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. +*/ + +#include "Drive.hh" + +namespace gr { namespace v2 { + +Drive::Drive( ) : + m_root( "", "", "" ) +{ +} + +void Drive::Refresh( http::Agent *agent ) +{ +} + +} } // end of namespace gr::v2 + diff --git a/libgrive/src/drive2/Drive.hh b/libgrive/src/drive2/Drive.hh new file mode 100644 index 0000000..c4e521d --- /dev/null +++ b/libgrive/src/drive2/Drive.hh @@ -0,0 +1,45 @@ +/* + grive: an GPL program to sync a local directory with Google Drive + Copyright (C) 2013 Wan Wai Ho + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation version 2 + of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. +*/ + +#pragma once + +#include "Resource.hh" + +namespace gr { + +namespace http +{ + class Agent ; +} + +namespace v2 { + +class Drive +{ +public : + Drive( ) ; + + void Refresh( http::Agent *agent ) ; + +private : + Resource m_root ; +} ; + +} } // end of namespace gr::v2 diff --git a/libgrive/src/drive2/Feed.cc b/libgrive/src/drive2/Feed.cc new file mode 100644 index 0000000..a0587ab --- /dev/null +++ b/libgrive/src/drive2/Feed.cc @@ -0,0 +1,66 @@ +/* + grive: an GPL program to sync a local directory with Google Drive + Copyright (C) 2012 Wan Wai Ho + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation version 2 + of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +#include "Feed.hh" + +#include "http/Agent.hh" +#include "http/Header.hh" +#include "protocol/JsonResponse.hh" + +#include + +namespace gr { namespace v2 { + +Feed::Feed( const std::string& base ) +{ + // Next() will grab this link + m_content.Add( "nextLink", Json(base) ) ; + + Json url ; + m_content.Get("nextLink", url) ; + std::cout << "link = " << url.Str() << std::endl ; +} + +bool Feed::Next( http::Agent *agent ) +{ + Json url ; + if ( !m_content.Get("nextLink", url) ) + return false ; + + http::JsonResponse out ; + try + { + agent->Get( url.Str(), &out, http::Header() ) ; + } + catch ( Exception& e ) + { + e << DriveFeed_( m_content ) ; + throw ; + } + m_content = out.Response() ; + + return true ; +} + +Json Feed::Content() const +{ + return m_content ; +} + +} } // end of namespace diff --git a/libgrive/src/drive2/Feed.hh b/libgrive/src/drive2/Feed.hh new file mode 100644 index 0000000..dbed1af --- /dev/null +++ b/libgrive/src/drive2/Feed.hh @@ -0,0 +1,55 @@ +/* + grive: an GPL program to sync a local directory with Google Drive + Copyright (C) 2012 Wan Wai Ho + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation version 2 + of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +#pragma once + +#include "protocol/Json.hh" +#include "util/Exception.hh" + +#include + +namespace gr +{ +namespace http +{ + class Agent ; + class Header ; +} + +class Json ; + +namespace v2 { + +class Feed +{ +public : + // exception info + typedef boost::error_info DriveFeed_ ; + +public : + Feed( const std::string& base ) ; + bool Next( http::Agent *agent ) ; + + Json Content() const ; + +private : + Json m_content ; +} ; + +} } // end of namespace gr::v2 diff --git a/libgrive/src/drive2/Resource.cc b/libgrive/src/drive2/Resource.cc new file mode 100644 index 0000000..647d028 --- /dev/null +++ b/libgrive/src/drive2/Resource.cc @@ -0,0 +1,57 @@ +/* + grive: an GPL program to sync a local directory with Google Drive + Copyright (C) 2013 Wan Wai Ho + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation version 2 + of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. +*/ + +#include "Resource.hh" + +namespace gr { namespace v2 { + +Resource::Resource( const std::string& id, const std::string& mime, const std::string& title ) : + m_id( id ), + m_mime( mime ), + m_title( title ) +{ +} + +std::string Resource::ID() const +{ + return m_id ; +} + +std::string Resource::Mime() const +{ + return m_mime ; +} + +std::string Resource::Title() const +{ + return m_title ; +} + +bool Resource::IsFolder() const +{ + return m_mime == "application/vnd.google-apps.folder" ; +} + +void Resource::Add( const Resource& child ) +{ + m_children.push_back( child ) ; +} + +} } // end of namespace gr::v2 diff --git a/libgrive/src/drive2/Resource.hh b/libgrive/src/drive2/Resource.hh new file mode 100644 index 0000000..41ac551 --- /dev/null +++ b/libgrive/src/drive2/Resource.hh @@ -0,0 +1,49 @@ +/* + grive: an GPL program to sync a local directory with Google Drive + Copyright (C) 2013 Wan Wai Ho + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation version 2 + of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. +*/ + +#pragma once + +#include +#include + +namespace gr { namespace v2 { + +class Resource +{ +public : + Resource( const std::string& id, const std::string& mime, const std::string& title ) ; + + std::string ID() const ; + std::string Mime() const ; + std::string Title() const ; + + bool IsFolder() const ; + + void Add( const Resource& child ) ; + +private : + std::string m_id ; + std::string m_mime ; + std::string m_title ; + + std::vector m_children ; +} ; + +} } // end of namespace gr::v2 diff --git a/libgrive/src/protocol/Json.cc b/libgrive/src/protocol/Json.cc index d290924..4c115d6 100644 --- a/libgrive/src/protocol/Json.cc +++ b/libgrive/src/protocol/Json.cc @@ -63,9 +63,11 @@ Json::Json( const char *str ) : ) ; } +/** Note that json_object_new_string_len() is not used. +*/ struct json_object* Json::InitStr( const char *str, std::size_t n ) { - struct json_object *j = ::json_object_new_string_len( str, n ) ; + struct json_object *j = ::json_object_new_string( str ) ; if ( j == 0 ) BOOST_THROW_EXCEPTION( Error() diff --git a/libgrive/test/drive/EntryTest.cc b/libgrive/test/drive/EntryTest.cc index 8289961..48dfa5c 100644 --- a/libgrive/test/drive/EntryTest.cc +++ b/libgrive/test/drive/EntryTest.cc @@ -31,6 +31,7 @@ namespace grut { using namespace gr ; +using namespace gr::v1 ; EntryTest::EntryTest( ) { diff --git a/libgrive/test/drive/ResourceTest.cc b/libgrive/test/drive/ResourceTest.cc index e819054..5f69c42 100644 --- a/libgrive/test/drive/ResourceTest.cc +++ b/libgrive/test/drive/ResourceTest.cc @@ -31,6 +31,7 @@ namespace grut { using namespace gr ; +using namespace gr::v1 ; ResourceTest::ResourceTest( ) { diff --git a/libgrive/test/drive/ResourceTreeTest.cc b/libgrive/test/drive/ResourceTreeTest.cc index 0e07d80..22285ad 100644 --- a/libgrive/test/drive/ResourceTreeTest.cc +++ b/libgrive/test/drive/ResourceTreeTest.cc @@ -29,6 +29,7 @@ namespace grut { using namespace gr ; +using namespace gr::v1 ; ResourceTreeTest::ResourceTreeTest( ) { diff --git a/libgrive/test/drive/StateTest.cc b/libgrive/test/drive/StateTest.cc index 9e33fcf..e2ed768 100644 --- a/libgrive/test/drive/StateTest.cc +++ b/libgrive/test/drive/StateTest.cc @@ -30,6 +30,7 @@ namespace grut { using namespace gr ; +using namespace gr::v1 ; StateTest::StateTest( ) {